Skip to content

Commit a66d0d7

Browse files
Amazon Verified Permissions / Features : Adds support for entity Cedar tags.
1 parent 409f180 commit a66d0d7

File tree

9 files changed

+738
-57
lines changed

9 files changed

+738
-57
lines changed

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

Lines changed: 62 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
{"shape":"AccessDeniedException"},
2929
{"shape":"ThrottlingException"},
3030
{"shape":"InternalServerException"}
31-
]
31+
],
32+
"readonly":true
3233
},
3334
"BatchIsAuthorized":{
3435
"name":"BatchIsAuthorized",
@@ -44,7 +45,8 @@
4445
{"shape":"ResourceNotFoundException"},
4546
{"shape":"ThrottlingException"},
4647
{"shape":"InternalServerException"}
47-
]
48+
],
49+
"readonly":true
4850
},
4951
"BatchIsAuthorizedWithToken":{
5052
"name":"BatchIsAuthorizedWithToken",
@@ -60,7 +62,8 @@
6062
{"shape":"ResourceNotFoundException"},
6163
{"shape":"ThrottlingException"},
6264
{"shape":"InternalServerException"}
63-
]
65+
],
66+
"readonly":true
6467
},
6568
"CreateIdentitySource":{
6669
"name":"CreateIdentitySource",
@@ -222,7 +225,8 @@
222225
{"shape":"ResourceNotFoundException"},
223226
{"shape":"ThrottlingException"},
224227
{"shape":"InternalServerException"}
225-
]
228+
],
229+
"readonly":true
226230
},
227231
"GetPolicy":{
228232
"name":"GetPolicy",
@@ -238,7 +242,8 @@
238242
{"shape":"ResourceNotFoundException"},
239243
{"shape":"ThrottlingException"},
240244
{"shape":"InternalServerException"}
241-
]
245+
],
246+
"readonly":true
242247
},
243248
"GetPolicyStore":{
244249
"name":"GetPolicyStore",
@@ -254,7 +259,8 @@
254259
{"shape":"ResourceNotFoundException"},
255260
{"shape":"ThrottlingException"},
256261
{"shape":"InternalServerException"}
257-
]
262+
],
263+
"readonly":true
258264
},
259265
"GetPolicyTemplate":{
260266
"name":"GetPolicyTemplate",
@@ -270,7 +276,8 @@
270276
{"shape":"ResourceNotFoundException"},
271277
{"shape":"ThrottlingException"},
272278
{"shape":"InternalServerException"}
273-
]
279+
],
280+
"readonly":true
274281
},
275282
"GetSchema":{
276283
"name":"GetSchema",
@@ -286,7 +293,8 @@
286293
{"shape":"ResourceNotFoundException"},
287294
{"shape":"ThrottlingException"},
288295
{"shape":"InternalServerException"}
289-
]
296+
],
297+
"readonly":true
290298
},
291299
"IsAuthorized":{
292300
"name":"IsAuthorized",
@@ -302,7 +310,8 @@
302310
{"shape":"ResourceNotFoundException"},
303311
{"shape":"ThrottlingException"},
304312
{"shape":"InternalServerException"}
305-
]
313+
],
314+
"readonly":true
306315
},
307316
"IsAuthorizedWithToken":{
308317
"name":"IsAuthorizedWithToken",
@@ -318,7 +327,8 @@
318327
{"shape":"ResourceNotFoundException"},
319328
{"shape":"ThrottlingException"},
320329
{"shape":"InternalServerException"}
321-
]
330+
],
331+
"readonly":true
322332
},
323333
"ListIdentitySources":{
324334
"name":"ListIdentitySources",
@@ -334,7 +344,8 @@
334344
{"shape":"ResourceNotFoundException"},
335345
{"shape":"ThrottlingException"},
336346
{"shape":"InternalServerException"}
337-
]
347+
],
348+
"readonly":true
338349
},
339350
"ListPolicies":{
340351
"name":"ListPolicies",
@@ -350,7 +361,8 @@
350361
{"shape":"ResourceNotFoundException"},
351362
{"shape":"ThrottlingException"},
352363
{"shape":"InternalServerException"}
353-
]
364+
],
365+
"readonly":true
354366
},
355367
"ListPolicyStores":{
356368
"name":"ListPolicyStores",
@@ -365,7 +377,8 @@
365377
{"shape":"AccessDeniedException"},
366378
{"shape":"ThrottlingException"},
367379
{"shape":"InternalServerException"}
368-
]
380+
],
381+
"readonly":true
369382
},
370383
"ListPolicyTemplates":{
371384
"name":"ListPolicyTemplates",
@@ -381,7 +394,8 @@
381394
{"shape":"ResourceNotFoundException"},
382395
{"shape":"ThrottlingException"},
383396
{"shape":"InternalServerException"}
384-
]
397+
],
398+
"readonly":true
385399
},
386400
"ListTagsForResource":{
387401
"name":"ListTagsForResource",
@@ -397,7 +411,8 @@
397411
{"shape":"ResourceNotFoundException"},
398412
{"shape":"ThrottlingException"},
399413
{"shape":"InternalServerException"}
400-
]
414+
],
415+
"readonly":true
401416
},
402417
"PutSchema":{
403418
"name":"PutSchema",
@@ -798,6 +813,31 @@
798813
"type":"string",
799814
"sensitive":true
800815
},
816+
"CedarTagRecordAttribute":{
817+
"type":"map",
818+
"key":{"shape":"String"},
819+
"value":{"shape":"CedarTagValue"}
820+
},
821+
"CedarTagSetAttribute":{
822+
"type":"list",
823+
"member":{"shape":"CedarTagValue"}
824+
},
825+
"CedarTagValue":{
826+
"type":"structure",
827+
"members":{
828+
"boolean":{"shape":"BooleanAttribute"},
829+
"entityIdentifier":{"shape":"EntityIdentifier"},
830+
"long":{"shape":"LongAttribute"},
831+
"string":{"shape":"StringAttribute"},
832+
"set":{"shape":"CedarTagSetAttribute"},
833+
"record":{"shape":"CedarTagRecordAttribute"},
834+
"ipaddr":{"shape":"IpAddr"},
835+
"decimal":{"shape":"Decimal"},
836+
"datetime":{"shape":"DatetimeAttribute"},
837+
"duration":{"shape":"Duration"}
838+
},
839+
"union":true
840+
},
801841
"CedarVersion":{
802842
"type":"string",
803843
"enum":[
@@ -1177,6 +1217,11 @@
11771217
"key":{"shape":"String"},
11781218
"value":{"shape":"AttributeValue"}
11791219
},
1220+
"EntityCedarTags":{
1221+
"type":"map",
1222+
"key":{"shape":"String"},
1223+
"value":{"shape":"CedarTagValue"}
1224+
},
11801225
"EntityId":{
11811226
"type":"string",
11821227
"max":200,
@@ -1207,7 +1252,8 @@
12071252
"members":{
12081253
"identifier":{"shape":"EntityIdentifier"},
12091254
"attributes":{"shape":"EntityAttributes"},
1210-
"parents":{"shape":"ParentList"}
1255+
"parents":{"shape":"ParentList"},
1256+
"tags":{"shape":"EntityCedarTags"}
12111257
}
12121258
},
12131259
"EntityList":{

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

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
}
8080
},
8181
"AttributeValue": {
82-
"base": "<p>The value of an attribute.</p> <p>Contains information about the runtime context for a request for which an authorization decision is made. </p> <p>This data type is used as a member of the <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ContextDefinition.html\">ContextDefinition</a> structure which is uses as a request parameter for the <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorized.html\">IsAuthorized</a>, <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_BatchIsAuthorized.html\">BatchIsAuthorized</a>, and <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorizedWithToken.html\">IsAuthorizedWithToken</a> operations.</p>",
82+
"base": "<p>The value of an attribute.</p> <p>Contains information about the runtime context for a request for which an authorization decision is made. </p> <p>This data type is used as a member of the <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ContextDefinition.html\">ContextDefinition</a> structure which is used as a request parameter for the <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorized.html\">IsAuthorized</a>, <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_BatchIsAuthorized.html\">BatchIsAuthorized</a>, and <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorizedWithToken.html\">IsAuthorizedWithToken</a> operations.</p>",
8383
"refs": {
8484
"ContextMap$value": null,
8585
"EntityAttributes$value": null,
@@ -228,7 +228,8 @@
228228
"BooleanAttribute": {
229229
"base": null,
230230
"refs": {
231-
"AttributeValue$boolean": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#boolean\">Boolean</a> type.</p> <p>Example: <code>{\"boolean\": true}</code> </p>"
231+
"AttributeValue$boolean": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-bool\">Boolean</a> type.</p> <p>Example: <code>{\"boolean\": true}</code> </p>",
232+
"CedarTagValue$boolean": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-bool\">Boolean</a> type.</p> <p>Example: <code>{\"boolean\": false}</code> </p>"
232233
}
233234
},
234235
"CedarJson": {
@@ -238,6 +239,26 @@
238239
"EntitiesDefinition$cedarJson": "<p>A Cedar JSON string representation of the entities needed to successfully evaluate an authorization request.</p> <p>Example: <code>{\"cedarJson\": \"[{\\\"uid\\\":{\\\"type\\\":\\\"Photo\\\",\\\"id\\\":\\\"VacationPhoto94.jpg\\\"},\\\"attrs\\\":{\\\"accessLevel\\\":\\\"public\\\"},\\\"parents\\\":[]}]\"}</code> </p>"
239240
}
240241
},
242+
"CedarTagRecordAttribute": {
243+
"base": null,
244+
"refs": {
245+
"CedarTagValue$record": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-record\">Record</a> type.</p> <p>Example: <code>{\"record\": { \"keyName\": {} } }</code> </p>"
246+
}
247+
},
248+
"CedarTagSetAttribute": {
249+
"base": null,
250+
"refs": {
251+
"CedarTagValue$set": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-set\">Set</a> type.</p> <p>Example: <code>{\"set\": [ { \"string\": \"abc\" } ] }</code> </p>"
252+
}
253+
},
254+
"CedarTagValue": {
255+
"base": "<p>The value of an entity's Cedar tag.</p> <p>This data type is used as a member of the <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_EntityItem.html\">EntityItem</a> structure that forms the body of the <code>Entities</code> request parameter for the <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorized.html\">IsAuthorized</a>, <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_BatchIsAuthorized.html\">BatchIsAuthorized</a>, <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorizedWithToken.html\">IsAuthorizedWithToken</a>, and <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_BatchIsAuthorizedWithToken.html\">BatchIsAuthorizedWithToken</a> operations.</p>",
256+
"refs": {
257+
"CedarTagRecordAttribute$value": null,
258+
"CedarTagSetAttribute$member": null,
259+
"EntityCedarTags$value": null
260+
}
261+
},
241262
"CedarVersion": {
242263
"base": null,
243264
"refs": {
@@ -390,13 +411,15 @@
390411
"DatetimeAttribute": {
391412
"base": null,
392413
"refs": {
393-
"AttributeValue$datetime": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-datetime\">datetime</a> type.</p> <p>Example: <code>{\"datetime\": \"2024-10-15T11:35:00Z\"}</code> </p>"
414+
"AttributeValue$datetime": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-datetime\">datetime</a> type.</p> <p>Example: <code>{\"datetime\": \"2024-10-15T11:35:00Z\"}</code> </p>",
415+
"CedarTagValue$datetime": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-datetime\">datetime</a> type.</p> <p>Example: <code>{\"datetime\": \"2025-11-04T11:35:00.000+0100\"}</code> </p>"
394416
}
395417
},
396418
"Decimal": {
397419
"base": null,
398420
"refs": {
399-
"AttributeValue$decimal": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-decimal\">decimal</a> type.</p> <p>Example: <code>{\"decimal\": \"1.1\"}</code> </p>"
421+
"AttributeValue$decimal": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-decimal\">decimal</a> type.</p> <p>Example: <code>{\"decimal\": \"1.1\"}</code> </p>",
422+
"CedarTagValue$decimal": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-decimal\">decimal</a> type.</p> <p>Example: <code>{\"decimal\": \"-2.0\"}</code> </p>"
400423
}
401424
},
402425
"Decision": {
@@ -473,7 +496,8 @@
473496
"Duration": {
474497
"base": null,
475498
"refs": {
476-
"AttributeValue$duration": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-duration\">duration</a> type.</p> <p>Example: <code>{\"duration\": \"1h30m\"}</code> </p>"
499+
"AttributeValue$duration": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-duration\">duration</a> type.</p> <p>Example: <code>{\"duration\": \"1h30m\"}</code> </p>",
500+
"CedarTagValue$duration": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-duration\">duration</a> type.</p> <p>Example: <code>{\"duration\": \"-1d12h\"}</code> </p>"
477501
}
478502
},
479503
"EntitiesDefinition": {
@@ -491,6 +515,12 @@
491515
"EntityItem$attributes": "<p>A list of attributes for the entity.</p>"
492516
}
493517
},
518+
"EntityCedarTags": {
519+
"base": null,
520+
"refs": {
521+
"EntityItem$tags": "<p>A list of cedar tags for the entity.</p>"
522+
}
523+
},
494524
"EntityId": {
495525
"base": null,
496526
"refs": {
@@ -509,11 +539,12 @@
509539
"EntityIdentifier": {
510540
"base": "<p>Contains the identifier of an entity, including its ID and type.</p> <p>This data type is used as a request parameter for <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorized.html\">IsAuthorized</a> operation, and as a response parameter for the <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreatePolicy.html\">CreatePolicy</a>, <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_GetPolicy.html\">GetPolicy</a>, and <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicy.html\">UpdatePolicy</a> operations.</p> <p>Example: <code>{\"entityId\":\"<i>string</i>\",\"entityType\":\"<i>string</i>\"}</code> </p>",
511541
"refs": {
512-
"AttributeValue$entityIdentifier": "<p>An attribute value of type <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_EntityIdentifier.html\">EntityIdentifier</a>.</p> <p>Example: <code>\"entityIdentifier\": { \"entityId\": \"&lt;id&gt;\", \"entityType\": \"&lt;entity type&gt;\"}</code> </p>",
542+
"AttributeValue$entityIdentifier": "<p>An attribute value of type <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_EntityIdentifier.html\">EntityIdentifier</a>.</p> <p>Example: <code>{\"entityIdentifier\": { \"entityId\": \"alice\", \"entityType\": \"User\"} }</code> </p>",
513543
"BatchIsAuthorizedInputItem$principal": "<p>Specifies the principal for which the authorization decision is to be made.</p>",
514544
"BatchIsAuthorizedInputItem$resource": "<p>Specifies the resource that you want an authorization decision for. For example, <code>PhotoFlash::Photo</code>.</p>",
515545
"BatchIsAuthorizedWithTokenInputItem$resource": "<p>Specifies the resource that you want an authorization decision for. For example, <code>PhotoFlash::Photo</code>.</p>",
516546
"BatchIsAuthorizedWithTokenOutput$principal": "<p>The identifier of the principal in the ID or access token.</p>",
547+
"CedarTagValue$entityIdentifier": "<p>A Cedar tag value of type <a href=\"https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_EntityIdentifier.html\">EntityIdentifier</a>.</p> <p>Example: <code>{\"entityIdentifier\": { \"entityId\": \"alice\", \"entityType\": \"User\"} }</code> </p>",
517548
"CreatePolicyOutput$principal": "<p>The principal specified in the new policy's scope. This response element isn't present when <code>principal</code> isn't specified in the policy content.</p>",
518549
"CreatePolicyOutput$resource": "<p>The resource specified in the new policy's scope. This response element isn't present when the <code>resource</code> isn't specified in the policy content.</p>",
519550
"EntityItem$identifier": "<p>The identifier of the entity.</p>",
@@ -698,7 +729,8 @@
698729
"IpAddr": {
699730
"base": null,
700731
"refs": {
701-
"AttributeValue$ipaddr": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-ipaddr\">ipaddr</a> type.</p> <p>Example: <code>{\"ip\": \"192.168.1.100\"}</code> </p>"
732+
"AttributeValue$ipaddr": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-ipaddr\">ipaddr</a> type.</p> <p>Example: <code>{\"ip\": \"192.168.1.100\"}</code> </p>",
733+
"CedarTagValue$ipaddr": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-ipaddr\">ipaddr</a> type.</p> <p>Example: <code>{\"ip\": \"10.50.0.0/24\"}</code> </p>"
702734
}
703735
},
704736
"IsAuthorizedInput": {
@@ -777,7 +809,8 @@
777809
"LongAttribute": {
778810
"base": null,
779811
"refs": {
780-
"AttributeValue$long": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#long\">Long</a> type.</p> <p>Example: <code>{\"long\": 0}</code> </p>"
812+
"AttributeValue$long": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-long\">Long</a> type.</p> <p>Example: <code>{\"long\": 0}</code> </p>",
813+
"CedarTagValue$long": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-long\">Long</a> type.</p> <p>Example: <code>{\"long\": 0}</code> </p>"
781814
}
782815
},
783816
"MaxResults": {
@@ -1128,7 +1161,7 @@
11281161
"RecordAttribute": {
11291162
"base": null,
11301163
"refs": {
1131-
"AttributeValue$record": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#record\">Record</a> type.</p> <p>Example: <code>{\"record\": { \"keyName\": {} } }</code> </p>"
1164+
"AttributeValue$record": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-record\">Record</a> type.</p> <p>Example: <code>{\"record\": { \"keyName\": {} } }</code> </p>"
11321165
}
11331166
},
11341167
"ResourceArn": {
@@ -1184,7 +1217,7 @@
11841217
"SetAttribute": {
11851218
"base": null,
11861219
"refs": {
1187-
"AttributeValue$set": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#set\">Set</a> type.</p> <p>Example: <code>{\"set\": [ {} ] }</code> </p>"
1220+
"AttributeValue$set": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-set\">Set</a> type.</p> <p>Example: <code>{\"set\": [ {} ] }</code> </p>"
11881221
}
11891222
},
11901223
"StaticPolicyDefinition": {
@@ -1221,9 +1254,11 @@
12211254
"BatchGetPolicyErrorItem$policyStoreId": "<p>The identifier of the policy store associated with the failed request.</p>",
12221255
"BatchGetPolicyErrorItem$policyId": "<p>The identifier of the policy associated with the failed request.</p>",
12231256
"BatchGetPolicyErrorItem$message": "<p>A detailed error message.</p>",
1257+
"CedarTagRecordAttribute$key": null,
12241258
"ConflictException$message": null,
12251259
"ContextMap$key": null,
12261260
"EntityAttributes$key": null,
1261+
"EntityCedarTags$key": null,
12271262
"EvaluationErrorItem$errorDescription": "<p>The error description.</p>",
12281263
"InternalServerException$message": null,
12291264
"InvalidStateException$message": null,
@@ -1247,7 +1282,8 @@
12471282
"StringAttribute": {
12481283
"base": null,
12491284
"refs": {
1250-
"AttributeValue$string": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#string\">String</a> type.</p> <p>Example: <code>{\"string\": \"abc\"}</code> </p>"
1285+
"AttributeValue$string": "<p>An attribute value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-string\">String</a> type.</p> <p>Example: <code>{\"string\": \"abc\"}</code> </p>",
1286+
"CedarTagValue$string": "<p>A Cedar tag value of <a href=\"https://docs.cedarpolicy.com/policies/syntax-datatypes.html#datatype-string\">String</a> type.</p> <p>Example: <code>{\"string\": \"abc\"}</code> </p>"
12511287
}
12521288
},
12531289
"TagKey": {

0 commit comments

Comments
 (0)