groupResources method

Future<GroupResourcesOutput> groupResources({
  1. required String group,
  2. required List<String> resourceArns,
})

Adds the specified resources to the specified group.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:GroupResources

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 add resources to.

Parameter resourceArns : The list of ARNs for resources to be added to the group.

Implementation

Future<GroupResourcesOutput> groupResources({
  required String group,
  required List<String> resourceArns,
}) async {
  ArgumentError.checkNotNull(group, 'group');
  _s.validateStringLength(
    'group',
    group,
    1,
    1600,
    isRequired: true,
  );
  ArgumentError.checkNotNull(resourceArns, 'resourceArns');
  final $payload = <String, dynamic>{
    'Group': group,
    'ResourceArns': resourceArns,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/group-resources',
    exceptionFnMap: _exceptionFns,
  );
  return GroupResourcesOutput.fromJson(response);
}