describeIAMPolicyAssignment method
Describes an existing IAM policy assignment, as specified by the assignment name.
May throw AccessDeniedException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InvalidNextTokenException. May throw InternalFailureException.
Parameter assignmentName
:
The name of the assignment, also called a rule.
Parameter awsAccountId
:
The ID of the AWS account that contains the assignment that you want to
describe.
Parameter namespace
:
The namespace that contains the assignment.
Implementation
Future<DescribeIAMPolicyAssignmentResponse> describeIAMPolicyAssignment({
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: 'GET',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/namespaces/${Uri.encodeComponent(namespace)}/iam-policy-assignments/${Uri.encodeComponent(assignmentName)}',
exceptionFnMap: _exceptionFns,
);
return DescribeIAMPolicyAssignmentResponse.fromJson(response);
}