Skip to content

Commit 40c3c81

Browse files
Add support for custom instance type for reserved capacity fleets
1 parent 6fc5e30 commit 40c3c81

File tree

9 files changed

+57
-9
lines changed

9 files changed

+57
-9
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
@@ -1298,7 +1298,8 @@
12981298
"vCpu":{"shape":"WrapperLong"},
12991299
"memory":{"shape":"WrapperLong"},
13001300
"disk":{"shape":"WrapperLong"},
1301-
"machineType":{"shape":"MachineType"}
1301+
"machineType":{"shape":"MachineType"},
1302+
"instanceType":{"shape":"NonEmptyString"}
13021303
}
13031304
},
13041305
"ComputeType":{
@@ -1314,7 +1315,8 @@
13141315
"BUILD_LAMBDA_4GB",
13151316
"BUILD_LAMBDA_8GB",
13161317
"BUILD_LAMBDA_10GB",
1317-
"ATTRIBUTE_BASED_COMPUTE"
1318+
"ATTRIBUTE_BASED_COMPUTE",
1319+
"CUSTOM_INSTANCE_TYPE"
13181320
]
13191321
},
13201322
"ComputeTypesAllowed":{

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@
463463
}
464464
},
465465
"ComputeConfiguration": {
466-
"base": "<p>Contains compute attributes. These attributes only need be specified when your project's or fleet's <code>computeType</code> is set to <code>ATTRIBUTE_BASED_COMPUTE</code>.</p>",
466+
"base": "<p>Contains compute attributes. These attributes only need be specified when your project's or fleet's <code>computeType</code> is set to <code>ATTRIBUTE_BASED_COMPUTE</code> or <code>CUSTOM_INSTANCE_TYPE</code>.</p>",
467467
"refs": {
468468
"CreateFleetInput$computeConfiguration": "<p>The compute configuration of the compute fleet. This is only required if <code>computeType</code> is set to <code>ATTRIBUTE_BASED_COMPUTE</code>.</p>",
469469
"Fleet$computeConfiguration": "<p>The compute configuration of the compute fleet. This is only required if <code>computeType</code> is set to <code>ATTRIBUTE_BASED_COMPUTE</code>.</p>",
@@ -1194,6 +1194,7 @@
11941194
"CommandExecution$exitCode": "<p>The exit code to return upon completion.</p>",
11951195
"CommandExecution$sandboxArn": "<p>A <code>sandboxArn</code>.</p>",
11961196
"CommandExecutionIds$member": null,
1197+
"ComputeConfiguration$instanceType": "<p>The EC2 instance type to be launched in your fleet.</p>",
11971198
"ComputeTypesAllowed$member": null,
11981199
"CreateFleetInput$imageId": "<p>The Amazon Machine Image (AMI) of the compute fleet.</p>",
11991200
"CreateFleetInput$fleetServiceRole": "<p>The service role associated with the compute fleet. 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-permission-policy-fleet-service-role.html\"> Allow a user to add a permission policy for a fleet service role</a> in the <i>CodeBuild User Guide</i>.</p>",
@@ -2391,7 +2392,7 @@
23912392
"WebhookScopeType": {
23922393
"base": null,
23932394
"refs": {
2394-
"ScopeConfiguration$scope": "<p>The type of scope for a GitHub or GitLab webhook.</p>"
2395+
"ScopeConfiguration$scope": "<p>The type of scope for a GitHub or GitLab webhook. The scope default is GITHUB_ORGANIZATION.</p>"
23952396
}
23962397
},
23972398
"WebhookStatus": {

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,9 +1859,13 @@
18591859
"machineType":{
18601860
"shape":"MachineType",
18611861
"documentation":"<p>The machine type of the instance type included in your fleet.</p>"
1862+
},
1863+
"instanceType":{
1864+
"shape":"NonEmptyString",
1865+
"documentation":"<p>The EC2 instance type to be launched in your fleet.</p>"
18621866
}
18631867
},
1864-
"documentation":"<p>Contains compute attributes. These attributes only need be specified when your project's or fleet's <code>computeType</code> is set to <code>ATTRIBUTE_BASED_COMPUTE</code>.</p>"
1868+
"documentation":"<p>Contains compute attributes. These attributes only need be specified when your project's or fleet's <code>computeType</code> is set to <code>ATTRIBUTE_BASED_COMPUTE</code> or <code>CUSTOM_INSTANCE_TYPE</code>.</p>"
18651869
},
18661870
"ComputeType":{
18671871
"type":"string",
@@ -1876,7 +1880,8 @@
18761880
"BUILD_LAMBDA_4GB",
18771881
"BUILD_LAMBDA_8GB",
18781882
"BUILD_LAMBDA_10GB",
1879-
"ATTRIBUTE_BASED_COMPUTE"
1883+
"ATTRIBUTE_BASED_COMPUTE",
1884+
"CUSTOM_INSTANCE_TYPE"
18801885
]
18811886
},
18821887
"ComputeTypesAllowed":{
@@ -4645,7 +4650,7 @@
46454650
},
46464651
"scope":{
46474652
"shape":"WebhookScopeType",
4648-
"documentation":"<p>The type of scope for a GitHub or GitLab webhook.</p>"
4653+
"documentation":"<p>The type of scope for a GitHub or GitLab webhook. The scope default is GITHUB_ORGANIZATION.</p>"
46494654
}
46504655
},
46514656
"documentation":"<p>Contains configuration information about the scope for a webhook. </p>"

sdk/code-analysis/ServiceAnalysis/CodeBuild/Generated/PropertyValueRules.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,10 @@
569569
<property>Amazon.CodeBuild.Model.CommandExecution.Status</property>
570570
<min>1</min>
571571
</property-value-rule>
572+
<property-value-rule>
573+
<property>Amazon.CodeBuild.Model.ComputeConfiguration.InstanceType</property>
574+
<min>1</min>
575+
</property-value-rule>
572576
<property-value-rule>
573577
<property>Amazon.CodeBuild.Model.DebugSession.SessionTarget</property>
574578
<min>1</min>

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ namespace Amazon.CodeBuild.Model
3131
{
3232
/// <summary>
3333
/// Contains compute attributes. These attributes only need be specified when your project's
34-
/// or fleet's <c>computeType</c> is set to <c>ATTRIBUTE_BASED_COMPUTE</c>.
34+
/// or fleet's <c>computeType</c> is set to <c>ATTRIBUTE_BASED_COMPUTE</c> or <c>CUSTOM_INSTANCE_TYPE</c>.
3535
/// </summary>
3636
public partial class ComputeConfiguration
3737
{
3838
private long? _disk;
39+
private string _instanceType;
3940
private MachineType _machineType;
4041
private long? _memory;
4142
private long? _vCpu;
@@ -58,6 +59,25 @@ internal bool IsSetDisk()
5859
return this._disk.HasValue;
5960
}
6061

62+
/// <summary>
63+
/// Gets and sets the property InstanceType.
64+
/// <para>
65+
/// The EC2 instance type to be launched in your fleet.
66+
/// </para>
67+
/// </summary>
68+
[AWSProperty(Min=1)]
69+
public string InstanceType
70+
{
71+
get { return this._instanceType; }
72+
set { this._instanceType = value; }
73+
}
74+
75+
// Check to see if InstanceType property is set
76+
internal bool IsSetInstanceType()
77+
{
78+
return this._instanceType != null;
79+
}
80+
6181
/// <summary>
6282
/// Gets and sets the property MachineType.
6383
/// <para>

sdk/src/Services/CodeBuild/Generated/Model/Internal/MarshallTransformations/ComputeConfigurationMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public void Marshall(ComputeConfiguration requestObject, JsonMarshallerContext c
5454
context.Writer.Write(requestObject.Disk);
5555
}
5656

57+
if(requestObject.IsSetInstanceType())
58+
{
59+
context.Writer.WritePropertyName("instanceType");
60+
context.Writer.Write(requestObject.InstanceType);
61+
}
62+
5763
if(requestObject.IsSetMachineType())
5864
{
5965
context.Writer.WritePropertyName("machineType");

sdk/src/Services/CodeBuild/Generated/Model/Internal/MarshallTransformations/ComputeConfigurationUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ public ComputeConfiguration Unmarshall(JsonUnmarshallerContext context)
7272
unmarshalledObject.Disk = unmarshaller.Unmarshall(context);
7373
continue;
7474
}
75+
if (context.TestExpression("instanceType", targetDepth))
76+
{
77+
var unmarshaller = StringUnmarshaller.Instance;
78+
unmarshalledObject.InstanceType = unmarshaller.Unmarshall(context);
79+
continue;
80+
}
7581
if (context.TestExpression("machineType", targetDepth))
7682
{
7783
var unmarshaller = StringUnmarshaller.Instance;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ internal bool IsSetName()
8181
/// <summary>
8282
/// Gets and sets the property Scope.
8383
/// <para>
84-
/// The type of scope for a GitHub or GitLab webhook.
84+
/// The type of scope for a GitHub or GitLab webhook. The scope default is GITHUB_ORGANIZATION.
8585
/// </para>
8686
/// </summary>
8787
[AWSProperty(Required=true)]

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,10 @@ public class ComputeType : ConstantClass
704704
/// Constant BUILD_LAMBDA_8GB for ComputeType
705705
/// </summary>
706706
public static readonly ComputeType BUILD_LAMBDA_8GB = new ComputeType("BUILD_LAMBDA_8GB");
707+
/// <summary>
708+
/// Constant CUSTOM_INSTANCE_TYPE for ComputeType
709+
/// </summary>
710+
public static readonly ComputeType CUSTOM_INSTANCE_TYPE = new ComputeType("CUSTOM_INSTANCE_TYPE");
707711

708712
/// <summary>
709713
/// This constant constructor does not need to be called if the constant

0 commit comments

Comments
 (0)