getSnapshot method

Future<GetSnapshotResponse> getSnapshot({
  1. String? ownerAccount,
  2. String? snapshotArn,
  3. String? snapshotName,
})

Returns information about a specific snapshot.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter ownerAccount : The owner Amazon Web Services account of a snapshot shared with another user.

Parameter snapshotArn : The Amazon Resource Name (ARN) of the snapshot to return.

Parameter snapshotName : The name of the snapshot to return.

Implementation

Future<GetSnapshotResponse> getSnapshot({
  String? ownerAccount,
  String? snapshotArn,
  String? snapshotName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RedshiftServerless.GetSnapshot'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (ownerAccount != null) 'ownerAccount': ownerAccount,
      if (snapshotArn != null) 'snapshotArn': snapshotArn,
      if (snapshotName != null) 'snapshotName': snapshotName,
    },
  );

  return GetSnapshotResponse.fromJson(jsonResponse.body);
}