Skip to content

Commit 9e44d9f

Browse files
author
awstools
committed
feat(client-codebuild): AWS CodeBuild now supports using Secrets Manager to store git credentials and using multiple source credentials in a single project.
1 parent 08ad510 commit 9e44d9f

15 files changed

+60
-51
lines changed

clients/client-codebuild/src/commands/BatchGetBuildBatchesCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export interface BatchGetBuildBatchesCommandOutput extends BatchGetBuildBatchesO
7878
* // },
7979
* // buildspec: "STRING_VALUE",
8080
* // auth: { // SourceAuth
81-
* // type: "OAUTH" || "CODECONNECTIONS", // required
81+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
8282
* // resource: "STRING_VALUE",
8383
* // },
8484
* // reportBuildStatus: true || false,
@@ -99,7 +99,7 @@ export interface BatchGetBuildBatchesCommandOutput extends BatchGetBuildBatchesO
9999
* // },
100100
* // buildspec: "STRING_VALUE",
101101
* // auth: {
102-
* // type: "OAUTH" || "CODECONNECTIONS", // required
102+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
103103
* // resource: "STRING_VALUE",
104104
* // },
105105
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/BatchGetBuildsCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export interface BatchGetBuildsCommandOutput extends BatchGetBuildsOutput, __Met
7979
* // },
8080
* // buildspec: "STRING_VALUE",
8181
* // auth: { // SourceAuth
82-
* // type: "OAUTH" || "CODECONNECTIONS", // required
82+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
8383
* // resource: "STRING_VALUE",
8484
* // },
8585
* // reportBuildStatus: true || false,
@@ -100,7 +100,7 @@ export interface BatchGetBuildsCommandOutput extends BatchGetBuildsOutput, __Met
100100
* // },
101101
* // buildspec: "STRING_VALUE",
102102
* // auth: {
103-
* // type: "OAUTH" || "CODECONNECTIONS", // required
103+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
104104
* // resource: "STRING_VALUE",
105105
* // },
106106
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/BatchGetProjectsCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface BatchGetProjectsCommandOutput extends BatchGetProjectsOutput, _
5757
* // },
5858
* // buildspec: "STRING_VALUE",
5959
* // auth: { // SourceAuth
60-
* // type: "OAUTH" || "CODECONNECTIONS", // required
60+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
6161
* // resource: "STRING_VALUE",
6262
* // },
6363
* // reportBuildStatus: true || false,
@@ -78,7 +78,7 @@ export interface BatchGetProjectsCommandOutput extends BatchGetProjectsOutput, _
7878
* // },
7979
* // buildspec: "STRING_VALUE",
8080
* // auth: {
81-
* // type: "OAUTH" || "CODECONNECTIONS", // required
81+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
8282
* // resource: "STRING_VALUE",
8383
* // },
8484
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/CreateProjectCommand.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
4747
* },
4848
* buildspec: "STRING_VALUE",
4949
* auth: { // SourceAuth
50-
* type: "OAUTH" || "CODECONNECTIONS", // required
50+
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
5151
* resource: "STRING_VALUE",
5252
* },
5353
* reportBuildStatus: true || false,
@@ -68,7 +68,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
6868
* },
6969
* buildspec: "STRING_VALUE",
7070
* auth: {
71-
* type: "OAUTH" || "CODECONNECTIONS", // required
71+
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
7272
* resource: "STRING_VALUE",
7373
* },
7474
* reportBuildStatus: true || false,
@@ -214,7 +214,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
214214
* // },
215215
* // buildspec: "STRING_VALUE",
216216
* // auth: { // SourceAuth
217-
* // type: "OAUTH" || "CODECONNECTIONS", // required
217+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
218218
* // resource: "STRING_VALUE",
219219
* // },
220220
* // reportBuildStatus: true || false,
@@ -235,7 +235,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
235235
* // },
236236
* // buildspec: "STRING_VALUE",
237237
* // auth: {
238-
* // type: "OAUTH" || "CODECONNECTIONS", // required
238+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
239239
* // resource: "STRING_VALUE",
240240
* // },
241241
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/ImportSourceCredentialsCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface ImportSourceCredentialsCommandOutput extends ImportSourceCreden
3333

3434
/**
3535
* <p> Imports the source repository credentials for an CodeBuild project that has its
36-
* source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository. </p>
36+
* source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. </p>
3737
* @example
3838
* Use a bare-bones client and the command you need to make an API call.
3939
* ```javascript
@@ -44,7 +44,7 @@ export interface ImportSourceCredentialsCommandOutput extends ImportSourceCreden
4444
* username: "STRING_VALUE",
4545
* token: "STRING_VALUE", // required
4646
* serverType: "GITHUB" || "BITBUCKET" || "GITHUB_ENTERPRISE" || "GITLAB" || "GITLAB_SELF_MANAGED", // required
47-
* authType: "OAUTH" || "BASIC_AUTH" || "PERSONAL_ACCESS_TOKEN" || "CODECONNECTIONS", // required
47+
* authType: "OAUTH" || "BASIC_AUTH" || "PERSONAL_ACCESS_TOKEN" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
4848
* shouldOverwrite: true || false,
4949
* };
5050
* const command = new ImportSourceCredentialsCommand(input);

clients/client-codebuild/src/commands/ListSourceCredentialsCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface ListSourceCredentialsCommandOutput extends ListSourceCredential
4343
* // { // SourceCredentialsInfo
4444
* // arn: "STRING_VALUE",
4545
* // serverType: "GITHUB" || "BITBUCKET" || "GITHUB_ENTERPRISE" || "GITLAB" || "GITLAB_SELF_MANAGED",
46-
* // authType: "OAUTH" || "BASIC_AUTH" || "PERSONAL_ACCESS_TOKEN" || "CODECONNECTIONS",
46+
* // authType: "OAUTH" || "BASIC_AUTH" || "PERSONAL_ACCESS_TOKEN" || "CODECONNECTIONS" || "SECRETS_MANAGER",
4747
* // resource: "STRING_VALUE",
4848
* // },
4949
* // ],

clients/client-codebuild/src/commands/RetryBuildBatchCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export interface RetryBuildBatchCommandOutput extends RetryBuildBatchOutput, __M
7777
* // },
7878
* // buildspec: "STRING_VALUE",
7979
* // auth: { // SourceAuth
80-
* // type: "OAUTH" || "CODECONNECTIONS", // required
80+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
8181
* // resource: "STRING_VALUE",
8282
* // },
8383
* // reportBuildStatus: true || false,
@@ -98,7 +98,7 @@ export interface RetryBuildBatchCommandOutput extends RetryBuildBatchOutput, __M
9898
* // },
9999
* // buildspec: "STRING_VALUE",
100100
* // auth: {
101-
* // type: "OAUTH" || "CODECONNECTIONS", // required
101+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
102102
* // resource: "STRING_VALUE",
103103
* // },
104104
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/RetryBuildCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export interface RetryBuildCommandOutput extends RetryBuildOutput, __MetadataBea
7777
* // },
7878
* // buildspec: "STRING_VALUE",
7979
* // auth: { // SourceAuth
80-
* // type: "OAUTH" || "CODECONNECTIONS", // required
80+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
8181
* // resource: "STRING_VALUE",
8282
* // },
8383
* // reportBuildStatus: true || false,
@@ -98,7 +98,7 @@ export interface RetryBuildCommandOutput extends RetryBuildOutput, __MetadataBea
9898
* // },
9999
* // buildspec: "STRING_VALUE",
100100
* // auth: {
101-
* // type: "OAUTH" || "CODECONNECTIONS", // required
101+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
102102
* // resource: "STRING_VALUE",
103103
* // },
104104
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/StartBuildBatchCommand.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface StartBuildBatchCommandOutput extends StartBuildBatchOutput, __M
4747
* },
4848
* buildspec: "STRING_VALUE",
4949
* auth: { // SourceAuth
50-
* type: "OAUTH" || "CODECONNECTIONS", // required
50+
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
5151
* resource: "STRING_VALUE",
5252
* },
5353
* reportBuildStatus: true || false,
@@ -102,7 +102,7 @@ export interface StartBuildBatchCommandOutput extends StartBuildBatchOutput, __M
102102
* sourceTypeOverride: "CODECOMMIT" || "CODEPIPELINE" || "GITHUB" || "GITLAB" || "GITLAB_SELF_MANAGED" || "S3" || "BITBUCKET" || "GITHUB_ENTERPRISE" || "NO_SOURCE",
103103
* sourceLocationOverride: "STRING_VALUE",
104104
* sourceAuthOverride: {
105-
* type: "OAUTH" || "CODECONNECTIONS", // required
105+
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
106106
* resource: "STRING_VALUE",
107107
* },
108108
* gitCloneDepthOverride: Number("int"),
@@ -198,7 +198,7 @@ export interface StartBuildBatchCommandOutput extends StartBuildBatchOutput, __M
198198
* // },
199199
* // buildspec: "STRING_VALUE",
200200
* // auth: { // SourceAuth
201-
* // type: "OAUTH" || "CODECONNECTIONS", // required
201+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
202202
* // resource: "STRING_VALUE",
203203
* // },
204204
* // reportBuildStatus: true || false,
@@ -219,7 +219,7 @@ export interface StartBuildBatchCommandOutput extends StartBuildBatchOutput, __M
219219
* // },
220220
* // buildspec: "STRING_VALUE",
221221
* // auth: {
222-
* // type: "OAUTH" || "CODECONNECTIONS", // required
222+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
223223
* // resource: "STRING_VALUE",
224224
* // },
225225
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/StartBuildCommand.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
5050
* },
5151
* buildspec: "STRING_VALUE",
5252
* auth: { // SourceAuth
53-
* type: "OAUTH" || "CODECONNECTIONS", // required
53+
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
5454
* resource: "STRING_VALUE",
5555
* },
5656
* reportBuildStatus: true || false,
@@ -105,7 +105,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
105105
* sourceTypeOverride: "CODECOMMIT" || "CODEPIPELINE" || "GITHUB" || "GITLAB" || "GITLAB_SELF_MANAGED" || "S3" || "BITBUCKET" || "GITHUB_ENTERPRISE" || "NO_SOURCE",
106106
* sourceLocationOverride: "STRING_VALUE",
107107
* sourceAuthOverride: {
108-
* type: "OAUTH" || "CODECONNECTIONS", // required
108+
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
109109
* resource: "STRING_VALUE",
110110
* },
111111
* gitCloneDepthOverride: Number("int"),
@@ -197,7 +197,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
197197
* // },
198198
* // buildspec: "STRING_VALUE",
199199
* // auth: { // SourceAuth
200-
* // type: "OAUTH" || "CODECONNECTIONS", // required
200+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
201201
* // resource: "STRING_VALUE",
202202
* // },
203203
* // reportBuildStatus: true || false,
@@ -218,7 +218,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
218218
* // },
219219
* // buildspec: "STRING_VALUE",
220220
* // auth: {
221-
* // type: "OAUTH" || "CODECONNECTIONS", // required
221+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
222222
* // resource: "STRING_VALUE",
223223
* // },
224224
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/StopBuildBatchCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export interface StopBuildBatchCommandOutput extends StopBuildBatchOutput, __Met
7575
* // },
7676
* // buildspec: "STRING_VALUE",
7777
* // auth: { // SourceAuth
78-
* // type: "OAUTH" || "CODECONNECTIONS", // required
78+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
7979
* // resource: "STRING_VALUE",
8080
* // },
8181
* // reportBuildStatus: true || false,
@@ -96,7 +96,7 @@ export interface StopBuildBatchCommandOutput extends StopBuildBatchOutput, __Met
9696
* // },
9797
* // buildspec: "STRING_VALUE",
9898
* // auth: {
99-
* // type: "OAUTH" || "CODECONNECTIONS", // required
99+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
100100
* // resource: "STRING_VALUE",
101101
* // },
102102
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/StopBuildCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export interface StopBuildCommandOutput extends StopBuildOutput, __MetadataBeare
7676
* // },
7777
* // buildspec: "STRING_VALUE",
7878
* // auth: { // SourceAuth
79-
* // type: "OAUTH" || "CODECONNECTIONS", // required
79+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
8080
* // resource: "STRING_VALUE",
8181
* // },
8282
* // reportBuildStatus: true || false,
@@ -97,7 +97,7 @@ export interface StopBuildCommandOutput extends StopBuildOutput, __MetadataBeare
9797
* // },
9898
* // buildspec: "STRING_VALUE",
9999
* // auth: {
100-
* // type: "OAUTH" || "CODECONNECTIONS", // required
100+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
101101
* // resource: "STRING_VALUE",
102102
* // },
103103
* // reportBuildStatus: true || false,

clients/client-codebuild/src/commands/UpdateProjectCommand.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
4747
* },
4848
* buildspec: "STRING_VALUE",
4949
* auth: { // SourceAuth
50-
* type: "OAUTH" || "CODECONNECTIONS", // required
50+
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
5151
* resource: "STRING_VALUE",
5252
* },
5353
* reportBuildStatus: true || false,
@@ -68,7 +68,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
6868
* },
6969
* buildspec: "STRING_VALUE",
7070
* auth: {
71-
* type: "OAUTH" || "CODECONNECTIONS", // required
71+
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
7272
* resource: "STRING_VALUE",
7373
* },
7474
* reportBuildStatus: true || false,
@@ -214,7 +214,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
214214
* // },
215215
* // buildspec: "STRING_VALUE",
216216
* // auth: { // SourceAuth
217-
* // type: "OAUTH" || "CODECONNECTIONS", // required
217+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
218218
* // resource: "STRING_VALUE",
219219
* // },
220220
* // reportBuildStatus: true || false,
@@ -235,7 +235,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
235235
* // },
236236
* // buildspec: "STRING_VALUE",
237237
* // auth: {
238-
* // type: "OAUTH" || "CODECONNECTIONS", // required
238+
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
239239
* // resource: "STRING_VALUE",
240240
* // },
241241
* // reportBuildStatus: true || false,

clients/client-codebuild/src/models/models_0.ts

+7-10
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export const AuthType = {
7575
CODECONNECTIONS: "CODECONNECTIONS",
7676
OAUTH: "OAUTH",
7777
PERSONAL_ACCESS_TOKEN: "PERSONAL_ACCESS_TOKEN",
78+
SECRETS_MANAGER: "SECRETS_MANAGER",
7879
} as const;
7980

8081
/**
@@ -1459,6 +1460,7 @@ export interface BuildBatchPhase {
14591460
export const SourceAuthType = {
14601461
CODECONNECTIONS: "CODECONNECTIONS",
14611462
OAUTH: "OAUTH",
1463+
SECRETS_MANAGER: "SECRETS_MANAGER",
14621464
} as const;
14631465

14641466
/**
@@ -1469,13 +1471,11 @@ export type SourceAuthType = (typeof SourceAuthType)[keyof typeof SourceAuthType
14691471
/**
14701472
* <p>Information about the authorization settings for CodeBuild to access the source code to be
14711473
* built.</p>
1472-
* <p>This information is for the CodeBuild console's use only. Your code should not get or set
1473-
* this information directly.</p>
14741474
* @public
14751475
*/
14761476
export interface SourceAuth {
14771477
/**
1478-
* <p>The authorization type to use. Valid options are OAUTH or CODECONNECTIONS.</p>
1478+
* <p>The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.</p>
14791479
* @public
14801480
*/
14811481
type: SourceAuthType | undefined;
@@ -1723,8 +1723,6 @@ export interface ProjectSource {
17231723
/**
17241724
* <p>Information about the authorization settings for CodeBuild to access the source code to be
17251725
* built.</p>
1726-
* <p>This information is for the CodeBuild console's use only. Your code should not get or set
1727-
* this information directly.</p>
17281726
* @public
17291727
*/
17301728
auth?: SourceAuth;
@@ -5875,7 +5873,7 @@ export interface ImportSourceCredentialsInput {
58755873
/**
58765874
* <p> For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket,
58775875
* this is either the access token or the app password. For the <code>authType</code> CODECONNECTIONS,
5878-
* this is the <code>connectionArn</code>.</p>
5876+
* this is the <code>connectionArn</code>. For the <code>authType</code> SECRETS_MANAGER, this is the <code>secretArn</code>.</p>
58795877
* @public
58805878
*/
58815879
token: string | undefined;
@@ -5889,8 +5887,7 @@ export interface ImportSourceCredentialsInput {
58895887
/**
58905888
* <p> The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or
58915889
* Bitbucket repository. An OAUTH connection is not supported by the API and must be
5892-
* created using the CodeBuild console. Note that CODECONNECTIONS is only valid for
5893-
* GitLab and GitLab Self Managed.</p>
5890+
* created using the CodeBuild console.</p>
58945891
* @public
58955892
*/
58965893
authType: AuthType | undefined;
@@ -6954,13 +6951,13 @@ export interface SourceCredentialsInfo {
69546951

69556952
/**
69566953
* <p> The type of authentication used by the credentials. Valid options are OAUTH,
6957-
* BASIC_AUTH, PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. </p>
6954+
* BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER. </p>
69586955
* @public
69596956
*/
69606957
authType?: AuthType;
69616958

69626959
/**
6963-
* <p>The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is CODECONNECTIONS.</p>
6960+
* <p>The connection ARN if your authType is CODECONNECTIONS or SECRETS_MANAGER.</p>
69646961
* @public
69656962
*/
69666963
resource?: string;

0 commit comments

Comments
 (0)