Skip to content

Commit 877d146

Browse files
author
awstools
committed
feat(client-codebuild): CodeBuild Reserved Capacity VPC Support
1 parent 1ac3a3d commit 877d146

File tree

6 files changed

+190
-25
lines changed

6 files changed

+190
-25
lines changed

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

+11-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface BatchGetFleetsCommandOutput extends BatchGetFleetsOutput, __Met
5151
* // lastModified: new Date("TIMESTAMP"),
5252
* // status: { // FleetStatus
5353
* // statusCode: "CREATING" || "UPDATING" || "ROTATING" || "PENDING_DELETION" || "DELETING" || "CREATE_FAILED" || "UPDATE_ROLLBACK_FAILED" || "ACTIVE",
54-
* // context: "CREATE_FAILED" || "UPDATE_FAILED",
54+
* // context: "CREATE_FAILED" || "UPDATE_FAILED" || "ACTION_REQUIRED",
5555
* // message: "STRING_VALUE",
5656
* // },
5757
* // baseCapacity: Number("int"),
@@ -69,6 +69,16 @@ export interface BatchGetFleetsCommandOutput extends BatchGetFleetsOutput, __Met
6969
* // desiredCapacity: Number("int"),
7070
* // },
7171
* // overflowBehavior: "QUEUE" || "ON_DEMAND",
72+
* // vpcConfig: { // VpcConfig
73+
* // vpcId: "STRING_VALUE",
74+
* // subnets: [ // Subnets
75+
* // "STRING_VALUE",
76+
* // ],
77+
* // securityGroupIds: [ // SecurityGroupIds
78+
* // "STRING_VALUE",
79+
* // ],
80+
* // },
81+
* // fleetServiceRole: "STRING_VALUE",
7282
* // tags: [ // TagList
7383
* // { // Tag
7484
* // key: "STRING_VALUE",

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

+21-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ export interface CreateFleetCommandOutput extends CreateFleetOutput, __MetadataB
5050
* maxCapacity: Number("int"),
5151
* },
5252
* overflowBehavior: "QUEUE" || "ON_DEMAND",
53+
* vpcConfig: { // VpcConfig
54+
* vpcId: "STRING_VALUE",
55+
* subnets: [ // Subnets
56+
* "STRING_VALUE",
57+
* ],
58+
* securityGroupIds: [ // SecurityGroupIds
59+
* "STRING_VALUE",
60+
* ],
61+
* },
62+
* fleetServiceRole: "STRING_VALUE",
5363
* tags: [ // TagList
5464
* { // Tag
5565
* key: "STRING_VALUE",
@@ -68,7 +78,7 @@ export interface CreateFleetCommandOutput extends CreateFleetOutput, __MetadataB
6878
* // lastModified: new Date("TIMESTAMP"),
6979
* // status: { // FleetStatus
7080
* // statusCode: "CREATING" || "UPDATING" || "ROTATING" || "PENDING_DELETION" || "DELETING" || "CREATE_FAILED" || "UPDATE_ROLLBACK_FAILED" || "ACTIVE",
71-
* // context: "CREATE_FAILED" || "UPDATE_FAILED",
81+
* // context: "CREATE_FAILED" || "UPDATE_FAILED" || "ACTION_REQUIRED",
7282
* // message: "STRING_VALUE",
7383
* // },
7484
* // baseCapacity: Number("int"),
@@ -86,6 +96,16 @@ export interface CreateFleetCommandOutput extends CreateFleetOutput, __MetadataB
8696
* // desiredCapacity: Number("int"),
8797
* // },
8898
* // overflowBehavior: "QUEUE" || "ON_DEMAND",
99+
* // vpcConfig: { // VpcConfig
100+
* // vpcId: "STRING_VALUE",
101+
* // subnets: [ // Subnets
102+
* // "STRING_VALUE",
103+
* // ],
104+
* // securityGroupIds: [ // SecurityGroupIds
105+
* // "STRING_VALUE",
106+
* // ],
107+
* // },
108+
* // fleetServiceRole: "STRING_VALUE",
89109
* // tags: [ // TagList
90110
* // { // Tag
91111
* // key: "STRING_VALUE",

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

+21-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ export interface UpdateFleetCommandOutput extends UpdateFleetOutput, __MetadataB
5050
* maxCapacity: Number("int"),
5151
* },
5252
* overflowBehavior: "QUEUE" || "ON_DEMAND",
53+
* vpcConfig: { // VpcConfig
54+
* vpcId: "STRING_VALUE",
55+
* subnets: [ // Subnets
56+
* "STRING_VALUE",
57+
* ],
58+
* securityGroupIds: [ // SecurityGroupIds
59+
* "STRING_VALUE",
60+
* ],
61+
* },
62+
* fleetServiceRole: "STRING_VALUE",
5363
* tags: [ // TagList
5464
* { // Tag
5565
* key: "STRING_VALUE",
@@ -68,7 +78,7 @@ export interface UpdateFleetCommandOutput extends UpdateFleetOutput, __MetadataB
6878
* // lastModified: new Date("TIMESTAMP"),
6979
* // status: { // FleetStatus
7080
* // statusCode: "CREATING" || "UPDATING" || "ROTATING" || "PENDING_DELETION" || "DELETING" || "CREATE_FAILED" || "UPDATE_ROLLBACK_FAILED" || "ACTIVE",
71-
* // context: "CREATE_FAILED" || "UPDATE_FAILED",
81+
* // context: "CREATE_FAILED" || "UPDATE_FAILED" || "ACTION_REQUIRED",
7282
* // message: "STRING_VALUE",
7383
* // },
7484
* // baseCapacity: Number("int"),
@@ -86,6 +96,16 @@ export interface UpdateFleetCommandOutput extends UpdateFleetOutput, __MetadataB
8696
* // desiredCapacity: Number("int"),
8797
* // },
8898
* // overflowBehavior: "QUEUE" || "ON_DEMAND",
99+
* // vpcConfig: { // VpcConfig
100+
* // vpcId: "STRING_VALUE",
101+
* // subnets: [ // Subnets
102+
* // "STRING_VALUE",
103+
* // ],
104+
* // securityGroupIds: [ // SecurityGroupIds
105+
* // "STRING_VALUE",
106+
* // ],
107+
* // },
108+
* // fleetServiceRole: "STRING_VALUE",
89109
* // tags: [ // TagList
90110
* // { // Tag
91111
* // key: "STRING_VALUE",

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

+83-7
Original file line numberDiff line numberDiff line change
@@ -1789,14 +1789,17 @@ export interface ProjectSourceVersion {
17891789
* <p>For CodeCommit: the commit ID, branch, or Git tag to use.</p>
17901790
* </li>
17911791
* <li>
1792-
* <p>For GitHub or GitLab: the commit ID, pull request ID, branch name, or tag name that
1792+
* <p>For GitHub: the commit ID, pull request ID, branch name, or tag name that
17931793
* corresponds to the version of the source code you want to build. If a pull
17941794
* request ID is specified, it must use the format <code>pr/pull-request-ID</code>
17951795
* (for example, <code>pr/25</code>). If a branch name is specified, the branch's
17961796
* HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is
17971797
* used.</p>
17981798
* </li>
17991799
* <li>
1800+
* <p>For GitLab: the commit ID, branch, or Git tag to use.</p>
1801+
* </li>
1802+
* <li>
18001803
* <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the
18011804
* version of the source code you want to build. If a branch name is specified, the
18021805
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD
@@ -2582,7 +2585,7 @@ export interface Build {
25822585
logs?: LogsLocation;
25832586

25842587
/**
2585-
* <p>How long, in minutes, for CodeBuild to wait before timing out this build if it does not
2588+
* <p>How long, in minutes, from 5 to 480 (8 hours), for CodeBuild to wait before timing out this build if it does not
25862589
* get marked as completed.</p>
25872590
* @public
25882591
*/
@@ -2807,6 +2810,7 @@ export interface ScalingConfigurationOutput {
28072810
* @enum
28082811
*/
28092812
export const FleetContextCode = {
2813+
ACTION_REQUIRED: "ACTION_REQUIRED",
28102814
CREATE_FAILED: "CREATE_FAILED",
28112815
UPDATE_FAILED: "UPDATE_FAILED",
28122816
} as const;
@@ -3093,12 +3097,30 @@ export interface Fleet {
30933097
* </li>
30943098
* <li>
30953099
* <p>For overflow behavior <code>ON_DEMAND</code>, your overflow builds run on CodeBuild on-demand.</p>
3100+
* <note>
3101+
* <p>If you choose to set your overflow behavior to on-demand while creating a VPC-connected
3102+
* fleet, make sure that you add the required VPC permissions to your project service role. For more
3103+
* 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
3104+
* policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface</a>.</p>
3105+
* </note>
30963106
* </li>
30973107
* </ul>
30983108
* @public
30993109
*/
31003110
overflowBehavior?: FleetOverflowBehavior;
31013111

3112+
/**
3113+
* <p>Information about the VPC configuration that CodeBuild accesses.</p>
3114+
* @public
3115+
*/
3116+
vpcConfig?: VpcConfig;
3117+
3118+
/**
3119+
* <p>The service role associated with the compute fleet.</p>
3120+
* @public
3121+
*/
3122+
fleetServiceRole?: string;
3123+
31023124
/**
31033125
* <p>A list of tag key and value pairs associated with this compute fleet.</p>
31043126
* <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project
@@ -3749,6 +3771,9 @@ export interface Project {
37493771
* used.</p>
37503772
* </li>
37513773
* <li>
3774+
* <p>For GitLab: the commit ID, branch, or Git tag to use.</p>
3775+
* </li>
3776+
* <li>
37523777
* <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the
37533778
* version of the source code you want to build. If a branch name is specified, the
37543779
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD
@@ -4608,12 +4633,30 @@ export interface CreateFleetInput {
46084633
* </li>
46094634
* <li>
46104635
* <p>For overflow behavior <code>ON_DEMAND</code>, your overflow builds run on CodeBuild on-demand.</p>
4636+
* <note>
4637+
* <p>If you choose to set your overflow behavior to on-demand while creating a VPC-connected
4638+
* fleet, make sure that you add the required VPC permissions to your project service role. For more
4639+
* 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
4640+
* policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface</a>.</p>
4641+
* </note>
46114642
* </li>
46124643
* </ul>
46134644
* @public
46144645
*/
46154646
overflowBehavior?: FleetOverflowBehavior;
46164647

4648+
/**
4649+
* <p>Information about the VPC configuration that CodeBuild accesses.</p>
4650+
* @public
4651+
*/
4652+
vpcConfig?: VpcConfig;
4653+
4654+
/**
4655+
* <p>The service role associated with the compute fleet.</p>
4656+
* @public
4657+
*/
4658+
fleetServiceRole?: string;
4659+
46174660
/**
46184661
* <p>A list of tag key and value pairs associated with this compute fleet.</p>
46194662
* <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project
@@ -4699,6 +4742,9 @@ export interface CreateProjectInput {
46994742
* used.</p>
47004743
* </li>
47014744
* <li>
4745+
* <p>For GitLab: the commit ID, branch, or Git tag to use.</p>
4746+
* </li>
4747+
* <li>
47024748
* <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the
47034749
* version of the source code you want to build. If a branch name is specified, the
47044750
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD
@@ -4796,6 +4842,9 @@ export interface CreateProjectInput {
47964842

47974843
/**
47984844
* <p>VpcConfig enables CodeBuild to access resources in an Amazon VPC.</p>
4845+
* <note>
4846+
* <p>If you're using compute fleets during project creation, do not provide vpcConfig.</p>
4847+
* </note>
47994848
* @public
48004849
*/
48014850
vpcConfig?: VpcConfig;
@@ -5732,7 +5781,8 @@ export interface ImportSourceCredentialsInput {
57325781

57335782
/**
57345783
* <p> For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket,
5735-
* this is either the access token or the app password. </p>
5784+
* this is either the access token or the app password. For the <code>authType</code> CODECONNECTIONS,
5785+
* this is the <code>connectionArn</code>.</p>
57365786
* @public
57375787
*/
57385788
token: string | undefined;
@@ -5744,9 +5794,10 @@ export interface ImportSourceCredentialsInput {
57445794
serverType: ServerType | undefined;
57455795

57465796
/**
5747-
* <p> The type of authentication used to connect to a GitHub, GitHub Enterprise, or
5797+
* <p> The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or
57485798
* Bitbucket repository. An OAUTH connection is not supported by the API and must be
5749-
* created using the CodeBuild console. </p>
5799+
* created using the CodeBuild console. Note that CODECONNECTIONS is only valid for
5800+
* GitLab and GitLab Self Managed.</p>
57505801
* @public
57515802
*/
57525803
authType: AuthType | undefined;
@@ -6992,6 +7043,10 @@ export interface StartBuildInput {
69927043
* HEAD commit ID is used. If not specified, the default branch's HEAD commit
69937044
* ID is used.</p>
69947045
* </dd>
7046+
* <dt>GitLab</dt>
7047+
* <dd>
7048+
* <p>The commit ID, branch, or Git tag to use.</p>
7049+
* </dd>
69957050
* <dt>Bitbucket</dt>
69967051
* <dd>
69977052
* <p>The commit ID, branch name, or tag name that corresponds to the version of
@@ -7049,8 +7104,8 @@ export interface StartBuildInput {
70497104

70507105
/**
70517106
* <p>An authorization type for this build that overrides the one defined in the build
7052-
* project. This override applies only if the build project's source is BitBucket or
7053-
* GitHub.</p>
7107+
* project. This override applies only if the build project's source is BitBucket, GitHub,
7108+
* GitLab, or GitLab Self Managed.</p>
70547109
* @public
70557110
*/
70567111
sourceAuthOverride?: SourceAuth;
@@ -7748,12 +7803,30 @@ export interface UpdateFleetInput {
77487803
* </li>
77497804
* <li>
77507805
* <p>For overflow behavior <code>ON_DEMAND</code>, your overflow builds run on CodeBuild on-demand.</p>
7806+
* <note>
7807+
* <p>If you choose to set your overflow behavior to on-demand while creating a VPC-connected
7808+
* fleet, make sure that you add the required VPC permissions to your project service role. For more
7809+
* 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
7810+
* policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface</a>.</p>
7811+
* </note>
77517812
* </li>
77527813
* </ul>
77537814
* @public
77547815
*/
77557816
overflowBehavior?: FleetOverflowBehavior;
77567817

7818+
/**
7819+
* <p>Information about the VPC configuration that CodeBuild accesses.</p>
7820+
* @public
7821+
*/
7822+
vpcConfig?: VpcConfig;
7823+
7824+
/**
7825+
* <p>The service role associated with the compute fleet.</p>
7826+
* @public
7827+
*/
7828+
fleetServiceRole?: string;
7829+
77577830
/**
77587831
* <p>A list of tag key and value pairs associated with this compute fleet.</p>
77597832
* <p>These tags are available for use by Amazon Web Services services that support CodeBuild build project
@@ -7822,6 +7895,9 @@ export interface UpdateProjectInput {
78227895
* used.</p>
78237896
* </li>
78247897
* <li>
7898+
* <p>For GitLab: the commit ID, branch, or Git tag to use.</p>
7899+
* </li>
7900+
* <li>
78257901
* <p>For Bitbucket: the commit ID, branch name, or tag name that corresponds to the
78267902
* version of the source code you want to build. If a branch name is specified, the
78277903
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD

clients/client-codebuild/src/protocols/Aws_json1_1.ts

+6
Original file line numberDiff line numberDiff line change
@@ -2044,10 +2044,12 @@ const se_CreateFleetInput = (input: CreateFleetInput, context: __SerdeContext):
20442044
baseCapacity: [],
20452045
computeType: [],
20462046
environmentType: [],
2047+
fleetServiceRole: [],
20472048
name: [],
20482049
overflowBehavior: [],
20492050
scalingConfiguration: (_) => se_ScalingConfigurationInput(_, context),
20502051
tags: _json,
2052+
vpcConfig: _json,
20512053
});
20522054
};
20532055

@@ -2253,9 +2255,11 @@ const se_UpdateFleetInput = (input: UpdateFleetInput, context: __SerdeContext):
22532255
baseCapacity: [],
22542256
computeType: [],
22552257
environmentType: [],
2258+
fleetServiceRole: [],
22562259
overflowBehavior: [],
22572260
scalingConfiguration: (_) => se_ScalingConfigurationInput(_, context),
22582261
tags: _json,
2262+
vpcConfig: _json,
22592263
});
22602264
};
22612265

@@ -2713,13 +2717,15 @@ const de_Fleet = (output: any, context: __SerdeContext): Fleet => {
27132717
computeType: __expectString,
27142718
created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
27152719
environmentType: __expectString,
2720+
fleetServiceRole: __expectString,
27162721
id: __expectString,
27172722
lastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
27182723
name: __expectString,
27192724
overflowBehavior: __expectString,
27202725
scalingConfiguration: (_: any) => de_ScalingConfigurationOutput(_, context),
27212726
status: _json,
27222727
tags: _json,
2728+
vpcConfig: _json,
27232729
}) as any;
27242730
};
27252731

0 commit comments

Comments
 (0)