Skip to content

Commit 5827070

Browse files
Amazon Verified Permissions / Features : Adds support for tagging policy stores.
1 parent 5c73906 commit 5827070

36 files changed

+4760
-79
lines changed

docgenerator/AWSSDKDocSamples/VerifiedPermissions.GeneratedSamples.extra.xml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,25 @@ permit(
526526
</example>
527527
</value>
528528
</doc>
529+
<doc>
530+
<members>
531+
<member name="M:Amazon.VerifiedPermissions.IAmazonVerifiedPermissions.ListTagsForResource(Amazon.VerifiedPermissions.Model.ListTagsForResourceRequest)" />
532+
<member name="M:Amazon.VerifiedPermissions.AmazonVerifiedPermissionsClient.ListTagsForResource(Amazon.VerifiedPermissions.Model.ListTagsForResourceRequest)" />
533+
<member name="T:Amazon.VerifiedPermissions.Model.ListTagsForResourceRequest" />
534+
<member name="T:Amazon.VerifiedPermissions.Model.ListTagsForResourceResponse" />
535+
</members>
536+
<value>
537+
<example>
538+
<para>
539+
The following example lists all the tags for the resource named in the API call.
540+
</para>
541+
<code
542+
title="ListTagsForResource"
543+
source=".\AWSSDKDocSamples\VerifiedPermissions\VerifiedPermissions.GeneratedSamples.cs"
544+
region="example-1" />
545+
</example>
546+
</value>
547+
</doc>
529548
<doc>
530549
<members>
531550
<member name="M:Amazon.VerifiedPermissions.IAmazonVerifiedPermissions.PutSchema(Amazon.VerifiedPermissions.Model.PutSchemaRequest)" />
@@ -550,6 +569,44 @@ Example strings might be displayed wrapped across multiple lines here for readab
550569
</example>
551570
</value>
552571
</doc>
572+
<doc>
573+
<members>
574+
<member name="M:Amazon.VerifiedPermissions.IAmazonVerifiedPermissions.TagResource(Amazon.VerifiedPermissions.Model.TagResourceRequest)" />
575+
<member name="M:Amazon.VerifiedPermissions.AmazonVerifiedPermissionsClient.TagResource(Amazon.VerifiedPermissions.Model.TagResourceRequest)" />
576+
<member name="T:Amazon.VerifiedPermissions.Model.TagResourceRequest" />
577+
<member name="T:Amazon.VerifiedPermissions.Model.TagResourceResponse" />
578+
</members>
579+
<value>
580+
<example>
581+
<para>
582+
The following example tags the resource.
583+
</para>
584+
<code
585+
title="TagResource"
586+
source=".\AWSSDKDocSamples\VerifiedPermissions\VerifiedPermissions.GeneratedSamples.cs"
587+
region="example-1" />
588+
</example>
589+
</value>
590+
</doc>
591+
<doc>
592+
<members>
593+
<member name="M:Amazon.VerifiedPermissions.IAmazonVerifiedPermissions.UntagResource(Amazon.VerifiedPermissions.Model.UntagResourceRequest)" />
594+
<member name="M:Amazon.VerifiedPermissions.AmazonVerifiedPermissionsClient.UntagResource(Amazon.VerifiedPermissions.Model.UntagResourceRequest)" />
595+
<member name="T:Amazon.VerifiedPermissions.Model.UntagResourceRequest" />
596+
<member name="T:Amazon.VerifiedPermissions.Model.UntagResourceResponse" />
597+
</members>
598+
<value>
599+
<example>
600+
<para>
601+
The following example removes the listed tags from the resource.
602+
</para>
603+
<code
604+
title="UntagResource"
605+
source=".\AWSSDKDocSamples\VerifiedPermissions\VerifiedPermissions.GeneratedSamples.cs"
606+
region="example-1" />
607+
</example>
608+
</value>
609+
</doc>
553610
<doc>
554611
<members>
555612
<member name="M:Amazon.VerifiedPermissions.IAmazonVerifiedPermissions.UpdateIdentitySource(Amazon.VerifiedPermissions.Model.UpdateIdentitySourceRequest)" />

docgenerator/AWSSDKDocSamples/VerifiedPermissions/VerifiedPermissions.GeneratedSamples.cs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,21 @@ public void VerifiedPermissionsListPolicyTemplates()
715715
#endregion
716716
}
717717

718+
public void VerifiedPermissionsListTagsForResource()
719+
{
720+
#region example-1
721+
722+
var client = new AmazonVerifiedPermissionsClient();
723+
var response = client.ListTagsForResource(new ListTagsForResourceRequest
724+
{
725+
ResourceArn = "C7v5xMplfFH3i3e4Jrzb1a"
726+
});
727+
728+
Dictionary<string, string> tags = response.Tags;
729+
730+
#endregion
731+
}
732+
718733
public void VerifiedPermissionsPutSchema()
719734
{
720735
#region example-1
@@ -734,6 +749,42 @@ public void VerifiedPermissionsPutSchema()
734749
#endregion
735750
}
736751

752+
public void VerifiedPermissionsTagResource()
753+
{
754+
#region example-1
755+
756+
var client = new AmazonVerifiedPermissionsClient();
757+
var response = client.TagResource(new TagResourceRequest
758+
{
759+
ResourceArn = "C7v5xMplfFH3i3e4Jrzb1a",
760+
Tags = new Dictionary<string, string> {
761+
{ "key1", "value1" },
762+
{ "key2", "value2" }
763+
}
764+
});
765+
766+
767+
#endregion
768+
}
769+
770+
public void VerifiedPermissionsUntagResource()
771+
{
772+
#region example-1
773+
774+
var client = new AmazonVerifiedPermissionsClient();
775+
var response = client.UntagResource(new UntagResourceRequest
776+
{
777+
ResourceArn = "C7v5xMplfFH3i3e4Jrzb1a",
778+
TagKeys = new List<string> {
779+
"key1",
780+
"key2"
781+
}
782+
});
783+
784+
785+
#endregion
786+
}
787+
737788
public void VerifiedPermissionsUpdateIdentitySource()
738789
{
739790
#region example-1

generator/ServiceModels/verifiedpermissions/verifiedpermissions-2021-12-01.api.json

Lines changed: 146 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,22 @@
383383
{"shape":"InternalServerException"}
384384
]
385385
},
386+
"ListTagsForResource":{
387+
"name":"ListTagsForResource",
388+
"http":{
389+
"method":"POST",
390+
"requestUri":"/"
391+
},
392+
"input":{"shape":"ListTagsForResourceInput"},
393+
"output":{"shape":"ListTagsForResourceOutput"},
394+
"errors":[
395+
{"shape":"ValidationException"},
396+
{"shape":"AccessDeniedException"},
397+
{"shape":"ResourceNotFoundException"},
398+
{"shape":"ThrottlingException"},
399+
{"shape":"InternalServerException"}
400+
]
401+
},
386402
"PutSchema":{
387403
"name":"PutSchema",
388404
"http":{
@@ -402,6 +418,39 @@
402418
],
403419
"idempotent":true
404420
},
421+
"TagResource":{
422+
"name":"TagResource",
423+
"http":{
424+
"method":"POST",
425+
"requestUri":"/"
426+
},
427+
"input":{"shape":"TagResourceInput"},
428+
"output":{"shape":"TagResourceOutput"},
429+
"errors":[
430+
{"shape":"ValidationException"},
431+
{"shape":"TooManyTagsException"},
432+
{"shape":"AccessDeniedException"},
433+
{"shape":"ResourceNotFoundException"},
434+
{"shape":"ThrottlingException"},
435+
{"shape":"InternalServerException"}
436+
]
437+
},
438+
"UntagResource":{
439+
"name":"UntagResource",
440+
"http":{
441+
"method":"POST",
442+
"requestUri":"/"
443+
},
444+
"input":{"shape":"UntagResourceInput"},
445+
"output":{"shape":"UntagResourceOutput"},
446+
"errors":[
447+
{"shape":"ValidationException"},
448+
{"shape":"AccessDeniedException"},
449+
{"shape":"ResourceNotFoundException"},
450+
{"shape":"ThrottlingException"},
451+
{"shape":"InternalServerException"}
452+
]
453+
},
405454
"UpdateIdentitySource":{
406455
"name":"UpdateIdentitySource",
407456
"http":{
@@ -514,6 +563,11 @@
514563
"pattern":"Action$|^.+::Action",
515564
"sensitive":true
516565
},
566+
"AmazonResourceName":{
567+
"type":"string",
568+
"max":2048,
569+
"min":1
570+
},
517571
"AttributeValue":{
518572
"type":"structure",
519573
"members":{
@@ -742,6 +796,13 @@
742796
"type":"string",
743797
"sensitive":true
744798
},
799+
"CedarVersion":{
800+
"type":"string",
801+
"enum":[
802+
"CEDAR_2",
803+
"CEDAR_4"
804+
]
805+
},
745806
"Claim":{
746807
"type":"string",
747808
"min":1,
@@ -943,7 +1004,8 @@
9431004
},
9441005
"validationSettings":{"shape":"ValidationSettings"},
9451006
"description":{"shape":"PolicyStoreDescription"},
946-
"deletionProtection":{"shape":"DeletionProtection"}
1007+
"deletionProtection":{"shape":"DeletionProtection"},
1008+
"tags":{"shape":"TagMap"}
9471009
}
9481010
},
9491011
"CreatePolicyStoreOutput":{
@@ -1239,7 +1301,8 @@
12391301
"type":"structure",
12401302
"required":["policyStoreId"],
12411303
"members":{
1242-
"policyStoreId":{"shape":"PolicyStoreId"}
1304+
"policyStoreId":{"shape":"PolicyStoreId"},
1305+
"tags":{"shape":"Boolean"}
12431306
}
12441307
},
12451308
"GetPolicyStoreOutput":{
@@ -1258,7 +1321,9 @@
12581321
"createdDate":{"shape":"TimestampFormat"},
12591322
"lastUpdatedDate":{"shape":"TimestampFormat"},
12601323
"description":{"shape":"PolicyStoreDescription"},
1261-
"deletionProtection":{"shape":"DeletionProtection"}
1324+
"deletionProtection":{"shape":"DeletionProtection"},
1325+
"cedarVersion":{"shape":"CedarVersion"},
1326+
"tags":{"shape":"TagMap"}
12621327
}
12631328
},
12641329
"GetPolicyTemplateInput":{
@@ -1581,6 +1646,19 @@
15811646
"policyTemplates":{"shape":"PolicyTemplatesList"}
15821647
}
15831648
},
1649+
"ListTagsForResourceInput":{
1650+
"type":"structure",
1651+
"required":["resourceArn"],
1652+
"members":{
1653+
"resourceArn":{"shape":"AmazonResourceName"}
1654+
}
1655+
},
1656+
"ListTagsForResourceOutput":{
1657+
"type":"structure",
1658+
"members":{
1659+
"tags":{"shape":"TagMap"}
1660+
}
1661+
},
15841662
"LongAttribute":{
15851663
"type":"long",
15861664
"box":true,
@@ -1843,7 +1921,7 @@
18431921
"type":"string",
18441922
"max":200,
18451923
"min":1,
1846-
"pattern":"[a-zA-Z0-9-]*"
1924+
"pattern":"[a-zA-Z0-9-/_]*"
18471925
},
18481926
"PolicyStoreItem":{
18491927
"type":"structure",
@@ -1874,7 +1952,7 @@
18741952
"type":"string",
18751953
"max":200,
18761954
"min":1,
1877-
"pattern":"[a-zA-Z0-9-]*"
1955+
"pattern":"[a-zA-Z0-9-/_]*"
18781956
},
18791957
"PolicyTemplateItem":{
18801958
"type":"structure",
@@ -2050,6 +2128,45 @@
20502128
"type":"string",
20512129
"sensitive":true
20522130
},
2131+
"TagKey":{
2132+
"type":"string",
2133+
"max":128,
2134+
"min":1
2135+
},
2136+
"TagKeyList":{
2137+
"type":"list",
2138+
"member":{"shape":"TagKey"},
2139+
"max":200,
2140+
"min":1
2141+
},
2142+
"TagMap":{
2143+
"type":"map",
2144+
"key":{"shape":"TagKey"},
2145+
"value":{"shape":"TagValue"},
2146+
"max":200,
2147+
"min":0
2148+
},
2149+
"TagResourceInput":{
2150+
"type":"structure",
2151+
"required":[
2152+
"resourceArn",
2153+
"tags"
2154+
],
2155+
"members":{
2156+
"resourceArn":{"shape":"AmazonResourceName"},
2157+
"tags":{"shape":"TagMap"}
2158+
}
2159+
},
2160+
"TagResourceOutput":{
2161+
"type":"structure",
2162+
"members":{
2163+
}
2164+
},
2165+
"TagValue":{
2166+
"type":"string",
2167+
"max":256,
2168+
"min":0
2169+
},
20532170
"TemplateLinkedPolicyDefinition":{
20542171
"type":"structure",
20552172
"required":["policyTemplateId"],
@@ -2099,6 +2216,30 @@
20992216
"pattern":"[A-Za-z0-9-_=]+.[A-Za-z0-9-_=]+.[A-Za-z0-9-_=]+",
21002217
"sensitive":true
21012218
},
2219+
"TooManyTagsException":{
2220+
"type":"structure",
2221+
"members":{
2222+
"message":{"shape":"String"},
2223+
"resourceName":{"shape":"AmazonResourceName"}
2224+
},
2225+
"exception":true
2226+
},
2227+
"UntagResourceInput":{
2228+
"type":"structure",
2229+
"required":[
2230+
"resourceArn",
2231+
"tagKeys"
2232+
],
2233+
"members":{
2234+
"resourceArn":{"shape":"AmazonResourceName"},
2235+
"tagKeys":{"shape":"TagKeyList"}
2236+
}
2237+
},
2238+
"UntagResourceOutput":{
2239+
"type":"structure",
2240+
"members":{
2241+
}
2242+
},
21022243
"UpdateCognitoGroupConfiguration":{
21032244
"type":"structure",
21042245
"required":["groupEntityType"],

0 commit comments

Comments
 (0)