Skip to content

Commit 2714779

Browse files
author
AWS
committed
Amazon Verified Permissions Update: Amazon Verified Permissions / Features : Adds support for datetime and duration attribute values.
1 parent ea2f3fa commit 2714779

File tree

2 files changed

+35
-13
lines changed

2 files changed

+35
-13
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Verified Permissions",
4+
"contributor": "",
5+
"description": "Amazon Verified Permissions / Features : Adds support for datetime and duration attribute values."
6+
}

services/verifiedpermissions/src/main/resources/codegen-resources/service-2.json

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,14 @@
641641
"decimal":{
642642
"shape":"Decimal",
643643
"documentation":"<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>"
644+
},
645+
"datetime":{
646+
"shape":"DatetimeAttribute",
647+
"documentation":"<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>"
648+
},
649+
"duration":{
650+
"shape":"Duration",
651+
"documentation":"<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>"
644652
}
645653
},
646654
"documentation":"<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>",
@@ -1431,6 +1439,13 @@
14311439
}
14321440
}
14331441
},
1442+
"DatetimeAttribute":{
1443+
"type":"string",
1444+
"max":28,
1445+
"min":10,
1446+
"pattern":"\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?(Z|[+-]\\d{4}))?",
1447+
"sensitive":true
1448+
},
14341449
"Decimal":{
14351450
"type":"string",
14361451
"max":23,
@@ -1464,8 +1479,7 @@
14641479
},
14651480
"DeleteIdentitySourceOutput":{
14661481
"type":"structure",
1467-
"members":{
1468-
}
1482+
"members":{}
14691483
},
14701484
"DeletePolicyInput":{
14711485
"type":"structure",
@@ -1486,8 +1500,7 @@
14861500
},
14871501
"DeletePolicyOutput":{
14881502
"type":"structure",
1489-
"members":{
1490-
}
1503+
"members":{}
14911504
},
14921505
"DeletePolicyStoreInput":{
14931506
"type":"structure",
@@ -1501,8 +1514,7 @@
15011514
},
15021515
"DeletePolicyStoreOutput":{
15031516
"type":"structure",
1504-
"members":{
1505-
}
1517+
"members":{}
15061518
},
15071519
"DeletePolicyTemplateInput":{
15081520
"type":"structure",
@@ -1523,8 +1535,7 @@
15231535
},
15241536
"DeletePolicyTemplateOutput":{
15251537
"type":"structure",
1526-
"members":{
1527-
}
1538+
"members":{}
15281539
},
15291540
"DeletionProtection":{
15301541
"type":"string",
@@ -1554,6 +1565,13 @@
15541565
"min":1,
15551566
"pattern":"https://.*"
15561567
},
1568+
"Duration":{
1569+
"type":"string",
1570+
"max":100,
1571+
"min":2,
1572+
"pattern":"-?(\\d+d)?(\\d+h)?(\\d+m)?(\\d+s)?(\\d+ms)?",
1573+
"sensitive":true
1574+
},
15571575
"EntitiesDefinition":{
15581576
"type":"structure",
15591577
"members":{
@@ -3190,8 +3208,7 @@
31903208
},
31913209
"TagResourceOutput":{
31923210
"type":"structure",
3193-
"members":{
3194-
}
3211+
"members":{}
31953212
},
31963213
"TagValue":{
31973214
"type":"string",
@@ -3253,7 +3270,7 @@
32533270
"documentation":"<p>The resource associated with this template-linked policy. Verified Permissions substitutes this resource for the <code>?resource</code> placeholder in the policy template when it evaluates an authorization request.</p>"
32543271
}
32553272
},
3256-
"documentation":"<p>Contains information about a policy created by instantiating a policy template. </p> <p>This </p>"
3273+
"documentation":"<p>Contains information about a policy created by instantiating a policy template. </p>"
32573274
},
32583275
"ThrottlingException":{
32593276
"type":"structure",
@@ -3312,8 +3329,7 @@
33123329
},
33133330
"UntagResourceOutput":{
33143331
"type":"structure",
3315-
"members":{
3316-
}
3332+
"members":{}
33173333
},
33183334
"UpdateCognitoGroupConfiguration":{
33193335
"type":"structure",

0 commit comments

Comments
 (0)