put_policy_assignment
¶
put_policy_assignment(
account_id: AwsAccountId,
policy_arn: PolicyArn,
principal_arn: PrincipalArn,
*,
config_overrides: Optional[QuickSightClientConfig] = None,
existing_policy_arn: Optional[PolicyArn] = None,
revision: Optional[Revision] = None,
) -> PutPolicyAssignmentResponse
Assigns a governance policy to an Amazon Quick Sight principal. A principal can have one policy of each policy type. If the principal already has a policy of the same type, this operation replaces it.
To make the change conditional, specify ExistingPolicyArn, Revision, or both. If the current assignment doesn't match, the request fails with a ConflictException and makes no change. If the principal already has the specified policy, the request succeeds and makes no change.
Parameters:
-
account_id(AwsAccountId) –The ID of the Amazon Web Services account that contains the policy and the principal.
-
policy_arn(PolicyArn) –The Amazon Resource Name (ARN) of the policy to assign.
-
principal_arn(PrincipalArn) –The ARN of the user, group, or account to assign the policy to.
-
existing_policy_arn(Optional[PolicyArn], default:None) –The ARN of the policy that you expect the principal to have before this request. If the principal has a different policy of the same type, or no policy of that type, the request fails with a
ConflictExceptionand makes no change. If you don't specify a value, the operation doesn't check the existing assignment. -
revision(Optional[Revision], default:None) –The revision of the assignment from your most recent read. If the assignment has changed since that revision, the request fails with a
ConflictException. If you don't specify a value, the operation doesn't check the revision.
Raises:
-
AccessDeniedException–You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.
-
ConflictException–Updating or deleting a resource can cause an inconsistent state.
-
InternalFailureException–An internal failure occurred.
-
ResourceNotFoundException–One or more resources can't be found.
-
ThrottlingException–Access is throttled.
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_quicksight/_services/quick_sight.py
16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 | |