updateGroup method
Updates the description for an existing group. You cannot update the name of a resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:UpdateGroup
May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException. May throw InternalServerErrorException.
Parameter description
:
The new description that you want to update the resource group with.
Descriptions can contain letters, numbers, hyphens, underscores, periods,
and spaces.
Parameter group
:
The name or the ARN of the resource group to modify.
Parameter groupName
:
Don't use this parameter. Use Group
instead.
Implementation
Future<UpdateGroupOutput> updateGroup({
String? description,
String? group,
String? groupName,
}) async {
_s.validateStringLength(
'description',
description,
0,
512,
);
_s.validateStringLength(
'group',
group,
1,
1600,
);
_s.validateStringLength(
'groupName',
groupName,
1,
128,
);
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (group != null) 'Group': group,
if (groupName != null) 'GroupName': groupName,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/update-group',
exceptionFnMap: _exceptionFns,
);
return UpdateGroupOutput.fromJson(response);
}