put_policy_assignment
async
¶
put_policy_assignment(
account_id: AwsAccountId,
policy_arn: PolicyArn,
principal_arn: PrincipalArn,
*,
config_overrides: Optional[AsyncQuickSightClientConfig] = 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/async_quick_sight.py
17026 17027 17028 17029 17030 17031 17032 17033 17034 17035 17036 17037 17038 17039 17040 17041 17042 17043 17044 17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 | |