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 (within the constraints of eventual consistency) 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 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', name='string' )
- Parameters:
policyStoreId (string) –
[REQUIRED]
Specifies the ID of the policy store that contains the policy template that you want to update.
To specify a policy store, use its ID or alias name. When using an alias name, prefix it with
policy-store-alias/. For example:ID:
PSEXAMPLEabcdefg111111Alias name:
policy-store-alias/example-policy-store
To view aliases, use ListPolicyStoreAliases.
policyTemplateId (string) –
[REQUIRED]
Specifies the ID of the policy template that you want to update.
You can use the policy template name in place of the policy template ID. When using a name, prefix it with
name/. For example:ID:
PTEXAMPLEabcdefg111111Name:
name/example-policy-template
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
actionreferenced by the policy template.Any conditional clauses, such as
whenorunlessclauses.
You can’t change the following elements:
The effect (
permitorforbid) of the policy template.The
principalreferenced by the policy template.The
resourcereferenced by the policy template.
name (string) –
Specifies a name for the policy template that is unique among all policy templates within the policy store. You can use the name in place of the policy template ID in API operations that reference the policy template. The name must be prefixed with
name/.Note
If you don’t include the name in an update request, the existing name is unchanged. To remove a name, set it to an empty string (
"").If you specify a name that is already associated with another policy template in the policy store, you receive a
ConflictExceptionerror.
- 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.ValidationExceptionVerifiedPermissions.Client.exceptions.ConflictExceptionVerifiedPermissions.Client.exceptions.AccessDeniedExceptionVerifiedPermissions.Client.exceptions.ResourceNotFoundExceptionVerifiedPermissions.Client.exceptions.ThrottlingExceptionVerifiedPermissions.Client.exceptions.InternalServerException