Skip to content

Commit

Permalink
feat(client-codebuild): AWS CodeBuild now supports using Secrets Mana…
Browse files Browse the repository at this point in the history
…ger to store git credentials and using multiple source credentials in a single project.
  • Loading branch information
awstools committed Aug 14, 2024
1 parent 08ad510 commit 9e44d9f
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export interface BatchGetBuildBatchesCommandOutput extends BatchGetBuildBatchesO
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -99,7 +99,7 @@ export interface BatchGetBuildBatchesCommandOutput extends BatchGetBuildBatchesO
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export interface BatchGetBuildsCommandOutput extends BatchGetBuildsOutput, __Met
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -100,7 +100,7 @@ export interface BatchGetBuildsCommandOutput extends BatchGetBuildsOutput, __Met
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface BatchGetProjectsCommandOutput extends BatchGetProjectsOutput, _
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -78,7 +78,7 @@ export interface BatchGetProjectsCommandOutput extends BatchGetProjectsOutput, _
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
8 changes: 4 additions & 4 deletions clients/client-codebuild/src/commands/CreateProjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
* },
* buildspec: "STRING_VALUE",
* auth: { // SourceAuth
* type: "OAUTH" || "CODECONNECTIONS", // required
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* resource: "STRING_VALUE",
* },
* reportBuildStatus: true || false,
Expand All @@ -68,7 +68,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
* },
* buildspec: "STRING_VALUE",
* auth: {
* type: "OAUTH" || "CODECONNECTIONS", // required
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* resource: "STRING_VALUE",
* },
* reportBuildStatus: true || false,
Expand Down Expand Up @@ -214,7 +214,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -235,7 +235,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ImportSourceCredentialsCommandOutput extends ImportSourceCreden

/**
* <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>
* source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -44,7 +44,7 @@ export interface ImportSourceCredentialsCommandOutput extends ImportSourceCreden
* username: "STRING_VALUE",
* token: "STRING_VALUE", // required
* serverType: "GITHUB" || "BITBUCKET" || "GITHUB_ENTERPRISE" || "GITLAB" || "GITLAB_SELF_MANAGED", // required
* authType: "OAUTH" || "BASIC_AUTH" || "PERSONAL_ACCESS_TOKEN" || "CODECONNECTIONS", // required
* authType: "OAUTH" || "BASIC_AUTH" || "PERSONAL_ACCESS_TOKEN" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* shouldOverwrite: true || false,
* };
* const command = new ImportSourceCredentialsCommand(input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface ListSourceCredentialsCommandOutput extends ListSourceCredential
* // { // SourceCredentialsInfo
* // arn: "STRING_VALUE",
* // serverType: "GITHUB" || "BITBUCKET" || "GITHUB_ENTERPRISE" || "GITLAB" || "GITLAB_SELF_MANAGED",
* // authType: "OAUTH" || "BASIC_AUTH" || "PERSONAL_ACCESS_TOKEN" || "CODECONNECTIONS",
* // authType: "OAUTH" || "BASIC_AUTH" || "PERSONAL_ACCESS_TOKEN" || "CODECONNECTIONS" || "SECRETS_MANAGER",
* // resource: "STRING_VALUE",
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export interface RetryBuildBatchCommandOutput extends RetryBuildBatchOutput, __M
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -98,7 +98,7 @@ export interface RetryBuildBatchCommandOutput extends RetryBuildBatchOutput, __M
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
4 changes: 2 additions & 2 deletions clients/client-codebuild/src/commands/RetryBuildCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export interface RetryBuildCommandOutput extends RetryBuildOutput, __MetadataBea
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -98,7 +98,7 @@ export interface RetryBuildCommandOutput extends RetryBuildOutput, __MetadataBea
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface StartBuildBatchCommandOutput extends StartBuildBatchOutput, __M
* },
* buildspec: "STRING_VALUE",
* auth: { // SourceAuth
* type: "OAUTH" || "CODECONNECTIONS", // required
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* resource: "STRING_VALUE",
* },
* reportBuildStatus: true || false,
Expand Down Expand Up @@ -102,7 +102,7 @@ export interface StartBuildBatchCommandOutput extends StartBuildBatchOutput, __M
* sourceTypeOverride: "CODECOMMIT" || "CODEPIPELINE" || "GITHUB" || "GITLAB" || "GITLAB_SELF_MANAGED" || "S3" || "BITBUCKET" || "GITHUB_ENTERPRISE" || "NO_SOURCE",
* sourceLocationOverride: "STRING_VALUE",
* sourceAuthOverride: {
* type: "OAUTH" || "CODECONNECTIONS", // required
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* resource: "STRING_VALUE",
* },
* gitCloneDepthOverride: Number("int"),
Expand Down Expand Up @@ -198,7 +198,7 @@ export interface StartBuildBatchCommandOutput extends StartBuildBatchOutput, __M
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -219,7 +219,7 @@ export interface StartBuildBatchCommandOutput extends StartBuildBatchOutput, __M
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
8 changes: 4 additions & 4 deletions clients/client-codebuild/src/commands/StartBuildCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
* },
* buildspec: "STRING_VALUE",
* auth: { // SourceAuth
* type: "OAUTH" || "CODECONNECTIONS", // required
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* resource: "STRING_VALUE",
* },
* reportBuildStatus: true || false,
Expand Down Expand Up @@ -105,7 +105,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
* sourceTypeOverride: "CODECOMMIT" || "CODEPIPELINE" || "GITHUB" || "GITLAB" || "GITLAB_SELF_MANAGED" || "S3" || "BITBUCKET" || "GITHUB_ENTERPRISE" || "NO_SOURCE",
* sourceLocationOverride: "STRING_VALUE",
* sourceAuthOverride: {
* type: "OAUTH" || "CODECONNECTIONS", // required
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* resource: "STRING_VALUE",
* },
* gitCloneDepthOverride: Number("int"),
Expand Down Expand Up @@ -197,7 +197,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -218,7 +218,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export interface StopBuildBatchCommandOutput extends StopBuildBatchOutput, __Met
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -96,7 +96,7 @@ export interface StopBuildBatchCommandOutput extends StopBuildBatchOutput, __Met
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
4 changes: 2 additions & 2 deletions clients/client-codebuild/src/commands/StopBuildCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export interface StopBuildCommandOutput extends StopBuildOutput, __MetadataBeare
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -97,7 +97,7 @@ export interface StopBuildCommandOutput extends StopBuildOutput, __MetadataBeare
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
8 changes: 4 additions & 4 deletions clients/client-codebuild/src/commands/UpdateProjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
* },
* buildspec: "STRING_VALUE",
* auth: { // SourceAuth
* type: "OAUTH" || "CODECONNECTIONS", // required
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* resource: "STRING_VALUE",
* },
* reportBuildStatus: true || false,
Expand All @@ -68,7 +68,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
* },
* buildspec: "STRING_VALUE",
* auth: {
* type: "OAUTH" || "CODECONNECTIONS", // required
* type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* resource: "STRING_VALUE",
* },
* reportBuildStatus: true || false,
Expand Down Expand Up @@ -214,7 +214,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
* // },
* // buildspec: "STRING_VALUE",
* // auth: { // SourceAuth
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand All @@ -235,7 +235,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
* // },
* // buildspec: "STRING_VALUE",
* // auth: {
* // type: "OAUTH" || "CODECONNECTIONS", // required
* // type: "OAUTH" || "CODECONNECTIONS" || "SECRETS_MANAGER", // required
* // resource: "STRING_VALUE",
* // },
* // reportBuildStatus: true || false,
Expand Down
17 changes: 7 additions & 10 deletions clients/client-codebuild/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const AuthType = {
CODECONNECTIONS: "CODECONNECTIONS",
OAUTH: "OAUTH",
PERSONAL_ACCESS_TOKEN: "PERSONAL_ACCESS_TOKEN",
SECRETS_MANAGER: "SECRETS_MANAGER",
} as const;

/**
Expand Down Expand Up @@ -1459,6 +1460,7 @@ export interface BuildBatchPhase {
export const SourceAuthType = {
CODECONNECTIONS: "CODECONNECTIONS",
OAUTH: "OAUTH",
SECRETS_MANAGER: "SECRETS_MANAGER",
} as const;

/**
Expand All @@ -1469,13 +1471,11 @@ export type SourceAuthType = (typeof SourceAuthType)[keyof typeof SourceAuthType
/**
* <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>
* @public
*/
export interface SourceAuth {
/**
* <p>The authorization type to use. Valid options are OAUTH or CODECONNECTIONS.</p>
* <p>The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.</p>
* @public
*/
type: SourceAuthType | undefined;
Expand Down Expand Up @@ -1723,8 +1723,6 @@ export interface ProjectSource {
/**
* <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>
* @public
*/
auth?: SourceAuth;
Expand Down Expand Up @@ -5875,7 +5873,7 @@ export interface ImportSourceCredentialsInput {
/**
* <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>
* this is the <code>connectionArn</code>. For the <code>authType</code> SECRETS_MANAGER, this is the <code>secretArn</code>.</p>
* @public
*/
token: string | undefined;
Expand All @@ -5889,8 +5887,7 @@ export interface ImportSourceCredentialsInput {
/**
* <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>
* created using the CodeBuild console.</p>
* @public
*/
authType: AuthType | undefined;
Expand Down Expand Up @@ -6954,13 +6951,13 @@ export interface SourceCredentialsInfo {

/**
* <p> The type of authentication used by the credentials. Valid options are OAUTH,
* BASIC_AUTH, PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. </p>
* BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER. </p>
* @public
*/
authType?: AuthType;

/**
* <p>The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is CODECONNECTIONS.</p>
* <p>The connection ARN if your authType is CODECONNECTIONS or SECRETS_MANAGER.</p>
* @public
*/
resource?: string;
Expand Down
Loading

0 comments on commit 9e44d9f

Please sign in to comment.