ungroupResources method

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

Removes the specified resources from the specified group.

Minimum permissions

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

  • resource-groups:UngroupResources

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 from which to remove the resources.

Parameter resourceArns : The ARNs of the resources to be removed from the group.

Implementation

Future<UngroupResourcesOutput> ungroupResources({
  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: '/ungroup-resources',
    exceptionFnMap: _exceptionFns,
  );
  return UngroupResourcesOutput.fromJson(response);
}