deleteGroup method
Deletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:DeleteGroup
May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException. May throw InternalServerErrorException.
Parameter group
:
The name or the ARN of the resource group to delete.
Parameter groupName
:
Deprecated - don't use this parameter. Use Group
instead.
Implementation
Future<DeleteGroupOutput> deleteGroup({
String? group,
String? groupName,
}) async {
_s.validateStringLength(
'group',
group,
1,
1600,
);
_s.validateStringLength(
'groupName',
groupName,
1,
128,
);
final $payload = <String, dynamic>{
if (group != null) 'Group': group,
if (groupName != null) 'GroupName': groupName,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/delete-group',
exceptionFnMap: _exceptionFns,
);
return DeleteGroupOutput.fromJson(response);
}