detachPolicy method
Future<void>
detachPolicy({
- required String directoryArn,
- required ObjectReference objectReference,
- required ObjectReference policyReference,
Detaches a policy from an object.
May throw AccessDeniedException.
May throw DirectoryNotEnabledException.
May throw InternalServiceException.
May throw InvalidArnException.
May throw LimitExceededException.
May throw NotPolicyException.
May throw ResourceNotFoundException.
May throw RetryableConflictException.
May throw ValidationException.
Parameter directoryArn :
The Amazon Resource Name (ARN) that is associated with the
Directory where both objects reside. For more information, see
arns.
Parameter objectReference :
Reference that identifies the object whose policy object will be detached.
Parameter policyReference :
Reference that identifies the policy object.
Implementation
Future<void> detachPolicy({
required String directoryArn,
required ObjectReference objectReference,
required ObjectReference policyReference,
}) async {
final headers = <String, String>{
'x-amz-data-partition': directoryArn.toString(),
};
final $payload = <String, dynamic>{
'ObjectReference': objectReference,
'PolicyReference': policyReference,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/amazonclouddirectory/2017-01-11/policy/detach',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}