Skip to content

Commit 1906301

Browse files
Adds support for tag management on workers and tag inheritance from fleets to their associated workers.
1 parent 2ba80ca commit 1906301

File tree

11 files changed

+163
-6
lines changed

11 files changed

+163
-6
lines changed

generator/ServiceModels/deadline/deadline-2023-10-12.api.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3355,7 +3355,8 @@
33553355
"idempotencyToken":true,
33563356
"location":"header",
33573357
"locationName":"X-Amz-Client-Token"
3358-
}
3358+
},
3359+
"tags":{"shape":"Tags"}
33593360
}
33603361
},
33613362
"CreateWorkerResponse":{
@@ -3391,7 +3392,8 @@
33913392
"members":{
33923393
"mode":{"shape":"AutoScalingMode"},
33933394
"workerCapabilities":{"shape":"CustomerManagedWorkerCapabilities"},
3394-
"storageProfileId":{"shape":"StorageProfileId"}
3395+
"storageProfileId":{"shape":"StorageProfileId"},
3396+
"tagPropagationMode":{"shape":"TagPropagationMode"}
33953397
}
33963398
},
33973399
"CustomerManagedFleetOperatingSystemFamily":{
@@ -5602,7 +5604,7 @@
56025604
},
56035605
"JobTemplate":{
56045606
"type":"string",
5605-
"max":300000,
5607+
"max":1000000,
56065608
"min":1,
56075609
"sensitive":true
56085610
},
@@ -8278,6 +8280,13 @@
82788280
"type":"timestamp",
82798281
"timestampFormat":"iso8601"
82808282
},
8283+
"TagPropagationMode":{
8284+
"type":"string",
8285+
"enum":[
8286+
"NO_PROPAGATION",
8287+
"PROPAGATE_TAGS_TO_WORKERS_AT_LAUNCH"
8288+
]
8289+
},
82818290
"TagResourceRequest":{
82828291
"type":"structure",
82838292
"required":["resourceArn"],

generator/ServiceModels/deadline/deadline-2023-10-12.docs.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4085,6 +4085,12 @@
40854085
"UpdatedSessionActionInfo$updatedAt": "<p>The updated time.</p>"
40864086
}
40874087
},
4088+
"TagPropagationMode": {
4089+
"base": null,
4090+
"refs": {
4091+
"CustomerManagedFleetConfiguration$tagPropagationMode": "<p>Specifies whether tags associated with a fleet are attached to workers when the worker is launched. </p> <p>When the <code>tagPropagationMode</code> is set to <code>PROPAGATE_TAGS_TO_WORKERS_AT_LAUNCH</code> any tag associated with a fleet is attached to workers when they launch. If the tags for a fleet change, the tags associated with running workers <b>do not</b> change.</p> <p>If you don't specify <code>tagPropagationMode</code>, the default is <code>NO_PROPAGATION</code>.</p>"
4092+
}
4093+
},
40884094
"TagResourceRequest": {
40894095
"base": null,
40904096
"refs": {
@@ -4102,6 +4108,7 @@
41024108
"CreateFleetRequest$tags": "<p>Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.</p>",
41034109
"CreateLicenseEndpointRequest$tags": "<p>Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.</p>",
41044110
"CreateQueueRequest$tags": "<p>Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.</p>",
4111+
"CreateWorkerRequest$tags": "<p>Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.</p>",
41054112
"ListTagsForResourceResponse$tags": "<p>Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.</p>",
41064113
"TagResourceRequest$tags": "<p>Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.</p>"
41074114
}

generator/ServiceModels/deadline/deadline-2023-10-12.normal.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3986,6 +3986,10 @@
39863986
"idempotencyToken":true,
39873987
"location":"header",
39883988
"locationName":"X-Amz-Client-Token"
3989+
},
3990+
"tags":{
3991+
"shape":"Tags",
3992+
"documentation":"<p>Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.</p>"
39893993
}
39903994
}
39913995
},
@@ -4034,6 +4038,10 @@
40344038
"storageProfileId":{
40354039
"shape":"StorageProfileId",
40364040
"documentation":"<p>The storage profile ID.</p>"
4041+
},
4042+
"tagPropagationMode":{
4043+
"shape":"TagPropagationMode",
4044+
"documentation":"<p>Specifies whether tags associated with a fleet are attached to workers when the worker is launched. </p> <p>When the <code>tagPropagationMode</code> is set to <code>PROPAGATE_TAGS_TO_WORKERS_AT_LAUNCH</code> any tag associated with a fleet is attached to workers when they launch. If the tags for a fleet change, the tags associated with running workers <b>do not</b> change.</p> <p>If you don't specify <code>tagPropagationMode</code>, the default is <code>NO_PROPAGATION</code>.</p>"
40374045
}
40384046
},
40394047
"documentation":"<p>The details of a customer managed fleet configuration.</p>"
@@ -7514,7 +7522,7 @@
75147522
},
75157523
"JobTemplate":{
75167524
"type":"string",
7517-
"max":300000,
7525+
"max":1000000,
75187526
"min":1,
75197527
"sensitive":true
75207528
},
@@ -11353,6 +11361,13 @@
1135311361
"type":"timestamp",
1135411362
"timestampFormat":"iso8601"
1135511363
},
11364+
"TagPropagationMode":{
11365+
"type":"string",
11366+
"enum":[
11367+
"NO_PROPAGATION",
11368+
"PROPAGATE_TAGS_TO_WORKERS_AT_LAUNCH"
11369+
]
11370+
},
1135611371
"TagResourceRequest":{
1135711372
"type":"structure",
1135811373
"required":["resourceArn"],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283
<property-value-rule>
284284
<property>Amazon.Deadline.Model.CreateJobRequest.Template</property>
285285
<min>1</min>
286-
<max>300000</max>
286+
<max>1000000</max>
287287
</property-value-rule>
288288
<property-value-rule>
289289
<property>Amazon.Deadline.Model.CreateJobResponse.JobId</property>

sdk/src/Services/Deadline/Generated/Model/CreateJobRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ internal bool IsSetTargetTaskRunStatus()
297297
/// The job template to use for this job.
298298
/// </para>
299299
/// </summary>
300-
[AWSProperty(Sensitive=true, Min=1, Max=300000)]
300+
[AWSProperty(Sensitive=true, Min=1, Max=1000000)]
301301
public string Template
302302
{
303303
get { return this._template; }

sdk/src/Services/Deadline/Generated/Model/CreateWorkerRequest.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public partial class CreateWorkerRequest : AmazonDeadlineRequest
4242
private string _farmId;
4343
private string _fleetId;
4444
private HostPropertiesRequest _hostProperties;
45+
private Dictionary<string, string> _tags = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
4546

4647
/// <summary>
4748
/// Gets and sets the property ClientToken.
@@ -118,5 +119,24 @@ internal bool IsSetHostProperties()
118119
return this._hostProperties != null;
119120
}
120121

122+
/// <summary>
123+
/// Gets and sets the property Tags.
124+
/// <para>
125+
/// Each tag consists of a tag key and a tag value. Tag keys and values are both required,
126+
/// but tag values can be empty strings.
127+
/// </para>
128+
/// </summary>
129+
public Dictionary<string, string> Tags
130+
{
131+
get { return this._tags; }
132+
set { this._tags = value; }
133+
}
134+
135+
// Check to see if Tags property is set
136+
internal bool IsSetTags()
137+
{
138+
return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections);
139+
}
140+
121141
}
122142
}

sdk/src/Services/Deadline/Generated/Model/CustomerManagedFleetConfiguration.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public partial class CustomerManagedFleetConfiguration
3636
{
3737
private AutoScalingMode _mode;
3838
private string _storageProfileId;
39+
private TagPropagationMode _tagPropagationMode;
3940
private CustomerManagedWorkerCapabilities _workerCapabilities;
4041

4142
/// <summary>
@@ -75,6 +76,35 @@ internal bool IsSetStorageProfileId()
7576
return this._storageProfileId != null;
7677
}
7778

79+
/// <summary>
80+
/// Gets and sets the property TagPropagationMode.
81+
/// <para>
82+
/// Specifies whether tags associated with a fleet are attached to workers when the worker
83+
/// is launched.
84+
/// </para>
85+
///
86+
/// <para>
87+
/// When the <c>tagPropagationMode</c> is set to <c>PROPAGATE_TAGS_TO_WORKERS_AT_LAUNCH</c>
88+
/// any tag associated with a fleet is attached to workers when they launch. If the tags
89+
/// for a fleet change, the tags associated with running workers <b>do not</b> change.
90+
/// </para>
91+
///
92+
/// <para>
93+
/// If you don't specify <c>tagPropagationMode</c>, the default is <c>NO_PROPAGATION</c>.
94+
/// </para>
95+
/// </summary>
96+
public TagPropagationMode TagPropagationMode
97+
{
98+
get { return this._tagPropagationMode; }
99+
set { this._tagPropagationMode = value; }
100+
}
101+
102+
// Check to see if TagPropagationMode property is set
103+
internal bool IsSetTagPropagationMode()
104+
{
105+
return this._tagPropagationMode != null;
106+
}
107+
78108
/// <summary>
79109
/// Gets and sets the property WorkerCapabilities.
80110
/// <para>

sdk/src/Services/Deadline/Generated/Model/Internal/MarshallTransformations/CreateWorkerRequestMarshaller.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,20 @@ public IRequest Marshall(CreateWorkerRequest publicRequest)
9090
context.Writer.WriteEndObject();
9191
}
9292

93+
if(publicRequest.IsSetTags())
94+
{
95+
context.Writer.WritePropertyName("tags");
96+
context.Writer.WriteStartObject();
97+
foreach (var publicRequestTagsKvp in publicRequest.Tags)
98+
{
99+
context.Writer.WritePropertyName(publicRequestTagsKvp.Key);
100+
var publicRequestTagsValue = publicRequestTagsKvp.Value;
101+
102+
context.Writer.WriteStringValue(publicRequestTagsValue);
103+
}
104+
context.Writer.WriteEndObject();
105+
}
106+
93107
writer.WriteEndObject();
94108
writer.Flush();
95109
// ToArray() must be called here because aspects of sigv4 signing require a byte array

sdk/src/Services/Deadline/Generated/Model/Internal/MarshallTransformations/CustomerManagedFleetConfigurationMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ public void Marshall(CustomerManagedFleetConfiguration requestObject, JsonMarsha
5858
context.Writer.WriteStringValue(requestObject.StorageProfileId);
5959
}
6060

61+
if(requestObject.IsSetTagPropagationMode())
62+
{
63+
context.Writer.WritePropertyName("tagPropagationMode");
64+
context.Writer.WriteStringValue(requestObject.TagPropagationMode);
65+
}
66+
6167
if(requestObject.IsSetWorkerCapabilities())
6268
{
6369
context.Writer.WritePropertyName("workerCapabilities");

sdk/src/Services/Deadline/Generated/Model/Internal/MarshallTransformations/CustomerManagedFleetConfigurationUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ public CustomerManagedFleetConfiguration Unmarshall(JsonUnmarshallerContext cont
6868
unmarshalledObject.StorageProfileId = unmarshaller.Unmarshall(context, ref reader);
6969
continue;
7070
}
71+
if (context.TestExpression("tagPropagationMode", targetDepth))
72+
{
73+
var unmarshaller = StringUnmarshaller.Instance;
74+
unmarshalledObject.TagPropagationMode = unmarshaller.Unmarshall(context, ref reader);
75+
continue;
76+
}
7177
if (context.TestExpression("workerCapabilities", targetDepth))
7278
{
7379
var unmarshaller = CustomerManagedWorkerCapabilitiesUnmarshaller.Instance;

0 commit comments

Comments
 (0)