getResourceSnapshotJob method

Future<GetResourceSnapshotJobResponse> getResourceSnapshotJob({
  1. required String catalog,
  2. required String resourceSnapshotJobIdentifier,
})

Use this action to retrieves information about a specific resource snapshot job.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter catalog : Specifies the catalog related to the request. Valid values are:

  • AWS: Retrieves the snapshot job from the production AWS environment.
  • Sandbox: Retrieves the snapshot job from a sandbox environment used for testing or development purposes.

Parameter resourceSnapshotJobIdentifier : The unique identifier of the resource snapshot job to be retrieved. This identifier is crucial for pinpointing the specific job you want to query.

Implementation

Future<GetResourceSnapshotJobResponse> getResourceSnapshotJob({
  required String catalog,
  required String resourceSnapshotJobIdentifier,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSPartnerCentralSelling.GetResourceSnapshotJob'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Catalog': catalog,
      'ResourceSnapshotJobIdentifier': resourceSnapshotJobIdentifier,
    },
  );

  return GetResourceSnapshotJobResponse.fromJson(jsonResponse.body);
}