checkAccessNotGranted method
Checks whether the specified access isn't allowed by a policy.
May throw AccessDeniedException.
May throw InternalServerException.
May throw InvalidParameterException.
May throw ThrottlingException.
May throw UnprocessableEntityException.
May throw ValidationException.
Parameter access :
An access object containing the permissions that shouldn't be granted by
the specified policy. If only actions are specified, IAM Access Analyzer
checks for access to peform at least one of the actions on any resource in
the policy. If only resources are specified, then IAM Access Analyzer
checks for access to perform any action on at least one of the resources.
If both actions and resources are specified, IAM Access Analyzer checks
for access to perform at least one of the specified actions on at least
one of the specified resources.
Parameter policyDocument :
The JSON policy document to use as the content for the policy.
Parameter policyType :
The type of policy. Identity policies grant permissions to IAM principals.
Identity policies include managed and inline policies for IAM roles,
users, and groups.
Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets.
Implementation
Future<CheckAccessNotGrantedResponse> checkAccessNotGranted({
required List<Access> access,
required String policyDocument,
required AccessCheckPolicyType policyType,
}) async {
final $payload = <String, dynamic>{
'access': access,
'policyDocument': policyDocument,
'policyType': policyType.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/policy/check-access-not-granted',
exceptionFnMap: _exceptionFns,
);
return CheckAccessNotGrantedResponse.fromJson(response);
}