Skip to content

Commit

Permalink
AWS CodeBuild now supports creating fleets with macOS platform for ru…
Browse files Browse the repository at this point in the history
…nning builds.
  • Loading branch information
aws-sdk-dotnet-automation committed Aug 19, 2024
1 parent bc176c7 commit 5b0b0f0
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 4 deletions.
10 changes: 8 additions & 2 deletions generator/ServiceModels/codebuild/codebuild-2016-10-06.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,7 @@
"scalingConfiguration":{"shape":"ScalingConfigurationInput"},
"overflowBehavior":{"shape":"FleetOverflowBehavior"},
"vpcConfig":{"shape":"VpcConfig"},
"imageId":{"shape":"NonEmptyString"},
"fleetServiceRole":{"shape":"NonEmptyString"},
"tags":{"shape":"TagList"}
}
Expand Down Expand Up @@ -1409,7 +1410,8 @@
"ARM_CONTAINER",
"WINDOWS_SERVER_2019_CONTAINER",
"LINUX_LAMBDA_CONTAINER",
"ARM_LAMBDA_CONTAINER"
"ARM_LAMBDA_CONTAINER",
"MAC_ARM"
]
},
"EnvironmentVariable":{
Expand Down Expand Up @@ -1474,6 +1476,7 @@
"scalingConfiguration":{"shape":"ScalingConfigurationOutput"},
"overflowBehavior":{"shape":"FleetOverflowBehavior"},
"vpcConfig":{"shape":"VpcConfig"},
"imageId":{"shape":"NonEmptyString"},
"fleetServiceRole":{"shape":"NonEmptyString"},
"tags":{"shape":"TagList"}
}
Expand All @@ -1493,7 +1496,9 @@
"enum":[
"CREATE_FAILED",
"UPDATE_FAILED",
"ACTION_REQUIRED"
"ACTION_REQUIRED",
"PENDING_DELETION",
"INSUFFICIENT_CAPACITY"
]
},
"FleetName":{
Expand Down Expand Up @@ -2745,6 +2750,7 @@
"scalingConfiguration":{"shape":"ScalingConfigurationInput"},
"overflowBehavior":{"shape":"FleetOverflowBehavior"},
"vpcConfig":{"shape":"VpcConfig"},
"imageId":{"shape":"NonEmptyString"},
"fleetServiceRole":{"shape":"NonEmptyString"},
"tags":{"shape":"TagList"}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@
"CodeCoverage$reportARN": "<p>The ARN of the report.</p>",
"CodeCoverage$filePath": "<p>The path of the test report file.</p>",
"ComputeTypesAllowed$member": null,
"CreateFleetInput$imageId": "<p>The Amazon Machine Image (AMI) of the compute fleet.</p>",
"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>",
"CreateProjectInput$serviceRole": "<p>The ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>",
"CreateProjectInput$encryptionKey": "<p>The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.</p> <note> <p>You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key. </p> </note> <p>You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format <code>alias/&lt;alias-name&gt;</code>). </p>",
Expand All @@ -1045,6 +1046,7 @@
"ExportedEnvironmentVariable$name": "<p>The name of the exported environment variable.</p>",
"Fleet$arn": "<p>The ARN of the compute fleet.</p>",
"Fleet$id": "<p>The ID of the compute fleet.</p>",
"Fleet$imageId": "<p>The Amazon Machine Image (AMI) of the compute fleet.</p>",
"Fleet$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>",
"FleetArns$member": null,
"FleetNames$member": null,
Expand Down Expand Up @@ -1098,6 +1100,7 @@
"Subnets$member": null,
"TestCase$reportArn": "<p> The ARN of the report to which the test case belongs. </p>",
"UpdateFleetInput$arn": "<p>The ARN of the compute fleet.</p>",
"UpdateFleetInput$imageId": "<p>The Amazon Machine Image (AMI) of the compute fleet.</p>",
"UpdateFleetInput$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>",
"UpdateProjectInput$name": "<p>The name of the build project.</p> <note> <p>You cannot change a build project's name.</p> </note>",
"UpdateProjectInput$serviceRole": "<p>The replacement ARN of the IAM role that enables CodeBuild to interact with dependent Amazon Web Services services on behalf of the Amazon Web Services account.</p>",
Expand Down
19 changes: 17 additions & 2 deletions generator/ServiceModels/codebuild/codebuild-2016-10-06.normal.json
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,10 @@
"documentation":"<p>The compute fleet overflow behavior.</p> <ul> <li> <p>For overflow behavior <code>QUEUE</code>, your overflow builds need to wait on the existing fleet instance to become available.</p> </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>"
},
"vpcConfig":{"shape":"VpcConfig"},
"imageId":{
"shape":"NonEmptyString",
"documentation":"<p>The Amazon Machine Image (AMI) of the compute fleet.</p>"
},
"fleetServiceRole":{
"shape":"NonEmptyString",
"documentation":"<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>"
Expand Down Expand Up @@ -2112,7 +2116,8 @@
"ARM_CONTAINER",
"WINDOWS_SERVER_2019_CONTAINER",
"LINUX_LAMBDA_CONTAINER",
"ARM_LAMBDA_CONTAINER"
"ARM_LAMBDA_CONTAINER",
"MAC_ARM"
]
},
"EnvironmentVariable":{
Expand Down Expand Up @@ -2227,6 +2232,10 @@
"documentation":"<p>The compute fleet overflow behavior.</p> <ul> <li> <p>For overflow behavior <code>QUEUE</code>, your overflow builds need to wait on the existing fleet instance to become available.</p> </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>"
},
"vpcConfig":{"shape":"VpcConfig"},
"imageId":{
"shape":"NonEmptyString",
"documentation":"<p>The Amazon Machine Image (AMI) of the compute fleet.</p>"
},
"fleetServiceRole":{
"shape":"NonEmptyString",
"documentation":"<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>"
Expand All @@ -2253,7 +2262,9 @@
"enum":[
"CREATE_FAILED",
"UPDATE_FAILED",
"ACTION_REQUIRED"
"ACTION_REQUIRED",
"PENDING_DELETION",
"INSUFFICIENT_CAPACITY"
]
},
"FleetName":{
Expand Down Expand Up @@ -4530,6 +4541,10 @@
"documentation":"<p>The compute fleet overflow behavior.</p> <ul> <li> <p>For overflow behavior <code>QUEUE</code>, your overflow builds need to wait on the existing fleet instance to become available.</p> </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>"
},
"vpcConfig":{"shape":"VpcConfig"},
"imageId":{
"shape":"NonEmptyString",
"documentation":"<p>The Amazon Machine Image (AMI) of the compute fleet.</p>"
},
"fleetServiceRole":{
"shape":"NonEmptyString",
"documentation":"<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>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<property>Amazon.CodeBuild.Model.CreateFleetRequest.FleetServiceRole</property>
<min>1</min>
</property-value-rule>
<property-value-rule>
<property>Amazon.CodeBuild.Model.CreateFleetRequest.ImageId</property>
<min>1</min>
</property-value-rule>
<property-value-rule>
<property>Amazon.CodeBuild.Model.CreateFleetRequest.Name</property>
<min>2</min>
Expand Down Expand Up @@ -305,6 +309,10 @@
<property>Amazon.CodeBuild.Model.UpdateFleetRequest.FleetServiceRole</property>
<min>1</min>
</property-value-rule>
<property-value-rule>
<property>Amazon.CodeBuild.Model.UpdateFleetRequest.ImageId</property>
<min>1</min>
</property-value-rule>
<property-value-rule>
<property>Amazon.CodeBuild.Model.UpdateProjectRequest.Description</property>
<min>0</min>
Expand Down Expand Up @@ -510,6 +518,10 @@
<property>Amazon.CodeBuild.Model.Fleet.Id</property>
<min>1</min>
</property-value-rule>
<property-value-rule>
<property>Amazon.CodeBuild.Model.Fleet.ImageId</property>
<min>1</min>
</property-value-rule>
<property-value-rule>
<property>Amazon.CodeBuild.Model.Fleet.Name</property>
<min>2</min>
Expand Down
20 changes: 20 additions & 0 deletions sdk/src/Services/CodeBuild/Generated/Model/CreateFleetRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public partial class CreateFleetRequest : AmazonCodeBuildRequest
private ComputeType _computeType;
private EnvironmentType _environmentType;
private string _fleetServiceRole;
private string _imageId;
private string _name;
private FleetOverflowBehavior _overflowBehavior;
private ScalingConfigurationInput _scalingConfiguration;
Expand Down Expand Up @@ -228,6 +229,25 @@ internal bool IsSetFleetServiceRole()
return this._fleetServiceRole != null;
}

/// <summary>
/// Gets and sets the property ImageId.
/// <para>
/// The Amazon Machine Image (AMI) of the compute fleet.
/// </para>
/// </summary>
[AWSProperty(Min=1)]
public string ImageId
{
get { return this._imageId; }
set { this._imageId = value; }
}

// Check to see if ImageId property is set
internal bool IsSetImageId()
{
return this._imageId != null;
}

/// <summary>
/// Gets and sets the property Name.
/// <para>
Expand Down
20 changes: 20 additions & 0 deletions sdk/src/Services/CodeBuild/Generated/Model/Fleet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public partial class Fleet
private EnvironmentType _environmentType;
private string _fleetServiceRole;
private string _id;
private string _imageId;
private DateTime? _lastModified;
private string _name;
private FleetOverflowBehavior _overflowBehavior;
Expand Down Expand Up @@ -286,6 +287,25 @@ internal bool IsSetId()
return this._id != null;
}

/// <summary>
/// Gets and sets the property ImageId.
/// <para>
/// The Amazon Machine Image (AMI) of the compute fleet.
/// </para>
/// </summary>
[AWSProperty(Min=1)]
public string ImageId
{
get { return this._imageId; }
set { this._imageId = value; }
}

// Check to see if ImageId property is set
internal bool IsSetImageId()
{
return this._imageId != null;
}

/// <summary>
/// Gets and sets the property LastModified.
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ public IRequest Marshall(CreateFleetRequest publicRequest)
context.Writer.Write(publicRequest.FleetServiceRole);
}

if(publicRequest.IsSetImageId())
{
context.Writer.WritePropertyName("imageId");
context.Writer.Write(publicRequest.ImageId);
}

if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("name");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ public Fleet Unmarshall(JsonUnmarshallerContext context)
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("imageId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ImageId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("lastModified", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ public IRequest Marshall(UpdateFleetRequest publicRequest)
context.Writer.Write(publicRequest.FleetServiceRole);
}

if(publicRequest.IsSetImageId())
{
context.Writer.WritePropertyName("imageId");
context.Writer.Write(publicRequest.ImageId);
}

if(publicRequest.IsSetOverflowBehavior())
{
context.Writer.WritePropertyName("overflowBehavior");
Expand Down
20 changes: 20 additions & 0 deletions sdk/src/Services/CodeBuild/Generated/Model/UpdateFleetRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public partial class UpdateFleetRequest : AmazonCodeBuildRequest
private ComputeType _computeType;
private EnvironmentType _environmentType;
private string _fleetServiceRole;
private string _imageId;
private FleetOverflowBehavior _overflowBehavior;
private ScalingConfigurationInput _scalingConfiguration;
private List<Tag> _tags = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
Expand Down Expand Up @@ -245,6 +246,25 @@ internal bool IsSetFleetServiceRole()
return this._fleetServiceRole != null;
}

/// <summary>
/// Gets and sets the property ImageId.
/// <para>
/// The Amazon Machine Image (AMI) of the compute fleet.
/// </para>
/// </summary>
[AWSProperty(Min=1)]
public string ImageId
{
get { return this._imageId; }
set { this._imageId = value; }
}

// Check to see if ImageId property is set
internal bool IsSetImageId()
{
return this._imageId != null;
}

/// <summary>
/// Gets and sets the property OverflowBehavior.
/// <para>
Expand Down
12 changes: 12 additions & 0 deletions sdk/src/Services/CodeBuild/Generated/ServiceEnumerations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,10 @@ public class EnvironmentType : ConstantClass
/// </summary>
public static readonly EnvironmentType LINUX_LAMBDA_CONTAINER = new EnvironmentType("LINUX_LAMBDA_CONTAINER");
/// <summary>
/// Constant MAC_ARM for EnvironmentType
/// </summary>
public static readonly EnvironmentType MAC_ARM = new EnvironmentType("MAC_ARM");
/// <summary>
/// Constant WINDOWS_CONTAINER for EnvironmentType
/// </summary>
public static readonly EnvironmentType WINDOWS_CONTAINER = new EnvironmentType("WINDOWS_CONTAINER");
Expand Down Expand Up @@ -921,6 +925,14 @@ public class FleetContextCode : ConstantClass
/// </summary>
public static readonly FleetContextCode CREATE_FAILED = new FleetContextCode("CREATE_FAILED");
/// <summary>
/// Constant INSUFFICIENT_CAPACITY for FleetContextCode
/// </summary>
public static readonly FleetContextCode INSUFFICIENT_CAPACITY = new FleetContextCode("INSUFFICIENT_CAPACITY");
/// <summary>
/// Constant PENDING_DELETION for FleetContextCode
/// </summary>
public static readonly FleetContextCode PENDING_DELETION = new FleetContextCode("PENDING_DELETION");
/// <summary>
/// Constant UPDATE_FAILED for FleetContextCode
/// </summary>
public static readonly FleetContextCode UPDATE_FAILED = new FleetContextCode("UPDATE_FAILED");
Expand Down

0 comments on commit 5b0b0f0

Please sign in to comment.