Skip to content

Commit fdc901a

Browse files
Add Tagging feature to resources in the Managed Entitlements service. License and Grant resources can now be tagged.
1 parent 20b58f1 commit fdc901a

26 files changed

+445
-86
lines changed

generator/ServiceModels/license-manager/license-manager-2018-08-01.api.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
"endpointPrefix":"license-manager",
66
"jsonVersion":"1.1",
77
"protocol":"json",
8+
"protocols":["json"],
89
"serviceFullName":"AWS License Manager",
910
"serviceId":"License Manager",
1011
"signatureVersion":"v4",
1112
"targetPrefix":"AWSLicenseManager",
12-
"uid":"license-manager-2018-08-01"
13+
"uid":"license-manager-2018-08-01",
14+
"auth":["aws.auth#sigv4"]
1315
},
1416
"operations":{
1517
"AcceptGrant":{
@@ -834,7 +836,8 @@
834836
{"shape":"AuthorizationException"},
835837
{"shape":"AccessDeniedException"},
836838
{"shape":"RateLimitExceededException"},
837-
{"shape":"ResourceLimitExceededException"}
839+
{"shape":"ResourceLimitExceededException"},
840+
{"shape":"ConflictException"}
838841
]
839842
},
840843
"UpdateLicenseManagerReportGenerator":{
@@ -871,7 +874,8 @@
871874
{"shape":"ServerInternalException"},
872875
{"shape":"AuthorizationException"},
873876
{"shape":"AccessDeniedException"},
874-
{"shape":"RateLimitExceededException"}
877+
{"shape":"RateLimitExceededException"},
878+
{"shape":"ConflictException"}
875879
]
876880
},
877881
"UpdateServiceSettings":{
@@ -936,7 +940,7 @@
936940
"AllowedOperationList":{
937941
"type":"list",
938942
"member":{"shape":"AllowedOperation"},
939-
"max":7,
943+
"max":8,
940944
"min":1
941945
},
942946
"Arn":{
@@ -1110,7 +1114,8 @@
11101114
"LicenseArn":{"shape":"Arn"},
11111115
"Principals":{"shape":"PrincipalArnList"},
11121116
"HomeRegion":{"shape":"String"},
1113-
"AllowedOperations":{"shape":"AllowedOperationList"}
1117+
"AllowedOperations":{"shape":"AllowedOperationList"},
1118+
"Tags":{"shape":"TagList"}
11141119
}
11151120
},
11161121
"CreateGrantResponse":{
@@ -1239,7 +1244,8 @@
12391244
"Beneficiary":{"shape":"String"},
12401245
"ConsumptionConfiguration":{"shape":"ConsumptionConfiguration"},
12411246
"LicenseMetadata":{"shape":"MetadataList"},
1242-
"ClientToken":{"shape":"ClientToken"}
1247+
"ClientToken":{"shape":"ClientToken"},
1248+
"Tags":{"shape":"TagList"}
12431249
}
12441250
},
12451251
"CreateLicenseResponse":{

generator/ServiceModels/license-manager/license-manager-2018-08-01.docs.json

Lines changed: 15 additions & 13 deletions
Large diffs are not rendered by default.

generator/ServiceModels/license-manager/license-manager-2018-08-01.normal.json

Lines changed: 29 additions & 17 deletions
Large diffs are not rendered by default.

sdk/src/Services/LicenseManager/Generated/Model/CreateGrantRequest.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@ public partial class CreateGrantRequest : AmazonLicenseManagerRequest
4444
private string _homeRegion;
4545
private string _licenseArn;
4646
private List<string> _principals = AWSConfigs.InitializeCollections ? new List<string>() : null;
47+
private List<Tag> _tags = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
4748

4849
/// <summary>
4950
/// Gets and sets the property AllowedOperations.
5051
/// <para>
5152
/// Allowed operations for the grant.
5253
/// </para>
5354
/// </summary>
54-
[AWSProperty(Required=true, Min=1, Max=7)]
55+
[AWSProperty(Required=true, Min=1, Max=8)]
5556
public List<string> AllowedOperations
5657
{
5758
get { return this._allowedOperations; }
@@ -174,5 +175,25 @@ internal bool IsSetPrincipals()
174175
return this._principals != null && (this._principals.Count > 0 || !AWSConfigs.InitializeCollections);
175176
}
176177

178+
/// <summary>
179+
/// Gets and sets the property Tags.
180+
/// <para>
181+
/// Tags to add to the grant. For more information about tagging support in License Manager,
182+
/// see the <a href="https://docs.aws.amazon.com/license-manager/latest/APIReference/API_TagResource.html">TagResource</a>
183+
/// operation.
184+
/// </para>
185+
/// </summary>
186+
public List<Tag> Tags
187+
{
188+
get { return this._tags; }
189+
set { this._tags = value; }
190+
}
191+
192+
// Check to see if Tags property is set
193+
internal bool IsSetTags()
194+
{
195+
return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections);
196+
}
197+
177198
}
178199
}

sdk/src/Services/LicenseManager/Generated/Model/CreateGrantVersionRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public partial class CreateGrantVersionRequest : AmazonLicenseManagerRequest
5151
/// Allowed operations for the grant.
5252
/// </para>
5353
/// </summary>
54-
[AWSProperty(Min=1, Max=7)]
54+
[AWSProperty(Min=1, Max=8)]
5555
public List<string> AllowedOperations
5656
{
5757
get { return this._allowedOperations; }

sdk/src/Services/LicenseManager/Generated/Model/CreateLicenseConfigurationRequest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ internal bool IsSetLicenseCountingType()
160160
/// </para>
161161
/// </li> <li>
162162
/// <para>
163-
/// <c>Instances</c> dimension: <c>allowedTenancy</c> | <c>maximumCores</c> | <c>minimumCores</c>
164-
/// | <c>maximumSockets</c> | <c>minimumSockets</c> | <c>maximumVcpus</c> | <c>minimumVcpus</c>
163+
/// <c>Instances</c> dimension: <c>allowedTenancy</c> | <c>maximumVcpus</c> | <c>minimumVcpus</c>
165164
///
166165
/// </para>
167166
/// </li> <li>

sdk/src/Services/LicenseManager/Generated/Model/CreateLicenseRequest.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public partial class CreateLicenseRequest : AmazonLicenseManagerRequest
4545
private string _licenseName;
4646
private string _productName;
4747
private string _productSKU;
48+
private List<Tag> _tags = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
4849
private DatetimeRange _validity;
4950

5051
/// <summary>
@@ -239,6 +240,26 @@ internal bool IsSetProductSKU()
239240
return this._productSKU != null;
240241
}
241242

243+
/// <summary>
244+
/// Gets and sets the property Tags.
245+
/// <para>
246+
/// Tags to add to the license. For more information about tagging support in License
247+
/// Manager, see the <a href="https://docs.aws.amazon.com/license-manager/latest/APIReference/API_TagResource.html">TagResource</a>
248+
/// operation.
249+
/// </para>
250+
/// </summary>
251+
public List<Tag> Tags
252+
{
253+
get { return this._tags; }
254+
set { this._tags = value; }
255+
}
256+
257+
// Check to see if Tags property is set
258+
internal bool IsSetTags()
259+
{
260+
return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections);
261+
}
262+
242263
/// <summary>
243264
/// Gets and sets the property Validity.
244265
/// <para>

sdk/src/Services/LicenseManager/Generated/Model/Grant.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ internal bool IsSetGrantArn()
7171
/// Granted operations.
7272
/// </para>
7373
/// </summary>
74-
[AWSProperty(Required=true, Min=1, Max=7)]
74+
[AWSProperty(Required=true, Min=1, Max=8)]
7575
public List<string> GrantedOperations
7676
{
7777
get { return this._grantedOperations; }

sdk/src/Services/LicenseManager/Generated/Model/Internal/MarshallTransformations/CreateGrantRequestMarshaller.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,22 @@ public IRequest Marshall(CreateGrantRequest publicRequest)
115115
context.Writer.WriteArrayEnd();
116116
}
117117

118+
if(publicRequest.IsSetTags())
119+
{
120+
context.Writer.WritePropertyName("Tags");
121+
context.Writer.WriteArrayStart();
122+
foreach(var publicRequestTagsListValue in publicRequest.Tags)
123+
{
124+
context.Writer.WriteObjectStart();
125+
126+
var marshaller = TagMarshaller.Instance;
127+
marshaller.Marshall(publicRequestTagsListValue, context);
128+
129+
context.Writer.WriteObjectEnd();
130+
}
131+
context.Writer.WriteArrayEnd();
132+
}
133+
118134
writer.WriteObjectEnd();
119135
string snippet = stringWriter.ToString();
120136
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);

sdk/src/Services/LicenseManager/Generated/Model/Internal/MarshallTransformations/CreateLicenseRequestMarshaller.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,22 @@ public IRequest Marshall(CreateLicenseRequest publicRequest)
159159
context.Writer.Write(publicRequest.ProductSKU);
160160
}
161161

162+
if(publicRequest.IsSetTags())
163+
{
164+
context.Writer.WritePropertyName("Tags");
165+
context.Writer.WriteArrayStart();
166+
foreach(var publicRequestTagsListValue in publicRequest.Tags)
167+
{
168+
context.Writer.WriteObjectStart();
169+
170+
var marshaller = TagMarshaller.Instance;
171+
marshaller.Marshall(publicRequestTagsListValue, context);
172+
173+
context.Writer.WriteObjectEnd();
174+
}
175+
context.Writer.WriteArrayEnd();
176+
}
177+
162178
if(publicRequest.IsSetValidity())
163179
{
164180
context.Writer.WritePropertyName("Validity");

0 commit comments

Comments
 (0)