VerifiedPermissions / Client / update_policy_template
update_policy_template#
- VerifiedPermissions.Client.update_policy_template(**kwargs)#
Updates the specified policy template. You can update only the description and the some elements of the policyBody.
Warning
Changes you make to the policy template content are immediately reflected in authorization decisions that involve all template-linked policies instantiated from this template.
Note
Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to be propagate through the service and be visible in the results of other Verified Permissions operations.
See also: AWS API Documentation
Request Syntax
response = client.update_policy_template( policyStoreId='string', policyTemplateId='string', description='string', statement='string' )
- Parameters:
policyStoreId (string) –
[REQUIRED]
Specifies the ID of the policy store that contains the policy template that you want to update.
policyTemplateId (string) –
[REQUIRED]
Specifies the ID of the policy template that you want to update.
description (string) – Specifies a new description to apply to the policy template.
statement (string) –
[REQUIRED]
Specifies new statement content written in Cedar policy language to replace the current body of the policy template.
You can change only the following elements of the policy body:
The
action
referenced by the policy template.Any conditional clauses, such as
when
orunless
clauses.
You can’t change the following elements:
The effect (
permit
orforbid
) of the policy template.The
principal
referenced by the policy template.The
resource
referenced by the policy template.
- Return type:
dict
- Returns:
Response Syntax
{ 'policyStoreId': 'string', 'policyTemplateId': 'string', 'createdDate': datetime(2015, 1, 1), 'lastUpdatedDate': datetime(2015, 1, 1) }
Response Structure
(dict) –
policyStoreId (string) –
The ID of the policy store that contains the updated policy template.
policyTemplateId (string) –
The ID of the updated policy template.
createdDate (datetime) –
The date and time that the policy template was originally created.
lastUpdatedDate (datetime) –
The date and time that the policy template was most recently updated.
Exceptions
VerifiedPermissions.Client.exceptions.ValidationException
VerifiedPermissions.Client.exceptions.ConflictException
VerifiedPermissions.Client.exceptions.AccessDeniedException
VerifiedPermissions.Client.exceptions.ResourceNotFoundException
VerifiedPermissions.Client.exceptions.ThrottlingException
VerifiedPermissions.Client.exceptions.InternalServerException