batchGetResourceConfig method

Future<BatchGetResourceConfigResponse> batchGetResourceConfig({
  1. required List<ResourceKey> resourceKeys,
})

Returns the current configuration for one or more requested resources. The operation also returns a list of resources that are not processed in the current request. If there are no unprocessed resources, the operation returns an empty unprocessedResourceKeys list.

  • The API does not return results for deleted resources.
  • The API does not return any tags for the requested resources. This information is filtered out of the supplementaryConfiguration section of the API response.

May throw ValidationException. May throw NoAvailableConfigurationRecorderException.

Parameter resourceKeys : A list of resource keys to be processed with the current request. Each element in the list consists of the resource type and resource ID.

Implementation

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

  return BatchGetResourceConfigResponse.fromJson(jsonResponse.body);
}