update_policy_store
¶
update_policy_store(
policy_store_id: PolicyStoreId,
validation_settings: ValidationSettings,
*,
config_overrides: Optional[VerifiedPermissionsClientConfig] = None,
deletion_protection: Optional[DeletionProtection] = None,
description: Optional[PolicyStoreDescription] = None,
) -> UpdatePolicyStoreOutput
Modifies the validation setting for a policy store.
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.
Parameters:
-
policy_store_id(PolicyStoreId) –Specifies the ID of the policy store 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:
PSEXAMPLEabcdefg111111 -
Alias name:
policy-store-alias/example-policy-store
To view aliases, use ListPolicyStoreAliases.
-
-
validation_settings(ValidationSettings) –A structure that defines the validation settings that want to enable for the policy store.
-
deletion_protection(Optional[DeletionProtection], default:None) –Specifies whether the policy store can be deleted. If enabled, the policy store can't be deleted.
When you call
UpdatePolicyStore, this parameter is unchanged unless explicitly included in the call. -
description(Optional[PolicyStoreDescription], default:None) –Descriptive text that you can provide to help with identification of the current policy store.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
InternalServerException–The request failed because of an internal error. Try your request again later
-
ThrottlingException–The request failed because it exceeded a throttling quota.
-
ValidationException–The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.
The possible reasons include the following:
-
UnrecognizedEntityType
The policy includes an entity type that isn't found in the schema.
-
UnrecognizedActionId
The policy includes an action id that isn't found in the schema.
-
InvalidActionApplication
The policy includes an action that, according to the schema, doesn't support the specified principal and resource.
-
UnexpectedType
The policy included an operand that isn't a valid type for the specified operation.
-
IncompatibleTypes
The types of elements included in a
set, or the types of expressions used in anif...then...elseclause aren't compatible in this context. -
MissingAttribute
The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.
-
UnsafeOptionalAttributeAccess
The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.
-
ImpossiblePolicy
Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.
-
WrongNumberArguments
The policy references an extension type with the wrong number of arguments.
-
FunctionArgumentValidationError
Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.
-
-
ConflictException–The request failed because another request to modify a resource occurred at the same time.
-
ResourceNotFoundException–The request failed because it references a resource that doesn't exist.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
UpdatePolicyStore The following example turns off the validation settings for a policy store.
>>> client.update_policy_store(policy_store_id='C7v5xMplfFH3i3e4Jrzb1a', validation_settings={'mode': 'OFF'})
Source code in docs_src/capo_verifiedpermissions/_services/verified_permissions.py
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 | |