Skip to content

Commit 6f627e0

Browse files
AWS CodeBuild now supports using Secrets Manager to store git credentials and using multiple source credentials in a single project.
1 parent 822e97c commit 6f627e0

14 files changed

+56
-47
lines changed

generator/ServiceModels/codebuild/codebuild-2016-10-06.api.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,8 @@
684684
"OAUTH",
685685
"BASIC_AUTH",
686686
"PERSONAL_ACCESS_TOKEN",
687-
"CODECONNECTIONS"
687+
"CODECONNECTIONS",
688+
"SECRETS_MANAGER"
688689
]
689690
},
690691
"BatchDeleteBuildsInput":{
@@ -2505,7 +2506,8 @@
25052506
"type":"string",
25062507
"enum":[
25072508
"OAUTH",
2508-
"CODECONNECTIONS"
2509+
"CODECONNECTIONS",
2510+
"SECRETS_MANAGER"
25092511
]
25102512
},
25112513
"SourceCredentialsInfo":{

generator/ServiceModels/codebuild/codebuild-2016-10-06.docs.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"DescribeTestCases": "<p> Returns a list of details about test cases for a report. </p>",
2626
"GetReportGroupTrend": "<p>Analyzes and accumulates test report values for the specified test reports.</p>",
2727
"GetResourcePolicy": "<p> Gets a resource policy that is identified by its resource ARN. </p>",
28-
"ImportSourceCredentials": "<p> Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository. </p>",
28+
"ImportSourceCredentials": "<p> Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. </p>",
2929
"InvalidateProjectCache": "<p>Resets the cache for a project.</p>",
3030
"ListBuildBatches": "<p>Retrieves the identifiers of your build batches in the current region.</p>",
3131
"ListBuildBatchesForProject": "<p>Retrieves the identifiers of the build batches for a specific project.</p>",
@@ -81,8 +81,8 @@
8181
"AuthType": {
8282
"base": null,
8383
"refs": {
84-
"ImportSourceCredentialsInput$authType": "<p> The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild console. Note that CODECONNECTIONS is only valid for GitLab and GitLab Self Managed.</p>",
85-
"SourceCredentialsInfo$authType": "<p> The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. </p>"
84+
"ImportSourceCredentialsInput$authType": "<p> The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild console.</p>",
85+
"SourceCredentialsInfo$authType": "<p> The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER. </p>"
8686
}
8787
},
8888
"BatchDeleteBuildsInput": {
@@ -1617,7 +1617,7 @@
16171617
"SensitiveNonEmptyString": {
16181618
"base": null,
16191619
"refs": {
1620-
"ImportSourceCredentialsInput$token": "<p> For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access token or the app password. For the <code>authType</code> CODECONNECTIONS, this is the <code>connectionArn</code>.</p>"
1620+
"ImportSourceCredentialsInput$token": "<p> For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access token or the app password. For the <code>authType</code> CODECONNECTIONS, this is the <code>connectionArn</code>. For the <code>authType</code> SECRETS_MANAGER, this is the <code>secretArn</code>.</p>"
16211621
}
16221622
},
16231623
"SensitiveString": {
@@ -1658,17 +1658,17 @@
16581658
}
16591659
},
16601660
"SourceAuth": {
1661-
"base": "<p>Information about the authorization settings for CodeBuild to access the source code to be built.</p> <p>This information is for the CodeBuild console's use only. Your code should not get or set this information directly.</p>",
1661+
"base": "<p>Information about the authorization settings for CodeBuild to access the source code to be built.</p>",
16621662
"refs": {
1663-
"ProjectSource$auth": "<p>Information about the authorization settings for CodeBuild to access the source code to be built.</p> <p>This information is for the CodeBuild console's use only. Your code should not get or set this information directly.</p>",
1663+
"ProjectSource$auth": "<p>Information about the authorization settings for CodeBuild to access the source code to be built.</p>",
16641664
"StartBuildBatchInput$sourceAuthOverride": "<p>A <code>SourceAuth</code> object that overrides the one defined in the batch build project. This override applies only if the build project's source is BitBucket or GitHub.</p>",
16651665
"StartBuildInput$sourceAuthOverride": "<p>An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.</p>"
16661666
}
16671667
},
16681668
"SourceAuthType": {
16691669
"base": null,
16701670
"refs": {
1671-
"SourceAuth$type": "<p>The authorization type to use. Valid options are OAUTH or CODECONNECTIONS.</p>"
1671+
"SourceAuth$type": "<p>The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.</p>"
16721672
}
16731673
},
16741674
"SourceCredentialsInfo": {
@@ -1840,7 +1840,7 @@
18401840
"ScopeConfiguration$name": "<p>The name of either the enterprise or organization that will send webhook events to CodeBuild, depending on if the webhook is a global or organization webhook respectively.</p>",
18411841
"ScopeConfiguration$domain": "<p>The domain of the GitHub Enterprise organization. Note that this parameter is only required if your project's source type is GITHUB_ENTERPRISE</p>",
18421842
"SourceAuth$resource": "<p>The resource value that applies to the specified authorization type.</p>",
1843-
"SourceCredentialsInfo$resource": "<p>The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is CODECONNECTIONS.</p>",
1843+
"SourceCredentialsInfo$resource": "<p>The connection ARN if your authType is CODECONNECTIONS or SECRETS_MANAGER.</p>",
18441844
"StartBuildBatchInput$sourceVersion": "<p>The version of the batch build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:</p> <dl> <dt>CodeCommit</dt> <dd> <p>The commit ID, branch, or Git tag to use.</p> </dd> <dt>GitHub</dt> <dd> <p>The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format <code>pr/pull-request-ID</code> (for example <code>pr/25</code>). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </dd> <dt>Bitbucket</dt> <dd> <p>The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.</p> </dd> <dt>Amazon S3</dt> <dd> <p>The version ID of the object that represents the build input ZIP file to use.</p> </dd> </dl> <p>If <code>sourceVersion</code> is specified at the project level, then this <code>sourceVersion</code> (at the build level) takes precedence. </p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html\">Source Version Sample with CodeBuild</a> in the <i>CodeBuild User Guide</i>. </p>",
18451845
"StartBuildBatchInput$sourceLocationOverride": "<p>A location that overrides, for this batch build, the source location defined in the batch build project.</p>",
18461846
"StartBuildBatchInput$buildspecOverride": "<p>A buildspec file declaration that overrides, for this build only, the latest one already defined in the build project.</p> <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage\">Buildspec File Name and Storage Location</a>. </p>",

generator/ServiceModels/codebuild/codebuild-2016-10-06.normal.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
{"shape":"AccountLimitExceededException"},
342342
{"shape":"ResourceAlreadyExistsException"}
343343
],
344-
"documentation":"<p> Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository. </p>"
344+
"documentation":"<p> Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. </p>"
345345
},
346346
"InvalidateProjectCache":{
347347
"name":"InvalidateProjectCache",
@@ -735,7 +735,8 @@
735735
"OAUTH",
736736
"BASIC_AUTH",
737737
"PERSONAL_ACCESS_TOKEN",
738-
"CODECONNECTIONS"
738+
"CODECONNECTIONS",
739+
"SECRETS_MANAGER"
739740
]
740741
},
741742
"BatchDeleteBuildsInput":{
@@ -2424,15 +2425,15 @@
24242425
},
24252426
"token":{
24262427
"shape":"SensitiveNonEmptyString",
2427-
"documentation":"<p> For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access token or the app password. For the <code>authType</code> CODECONNECTIONS, this is the <code>connectionArn</code>.</p>"
2428+
"documentation":"<p> For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access token or the app password. For the <code>authType</code> CODECONNECTIONS, this is the <code>connectionArn</code>. For the <code>authType</code> SECRETS_MANAGER, this is the <code>secretArn</code>.</p>"
24282429
},
24292430
"serverType":{
24302431
"shape":"ServerType",
24312432
"documentation":"<p> The source provider used for this project. </p>"
24322433
},
24332434
"authType":{
24342435
"shape":"AuthType",
2435-
"documentation":"<p> The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild console. Note that CODECONNECTIONS is only valid for GitLab and GitLab Self Managed.</p>"
2436+
"documentation":"<p> The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild console.</p>"
24362437
},
24372438
"shouldOverwrite":{
24382439
"shape":"WrapperBoolean",
@@ -3391,7 +3392,7 @@
33913392
},
33923393
"auth":{
33933394
"shape":"SourceAuth",
3394-
"documentation":"<p>Information about the authorization settings for CodeBuild to access the source code to be built.</p> <p>This information is for the CodeBuild console's use only. Your code should not get or set this information directly.</p>"
3395+
"documentation":"<p>Information about the authorization settings for CodeBuild to access the source code to be built.</p>"
33953396
},
33963397
"reportBuildStatus":{
33973398
"shape":"WrapperBoolean",
@@ -3986,20 +3987,21 @@
39863987
"members":{
39873988
"type":{
39883989
"shape":"SourceAuthType",
3989-
"documentation":"<p>The authorization type to use. Valid options are OAUTH or CODECONNECTIONS.</p>"
3990+
"documentation":"<p>The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.</p>"
39903991
},
39913992
"resource":{
39923993
"shape":"String",
39933994
"documentation":"<p>The resource value that applies to the specified authorization type.</p>"
39943995
}
39953996
},
3996-
"documentation":"<p>Information about the authorization settings for CodeBuild to access the source code to be built.</p> <p>This information is for the CodeBuild console's use only. Your code should not get or set this information directly.</p>"
3997+
"documentation":"<p>Information about the authorization settings for CodeBuild to access the source code to be built.</p>"
39973998
},
39983999
"SourceAuthType":{
39994000
"type":"string",
40004001
"enum":[
40014002
"OAUTH",
4002-
"CODECONNECTIONS"
4003+
"CODECONNECTIONS",
4004+
"SECRETS_MANAGER"
40034005
]
40044006
},
40054007
"SourceCredentialsInfo":{
@@ -4015,11 +4017,11 @@
40154017
},
40164018
"authType":{
40174019
"shape":"AuthType",
4018-
"documentation":"<p> The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. </p>"
4020+
"documentation":"<p> The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER. </p>"
40194021
},
40204022
"resource":{
40214023
"shape":"String",
4022-
"documentation":"<p>The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is CODECONNECTIONS.</p>"
4024+
"documentation":"<p>The connection ARN if your authType is CODECONNECTIONS or SECRETS_MANAGER.</p>"
40234025
}
40244026
},
40254027
"documentation":"<p> Information about the credentials for a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. </p>"

sdk/src/Services/CodeBuild/Generated/Model/ImportSourceCredentialsRequest.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ namespace Amazon.CodeBuild.Model
3232
/// <summary>
3333
/// Container for the parameters to the ImportSourceCredentials operation.
3434
/// Imports the source repository credentials for an CodeBuild project that has its source
35-
/// code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.
35+
/// code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket
36+
/// repository.
3637
/// </summary>
3738
public partial class ImportSourceCredentialsRequest : AmazonCodeBuildRequest
3839
{
@@ -47,8 +48,7 @@ public partial class ImportSourceCredentialsRequest : AmazonCodeBuildRequest
4748
/// <para>
4849
/// The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab,
4950
/// GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not supported
50-
/// by the API and must be created using the CodeBuild console. Note that CODECONNECTIONS
51-
/// is only valid for GitLab and GitLab Self Managed.
51+
/// by the API and must be created using the CodeBuild console.
5252
/// </para>
5353
/// </summary>
5454
[AWSProperty(Required=true)]
@@ -108,7 +108,8 @@ internal bool IsSetShouldOverwrite()
108108
/// <para>
109109
/// For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket,
110110
/// this is either the access token or the app password. For the <c>authType</c> CODECONNECTIONS,
111-
/// this is the <c>connectionArn</c>.
111+
/// this is the <c>connectionArn</c>. For the <c>authType</c> SECRETS_MANAGER, this is
112+
/// the <c>secretArn</c>.
112113
/// </para>
113114
/// </summary>
114115
[AWSProperty(Required=true, Sensitive=true, Min=1)]

sdk/src/Services/CodeBuild/Generated/Model/ProjectSource.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ public partial class ProjectSource
5151
/// Information about the authorization settings for CodeBuild to access the source code
5252
/// to be built.
5353
/// </para>
54-
///
55-
/// <para>
56-
/// This information is for the CodeBuild console's use only. Your code should not get
57-
/// or set this information directly.
58-
/// </para>
5954
/// </summary>
6055
public SourceAuth Auth
6156
{

sdk/src/Services/CodeBuild/Generated/Model/SourceAuth.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ namespace Amazon.CodeBuild.Model
3232
/// <summary>
3333
/// Information about the authorization settings for CodeBuild to access the source code
3434
/// to be built.
35-
///
36-
///
37-
/// <para>
38-
/// This information is for the CodeBuild console's use only. Your code should not get
39-
/// or set this information directly.
40-
/// </para>
4135
/// </summary>
4236
public partial class SourceAuth
4337
{
@@ -65,7 +59,7 @@ internal bool IsSetResource()
6559
/// <summary>
6660
/// Gets and sets the property Type.
6761
/// <para>
68-
/// The authorization type to use. Valid options are OAUTH or CODECONNECTIONS.
62+
/// The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.
6963
/// </para>
7064
/// </summary>
7165
[AWSProperty(Required=true)]

sdk/src/Services/CodeBuild/Generated/Model/SourceCredentialsInfo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ internal bool IsSetArn()
6363
/// Gets and sets the property AuthType.
6464
/// <para>
6565
/// The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH,
66-
/// PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS.
66+
/// PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER.
6767
/// </para>
6868
/// </summary>
6969
public AuthType AuthType
@@ -81,8 +81,7 @@ internal bool IsSetAuthType()
8181
/// <summary>
8282
/// Gets and sets the property Resource.
8383
/// <para>
84-
/// The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your
85-
/// authType is CODECONNECTIONS.
84+
/// The connection ARN if your authType is CODECONNECTIONS or SECRETS_MANAGER.
8685
/// </para>
8786
/// </summary>
8887
public string Resource

sdk/src/Services/CodeBuild/Generated/ServiceEnumerations.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ public class AuthType : ConstantClass
200200
/// Constant PERSONAL_ACCESS_TOKEN for AuthType
201201
/// </summary>
202202
public static readonly AuthType PERSONAL_ACCESS_TOKEN = new AuthType("PERSONAL_ACCESS_TOKEN");
203+
/// <summary>
204+
/// Constant SECRETS_MANAGER for AuthType
205+
/// </summary>
206+
public static readonly AuthType SECRETS_MANAGER = new AuthType("SECRETS_MANAGER");
203207

204208
/// <summary>
205209
/// This constant constructor does not need to be called if the constant
@@ -2240,6 +2244,10 @@ public class SourceAuthType : ConstantClass
22402244
/// Constant OAUTH for SourceAuthType
22412245
/// </summary>
22422246
public static readonly SourceAuthType OAUTH = new SourceAuthType("OAUTH");
2247+
/// <summary>
2248+
/// Constant SECRETS_MANAGER for SourceAuthType
2249+
/// </summary>
2250+
public static readonly SourceAuthType SECRETS_MANAGER = new SourceAuthType("SECRETS_MANAGER");
22432251

22442252
/// <summary>
22452253
/// This constant constructor does not need to be called if the constant

sdk/src/Services/CodeBuild/Generated/_bcl35/AmazonCodeBuildClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,8 @@ public virtual GetResourcePolicyResponse EndGetResourcePolicy(IAsyncResult async
16581658

16591659
/// <summary>
16601660
/// Imports the source repository credentials for an CodeBuild project that has its source
1661-
/// code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.
1661+
/// code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket
1662+
/// repository.
16621663
/// </summary>
16631664
/// <param name="request">Container for the necessary parameters to execute the ImportSourceCredentials service method.</param>
16641665
///

sdk/src/Services/CodeBuild/Generated/_bcl35/IAmazonCodeBuild.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,8 @@ public partial interface IAmazonCodeBuild : IAmazonService, IDisposable
11181118

11191119
/// <summary>
11201120
/// Imports the source repository credentials for an CodeBuild project that has its source
1121-
/// code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.
1121+
/// code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket
1122+
/// repository.
11221123
/// </summary>
11231124
/// <param name="request">Container for the necessary parameters to execute the ImportSourceCredentials service method.</param>
11241125
///

0 commit comments

Comments
 (0)