deleteGroupPolicy method
Deletes the specified inline policy that is embedded in the specified IAM group.
A group can also have managed policies attached to it. To detach a managed policy from a group, use DetachGroupPolicy. For more information about policies, refer to Managed policies and inline policies in the IAM User Guide.
May throw LimitExceededException.
May throw NoSuchEntityException.
May throw ServiceFailureException.
Parameter groupName :
The name (friendly name, not ARN) identifying the group that the policy is
embedded in.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
Parameter policyName :
The name identifying the policy document to delete.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
Implementation
Future<void> deleteGroupPolicy({
required String groupName,
required String policyName,
}) async {
final $request = <String, String>{
'GroupName': groupName,
'PolicyName': policyName,
};
await _protocol.send(
$request,
action: 'DeleteGroupPolicy',
version: '2010-05-08',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
);
}