describeResourceGroups method

Future<DescribeResourceGroupsResponse> describeResourceGroups({
  1. required List<String> resourceGroupArns,
})

Describes the resource groups that are specified by the ARNs of the resource groups.

May throw InternalException. May throw InvalidInputException.

Parameter resourceGroupArns : The ARN that specifies the resource group that you want to describe.

Implementation

Future<DescribeResourceGroupsResponse> describeResourceGroups({
  required List<String> resourceGroupArns,
}) async {
  ArgumentError.checkNotNull(resourceGroupArns, 'resourceGroupArns');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'InspectorService.DescribeResourceGroups'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'resourceGroupArns': resourceGroupArns,
    },
  );

  return DescribeResourceGroupsResponse.fromJson(jsonResponse.body);
}