deleteIAMPolicyAssignment method
Deletes an existing IAM policy assignment.
May throw AccessDeniedException. May throw InvalidParameterValueException. May throw ResourceExistsException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ConcurrentUpdatingException. May throw InternalFailureException.
Parameter assignmentName
:
The name of the assignment.
Parameter awsAccountId
:
The AWS account ID where you want to delete the IAM policy assignment.
Parameter namespace
:
The namespace that contains the assignment.
Implementation
Future<DeleteIAMPolicyAssignmentResponse> deleteIAMPolicyAssignment({
required String assignmentName,
required String awsAccountId,
required String namespace,
}) async {
ArgumentError.checkNotNull(assignmentName, 'assignmentName');
_s.validateStringLength(
'assignmentName',
assignmentName,
1,
1152921504606846976,
isRequired: true,
);
ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
_s.validateStringLength(
'awsAccountId',
awsAccountId,
12,
12,
isRequired: true,
);
ArgumentError.checkNotNull(namespace, 'namespace');
_s.validateStringLength(
'namespace',
namespace,
0,
64,
isRequired: true,
);
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/namespace/${Uri.encodeComponent(namespace)}/iam-policy-assignments/${Uri.encodeComponent(assignmentName)}',
exceptionFnMap: _exceptionFns,
);
return DeleteIAMPolicyAssignmentResponse.fromJson(response);
}