Skip to content

Commit

Permalink
feat(client-codebuild): CodeBuild Reserved Capacity VPC Support
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed May 15, 2024
1 parent 1ac3a3d commit 877d146
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 25 deletions.
12 changes: 11 additions & 1 deletion clients/client-codebuild/src/commands/BatchGetFleetsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface BatchGetFleetsCommandOutput extends BatchGetFleetsOutput, __Met
* // lastModified: new Date("TIMESTAMP"),
* // status: { // FleetStatus
* // statusCode: "CREATING" || "UPDATING" || "ROTATING" || "PENDING_DELETION" || "DELETING" || "CREATE_FAILED" || "UPDATE_ROLLBACK_FAILED" || "ACTIVE",
* // context: "CREATE_FAILED" || "UPDATE_FAILED",
* // context: "CREATE_FAILED" || "UPDATE_FAILED" || "ACTION_REQUIRED",
* // message: "STRING_VALUE",
* // },
* // baseCapacity: Number("int"),
Expand All @@ -69,6 +69,16 @@ export interface BatchGetFleetsCommandOutput extends BatchGetFleetsOutput, __Met
* // desiredCapacity: Number("int"),
* // },
* // overflowBehavior: "QUEUE" || "ON_DEMAND",
* // vpcConfig: { // VpcConfig
* // vpcId: "STRING_VALUE",
* // subnets: [ // Subnets
* // "STRING_VALUE",
* // ],
* // securityGroupIds: [ // SecurityGroupIds
* // "STRING_VALUE",
* // ],
* // },
* // fleetServiceRole: "STRING_VALUE",
* // tags: [ // TagList
* // { // Tag
* // key: "STRING_VALUE",
Expand Down
22 changes: 21 additions & 1 deletion clients/client-codebuild/src/commands/CreateFleetCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ export interface CreateFleetCommandOutput extends CreateFleetOutput, __MetadataB
* maxCapacity: Number("int"),
* },
* overflowBehavior: "QUEUE" || "ON_DEMAND",
* vpcConfig: { // VpcConfig
* vpcId: "STRING_VALUE",
* subnets: [ // Subnets
* "STRING_VALUE",
* ],
* securityGroupIds: [ // SecurityGroupIds
* "STRING_VALUE",
* ],
* },
* fleetServiceRole: "STRING_VALUE",
* tags: [ // TagList
* { // Tag
* key: "STRING_VALUE",
Expand All @@ -68,7 +78,7 @@ export interface CreateFleetCommandOutput extends CreateFleetOutput, __MetadataB
* // lastModified: new Date("TIMESTAMP"),
* // status: { // FleetStatus
* // statusCode: "CREATING" || "UPDATING" || "ROTATING" || "PENDING_DELETION" || "DELETING" || "CREATE_FAILED" || "UPDATE_ROLLBACK_FAILED" || "ACTIVE",
* // context: "CREATE_FAILED" || "UPDATE_FAILED",
* // context: "CREATE_FAILED" || "UPDATE_FAILED" || "ACTION_REQUIRED",
* // message: "STRING_VALUE",
* // },
* // baseCapacity: Number("int"),
Expand All @@ -86,6 +96,16 @@ export interface CreateFleetCommandOutput extends CreateFleetOutput, __MetadataB
* // desiredCapacity: Number("int"),
* // },
* // overflowBehavior: "QUEUE" || "ON_DEMAND",
* // vpcConfig: { // VpcConfig
* // vpcId: "STRING_VALUE",
* // subnets: [ // Subnets
* // "STRING_VALUE",
* // ],
* // securityGroupIds: [ // SecurityGroupIds
* // "STRING_VALUE",
* // ],
* // },
* // fleetServiceRole: "STRING_VALUE",
* // tags: [ // TagList
* // { // Tag
* // key: "STRING_VALUE",
Expand Down
22 changes: 21 additions & 1 deletion clients/client-codebuild/src/commands/UpdateFleetCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ export interface UpdateFleetCommandOutput extends UpdateFleetOutput, __MetadataB
* maxCapacity: Number("int"),
* },
* overflowBehavior: "QUEUE" || "ON_DEMAND",
* vpcConfig: { // VpcConfig
* vpcId: "STRING_VALUE",
* subnets: [ // Subnets
* "STRING_VALUE",
* ],
* securityGroupIds: [ // SecurityGroupIds
* "STRING_VALUE",
* ],
* },
* fleetServiceRole: "STRING_VALUE",
* tags: [ // TagList
* { // Tag
* key: "STRING_VALUE",
Expand All @@ -68,7 +78,7 @@ export interface UpdateFleetCommandOutput extends UpdateFleetOutput, __MetadataB
* // lastModified: new Date("TIMESTAMP"),
* // status: { // FleetStatus
* // statusCode: "CREATING" || "UPDATING" || "ROTATING" || "PENDING_DELETION" || "DELETING" || "CREATE_FAILED" || "UPDATE_ROLLBACK_FAILED" || "ACTIVE",
* // context: "CREATE_FAILED" || "UPDATE_FAILED",
* // context: "CREATE_FAILED" || "UPDATE_FAILED" || "ACTION_REQUIRED",
* // message: "STRING_VALUE",
* // },
* // baseCapacity: Number("int"),
Expand All @@ -86,6 +96,16 @@ export interface UpdateFleetCommandOutput extends UpdateFleetOutput, __MetadataB
* // desiredCapacity: Number("int"),
* // },
* // overflowBehavior: "QUEUE" || "ON_DEMAND",
* // vpcConfig: { // VpcConfig
* // vpcId: "STRING_VALUE",
* // subnets: [ // Subnets
* // "STRING_VALUE",
* // ],
* // securityGroupIds: [ // SecurityGroupIds
* // "STRING_VALUE",
* // ],
* // },
* // fleetServiceRole: "STRING_VALUE",
* // tags: [ // TagList
* // { // Tag
* // key: "STRING_VALUE",
Expand Down
90 changes: 83 additions & 7 deletions clients/client-codebuild/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1789,14 +1789,17 @@ export interface ProjectSourceVersion {
* <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p>
* </li>
* <li>
* <p>For GitHub or GitLab: the commit ID, pull request ID, branch name, or tag name that
* <p>For GitHub: 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>
* </li>
* <li>
* <p>For GitLab: the commit ID, branch, or Git tag to use.</p>
* </li>
* <li>
* <p>For Bitbucket: 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
Expand Down Expand Up @@ -2582,7 +2585,7 @@ export interface Build {
logs?: LogsLocation;

/**
* <p>How long, in minutes, for CodeBuild to wait before timing out this build if it does not
* <p>How long, in minutes, from 5 to 480 (8 hours), for CodeBuild to wait before timing out this build if it does not
* get marked as completed.</p>
* @public
*/
Expand Down Expand Up @@ -2807,6 +2810,7 @@ export interface ScalingConfigurationOutput {
* @enum
*/
export const FleetContextCode = {
ACTION_REQUIRED: "ACTION_REQUIRED",
CREATE_FAILED: "CREATE_FAILED",
UPDATE_FAILED: "UPDATE_FAILED",
} as const;
Expand Down Expand Up @@ -3093,12 +3097,30 @@ export interface Fleet {
* </li>
* <li>
* <p>For overflow behavior <code>ON_DEMAND</code>, your overflow builds run on CodeBuild on-demand.</p>
* <note>
* <p>If you choose to set your overflow behavior to on-demand while creating a VPC-connected
* fleet, make sure that you add the required VPC permissions to your project service role. For more
* information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface">Example
* policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface</a>.</p>
* </note>
* </li>
* </ul>
* @public
*/
overflowBehavior?: FleetOverflowBehavior;

/**
* <p>Information about the VPC configuration that CodeBuild accesses.</p>
* @public
*/
vpcConfig?: VpcConfig;

/**
* <p>The service role associated with the compute fleet.</p>
* @public
*/
fleetServiceRole?: string;

/**
* <p>A list of tag key and value pairs associated with this compute fleet.</p>
* <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project
Expand Down Expand Up @@ -3749,6 +3771,9 @@ export interface Project {
* used.</p>
* </li>
* <li>
* <p>For GitLab: the commit ID, branch, or Git tag to use.</p>
* </li>
* <li>
* <p>For Bitbucket: 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
Expand Down Expand Up @@ -4608,12 +4633,30 @@ export interface CreateFleetInput {
* </li>
* <li>
* <p>For overflow behavior <code>ON_DEMAND</code>, your overflow builds run on CodeBuild on-demand.</p>
* <note>
* <p>If you choose to set your overflow behavior to on-demand while creating a VPC-connected
* fleet, make sure that you add the required VPC permissions to your project service role. For more
* information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface">Example
* policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface</a>.</p>
* </note>
* </li>
* </ul>
* @public
*/
overflowBehavior?: FleetOverflowBehavior;

/**
* <p>Information about the VPC configuration that CodeBuild accesses.</p>
* @public
*/
vpcConfig?: VpcConfig;

/**
* <p>The service role associated with the compute fleet.</p>
* @public
*/
fleetServiceRole?: string;

/**
* <p>A list of tag key and value pairs associated with this compute fleet.</p>
* <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project
Expand Down Expand Up @@ -4699,6 +4742,9 @@ export interface CreateProjectInput {
* used.</p>
* </li>
* <li>
* <p>For GitLab: the commit ID, branch, or Git tag to use.</p>
* </li>
* <li>
* <p>For Bitbucket: 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
Expand Down Expand Up @@ -4796,6 +4842,9 @@ export interface CreateProjectInput {

/**
* <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p>
* <note>
* <p>If you're using compute fleets during project creation, do not provide vpcConfig.</p>
* </note>
* @public
*/
vpcConfig?: VpcConfig;
Expand Down Expand Up @@ -5732,7 +5781,8 @@ 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. </p>
* this is either the access token or the app password. For the <code>authType</code> CODECONNECTIONS,
* this is the <code>connectionArn</code>.</p>
* @public
*/
token: string | undefined;
Expand All @@ -5744,9 +5794,10 @@ export interface ImportSourceCredentialsInput {
serverType: ServerType | undefined;

/**
* <p> The type of authentication used to connect to a GitHub, GitHub Enterprise, or
* <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>
* created using the CodeBuild console. Note that CODECONNECTIONS is only valid for
* GitLab and GitLab Self Managed.</p>
* @public
*/
authType: AuthType | undefined;
Expand Down Expand Up @@ -6992,6 +7043,10 @@ export interface StartBuildInput {
* HEAD commit ID is used. If not specified, the default branch's HEAD commit
* ID is used.</p>
* </dd>
* <dt>GitLab</dt>
* <dd>
* <p>The commit ID, branch, or Git tag to use.</p>
* </dd>
* <dt>Bitbucket</dt>
* <dd>
* <p>The commit ID, branch name, or tag name that corresponds to the version of
Expand Down Expand Up @@ -7049,8 +7104,8 @@ export interface StartBuildInput {

/**
* <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 or
* GitHub.</p>
* project. This override applies only if the build project's source is BitBucket, GitHub,
* GitLab, or GitLab Self Managed.</p>
* @public
*/
sourceAuthOverride?: SourceAuth;
Expand Down Expand Up @@ -7748,12 +7803,30 @@ export interface UpdateFleetInput {
* </li>
* <li>
* <p>For overflow behavior <code>ON_DEMAND</code>, your overflow builds run on CodeBuild on-demand.</p>
* <note>
* <p>If you choose to set your overflow behavior to on-demand while creating a VPC-connected
* fleet, make sure that you add the required VPC permissions to your project service role. For more
* information, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface">Example
* policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface</a>.</p>
* </note>
* </li>
* </ul>
* @public
*/
overflowBehavior?: FleetOverflowBehavior;

/**
* <p>Information about the VPC configuration that CodeBuild accesses.</p>
* @public
*/
vpcConfig?: VpcConfig;

/**
* <p>The service role associated with the compute fleet.</p>
* @public
*/
fleetServiceRole?: string;

/**
* <p>A list of tag key and value pairs associated with this compute fleet.</p>
* <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project
Expand Down Expand Up @@ -7822,6 +7895,9 @@ export interface UpdateProjectInput {
* used.</p>
* </li>
* <li>
* <p>For GitLab: the commit ID, branch, or Git tag to use.</p>
* </li>
* <li>
* <p>For Bitbucket: 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
Expand Down
6 changes: 6 additions & 0 deletions clients/client-codebuild/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2044,10 +2044,12 @@ const se_CreateFleetInput = (input: CreateFleetInput, context: __SerdeContext):
baseCapacity: [],
computeType: [],
environmentType: [],
fleetServiceRole: [],
name: [],
overflowBehavior: [],
scalingConfiguration: (_) => se_ScalingConfigurationInput(_, context),
tags: _json,
vpcConfig: _json,
});
};

Expand Down Expand Up @@ -2253,9 +2255,11 @@ const se_UpdateFleetInput = (input: UpdateFleetInput, context: __SerdeContext):
baseCapacity: [],
computeType: [],
environmentType: [],
fleetServiceRole: [],
overflowBehavior: [],
scalingConfiguration: (_) => se_ScalingConfigurationInput(_, context),
tags: _json,
vpcConfig: _json,
});
};

Expand Down Expand Up @@ -2713,13 +2717,15 @@ const de_Fleet = (output: any, context: __SerdeContext): Fleet => {
computeType: __expectString,
created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
environmentType: __expectString,
fleetServiceRole: __expectString,
id: __expectString,
lastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
name: __expectString,
overflowBehavior: __expectString,
scalingConfiguration: (_: any) => de_ScalingConfigurationOutput(_, context),
status: _json,
tags: _json,
vpcConfig: _json,
}) as any;
};

Expand Down
Loading

0 comments on commit 877d146

Please sign in to comment.