detachCustomerManagedPolicyReferenceFromPermissionSet method
Detaches the specified customer managed policy from the specified PermissionSet.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter customerManagedPolicyReference :
Specifies the name and path of a customer managed policy. You must have an
IAM policy that matches the name and path in each Amazon Web Services
account where you want to deploy your permission set.
Parameter instanceArn :
The ARN of the IAM Identity Center instance under which the operation will
be executed.
Parameter permissionSetArn :
The ARN of the PermissionSet.
Implementation
Future<void> detachCustomerManagedPolicyReferenceFromPermissionSet({
required CustomerManagedPolicyReference customerManagedPolicyReference,
required String instanceArn,
required String permissionSetArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'SWBExternalService.DetachCustomerManagedPolicyReferenceFromPermissionSet'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CustomerManagedPolicyReference': customerManagedPolicyReference,
'InstanceArn': instanceArn,
'PermissionSetArn': permissionSetArn,
},
);
}