createClusterSnapshot method

Future<CreateClusterSnapshotResult> createClusterSnapshot(
  1. {@required String clusterIdentifier,
  2. @required String snapshotIdentifier,
  3. int manualSnapshotRetentionPeriod,
  4. List<Tag> tags}

Creates a manual snapshot of the specified cluster. The cluster must be in the available state.

For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.

May throw ClusterSnapshotAlreadyExistsFault. May throw InvalidClusterStateFault. May throw ClusterNotFoundFault. May throw ClusterSnapshotQuotaExceededFault. May throw TagLimitExceededFault. May throw InvalidTagFault. May throw InvalidRetentionPeriodFault.

Parameter clusterIdentifier : The cluster identifier for which you want a snapshot.

Parameter snapshotIdentifier : A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.


  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
Example: my-snapshot-id

Parameter manualSnapshotRetentionPeriod : The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.

The value must be either -1 or an integer between 1 and 3,653.

The default value is -1.

Parameter tags : A list of tag instances.


Future<CreateClusterSnapshotResult> createClusterSnapshot({
  @_s.required String clusterIdentifier,
  @_s.required String snapshotIdentifier,
  int manualSnapshotRetentionPeriod,
  List<Tag> tags,
}) async {
  ArgumentError.checkNotNull(clusterIdentifier, 'clusterIdentifier');
    isRequired: true,
  ArgumentError.checkNotNull(snapshotIdentifier, 'snapshotIdentifier');
    isRequired: true,
  final $request = <String, dynamic>{};
  $request['ClusterIdentifier'] = clusterIdentifier;
  $request['SnapshotIdentifier'] = snapshotIdentifier;
      ?.also((arg) => $request['ManualSnapshotRetentionPeriod'] = arg);
  tags?.also((arg) => $request['Tags'] = arg);
  final $result = await _protocol.send(
    action: 'CreateClusterSnapshot',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateClusterSnapshotMessage'],
    shapes: shapes,
    resultWrapper: 'CreateClusterSnapshotResult',
  return CreateClusterSnapshotResult.fromXml($result);