Skip to content

Commit 34e75e9

Browse files
AWS CodeBuild now supports Docker Server capability
1 parent 2ed7d26 commit 34e75e9

15 files changed

+684
-16
lines changed

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,6 +1571,22 @@
15711571
"testCases":{"shape":"TestCases"}
15721572
}
15731573
},
1574+
"DockerServer":{
1575+
"type":"structure",
1576+
"required":["computeType"],
1577+
"members":{
1578+
"computeType":{"shape":"ComputeType"},
1579+
"securityGroupIds":{"shape":"SecurityGroupIds"},
1580+
"status":{"shape":"DockerServerStatus"}
1581+
}
1582+
},
1583+
"DockerServerStatus":{
1584+
"type":"structure",
1585+
"members":{
1586+
"status":{"shape":"String"},
1587+
"message":{"shape":"String"}
1588+
}
1589+
},
15741590
"EnvironmentImage":{
15751591
"type":"structure",
15761592
"members":{
@@ -2379,7 +2395,8 @@
23792395
"privilegedMode":{"shape":"WrapperBoolean"},
23802396
"certificate":{"shape":"String"},
23812397
"registryCredential":{"shape":"RegistryCredential"},
2382-
"imagePullCredentialsType":{"shape":"ImagePullCredentialsType"}
2398+
"imagePullCredentialsType":{"shape":"ImagePullCredentialsType"},
2399+
"dockerServer":{"shape":"DockerServer"}
23832400
}
23842401
},
23852402
"ProjectFileSystemLocation":{

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

Lines changed: 22 additions & 6 deletions
Large diffs are not rendered by default.

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

Lines changed: 43 additions & 6 deletions
Large diffs are not rendered by default.

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ internal bool IsSetBaseCapacity()
7272
/// Gets and sets the property ComputeConfiguration.
7373
/// <para>
7474
/// The compute configuration of the compute fleet. This is only required if <c>computeType</c>
75-
/// is set to <c>ATTRIBUTE_BASED_COMPUTE</c>.
75+
/// is set to <c>ATTRIBUTE_BASED_COMPUTE</c> or <c>CUSTOM_INSTANCE_TYPE</c>.
7676
/// </para>
7777
/// </summary>
7878
public ComputeConfiguration ComputeConfiguration
@@ -106,6 +106,12 @@ internal bool IsSetComputeConfiguration()
106106
/// </para>
107107
/// </note> </li> <li>
108108
/// <para>
109+
/// <c>CUSTOM_INSTANCE_TYPE</c>: Specify the instance type for your compute fleet. For
110+
/// a list of supported instance types, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types">Supported
111+
/// instance families </a> in the <i>CodeBuild User Guide</i>.
112+
/// </para>
113+
/// </li> <li>
114+
/// <para>
109115
/// <c>BUILD_GENERAL1_SMALL</c>: Use up to 4 GiB memory and 2 vCPUs for builds.
110116
/// </para>
111117
/// </li> <li>
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the codebuild-2016-10-06.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.CodeBuild.Model
31+
{
32+
/// <summary>
33+
/// Contains docker server information.
34+
/// </summary>
35+
public partial class DockerServer
36+
{
37+
private ComputeType _computeType;
38+
private List<string> _securityGroupIds = AWSConfigs.InitializeCollections ? new List<string>() : null;
39+
private DockerServerStatus _status;
40+
41+
/// <summary>
42+
/// Gets and sets the property ComputeType.
43+
/// <para>
44+
/// Information about the compute resources the docker server uses. Available values include:
45+
/// </para>
46+
/// <ul> <li>
47+
/// <para>
48+
/// <c>BUILD_GENERAL1_SMALL</c>: Use up to 4 GiB memory and 2 vCPUs for your docker server.
49+
/// </para>
50+
/// </li> <li>
51+
/// <para>
52+
/// <c>BUILD_GENERAL1_MEDIUM</c>: Use up to 8 GiB memory and 4 vCPUs for your docker
53+
/// server.
54+
/// </para>
55+
/// </li> <li>
56+
/// <para>
57+
/// <c>BUILD_GENERAL1_LARGE</c>: Use up to 16 GiB memory and 8 vCPUs for your docker
58+
/// server.
59+
/// </para>
60+
/// </li> <li>
61+
/// <para>
62+
/// <c>BUILD_GENERAL1_XLARGE</c>: Use up to 64 GiB memory and 32 vCPUs for your docker
63+
/// server.
64+
/// </para>
65+
/// </li> <li>
66+
/// <para>
67+
/// <c>BUILD_GENERAL1_2XLARGE</c>: Use up to 128 GiB memory and 64 vCPUs for your docker
68+
/// server.
69+
/// </para>
70+
/// </li> </ul>
71+
/// </summary>
72+
[AWSProperty(Required=true)]
73+
public ComputeType ComputeType
74+
{
75+
get { return this._computeType; }
76+
set { this._computeType = value; }
77+
}
78+
79+
// Check to see if ComputeType property is set
80+
internal bool IsSetComputeType()
81+
{
82+
return this._computeType != null;
83+
}
84+
85+
/// <summary>
86+
/// Gets and sets the property SecurityGroupIds.
87+
/// <para>
88+
/// A list of one or more security groups IDs.
89+
/// </para>
90+
/// <note>
91+
/// <para>
92+
/// Security groups configured for Docker servers should allow ingress network traffic
93+
/// from the VPC configured in the project. They should allow ingress on port 9876.
94+
/// </para>
95+
/// </note>
96+
/// </summary>
97+
[AWSProperty(Max=5)]
98+
public List<string> SecurityGroupIds
99+
{
100+
get { return this._securityGroupIds; }
101+
set { this._securityGroupIds = value; }
102+
}
103+
104+
// Check to see if SecurityGroupIds property is set
105+
internal bool IsSetSecurityGroupIds()
106+
{
107+
return this._securityGroupIds != null && (this._securityGroupIds.Count > 0 || !AWSConfigs.InitializeCollections);
108+
}
109+
110+
/// <summary>
111+
/// Gets and sets the property Status.
112+
/// <para>
113+
/// A DockerServerStatus object to use for this docker server.
114+
/// </para>
115+
/// </summary>
116+
public DockerServerStatus Status
117+
{
118+
get { return this._status; }
119+
set { this._status = value; }
120+
}
121+
122+
// Check to see if Status property is set
123+
internal bool IsSetStatus()
124+
{
125+
return this._status != null;
126+
}
127+
128+
}
129+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the codebuild-2016-10-06.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.CodeBuild.Model
31+
{
32+
/// <summary>
33+
/// Contains information about the status of the docker server.
34+
/// </summary>
35+
public partial class DockerServerStatus
36+
{
37+
private string _message;
38+
private string _status;
39+
40+
/// <summary>
41+
/// Gets and sets the property Message.
42+
/// <para>
43+
/// A message associated with the status of a docker server.
44+
/// </para>
45+
/// </summary>
46+
public string Message
47+
{
48+
get { return this._message; }
49+
set { this._message = value; }
50+
}
51+
52+
// Check to see if Message property is set
53+
internal bool IsSetMessage()
54+
{
55+
return this._message != null;
56+
}
57+
58+
/// <summary>
59+
/// Gets and sets the property Status.
60+
/// <para>
61+
/// The status of the docker server.
62+
/// </para>
63+
/// </summary>
64+
public string Status
65+
{
66+
get { return this._status; }
67+
set { this._status = value; }
68+
}
69+
70+
// Check to see if Status property is set
71+
internal bool IsSetStatus()
72+
{
73+
return this._status != null;
74+
}
75+
76+
}
77+
}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ internal bool IsSetBaseCapacity()
9494
/// Gets and sets the property ComputeConfiguration.
9595
/// <para>
9696
/// The compute configuration of the compute fleet. This is only required if <c>computeType</c>
97-
/// is set to <c>ATTRIBUTE_BASED_COMPUTE</c>.
97+
/// is set to <c>ATTRIBUTE_BASED_COMPUTE</c> or <c>CUSTOM_INSTANCE_TYPE</c>.
9898
/// </para>
9999
/// </summary>
100100
public ComputeConfiguration ComputeConfiguration
@@ -128,6 +128,12 @@ internal bool IsSetComputeConfiguration()
128128
/// </para>
129129
/// </note> </li> <li>
130130
/// <para>
131+
/// <c>CUSTOM_INSTANCE_TYPE</c>: Specify the instance type for your compute fleet. For
132+
/// a list of supported instance types, see <a href="https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types">Supported
133+
/// instance families </a> in the <i>CodeBuild User Guide</i>.
134+
/// </para>
135+
/// </li> <li>
136+
/// <para>
131137
/// <c>BUILD_GENERAL1_SMALL</c>: Use up to 4 GiB memory and 2 vCPUs for builds.
132138
/// </para>
133139
/// </li> <li>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the codebuild-2016-10-06.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Globalization;
22+
using System.IO;
23+
using System.Text;
24+
using System.Xml.Serialization;
25+
26+
using Amazon.CodeBuild.Model;
27+
using Amazon.Runtime;
28+
using Amazon.Runtime.Internal;
29+
using Amazon.Runtime.Internal.Transform;
30+
using Amazon.Runtime.Internal.Util;
31+
#pragma warning disable CS0612,CS0618
32+
namespace Amazon.CodeBuild.Model.Internal.MarshallTransformations
33+
{
34+
/// <summary>
35+
/// DockerServer Marshaller
36+
/// </summary>
37+
public class DockerServerMarshaller : IRequestMarshaller<DockerServer, JsonMarshallerContext>
38+
{
39+
/// <summary>
40+
/// Unmarshaller the response from the service to the response class.
41+
/// </summary>
42+
/// <param name="requestObject"></param>
43+
/// <param name="context"></param>
44+
/// <returns></returns>
45+
public void Marshall(DockerServer requestObject, JsonMarshallerContext context)
46+
{
47+
if(requestObject == null)
48+
return;
49+
if(requestObject.IsSetComputeType())
50+
{
51+
context.Writer.WritePropertyName("computeType");
52+
context.Writer.WriteStringValue(requestObject.ComputeType);
53+
}
54+
55+
if(requestObject.IsSetSecurityGroupIds())
56+
{
57+
context.Writer.WritePropertyName("securityGroupIds");
58+
context.Writer.WriteStartArray();
59+
foreach(var requestObjectSecurityGroupIdsListValue in requestObject.SecurityGroupIds)
60+
{
61+
context.Writer.WriteStringValue(requestObjectSecurityGroupIdsListValue);
62+
}
63+
context.Writer.WriteEndArray();
64+
}
65+
66+
if(requestObject.IsSetStatus())
67+
{
68+
context.Writer.WritePropertyName("status");
69+
context.Writer.WriteStartObject();
70+
71+
var marshaller = DockerServerStatusMarshaller.Instance;
72+
marshaller.Marshall(requestObject.Status, context);
73+
74+
context.Writer.WriteEndObject();
75+
}
76+
77+
}
78+
79+
/// <summary>
80+
/// Singleton Marshaller.
81+
/// </summary>
82+
public readonly static DockerServerMarshaller Instance = new DockerServerMarshaller();
83+
84+
}
85+
}

0 commit comments

Comments
 (0)