createDBClusterSnapshot method

Future<CreateDBClusterSnapshotResult> createDBClusterSnapshot({
  1. required String dBClusterIdentifier,
  2. required String dBClusterSnapshotIdentifier,
  3. List<Tag>? tags,
})

Creates a snapshot of a cluster.

May throw DBClusterSnapshotAlreadyExistsFault. May throw InvalidDBClusterStateFault. May throw DBClusterNotFoundFault. May throw SnapshotQuotaExceededFault. May throw InvalidDBClusterSnapshotStateFault.

Parameter dBClusterIdentifier : The identifier of the cluster to create a snapshot for. This parameter is not case sensitive.

Constraints:

  • Must match the identifier of an existing DBCluster.
Example: my-cluster

Parameter dBClusterSnapshotIdentifier : The identifier of the cluster snapshot. This parameter is stored as a lowercase string.

Constraints:

  • Must contain from 1 to 63 letters, numbers, or hyphens.
  • The first character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
Example: my-cluster-snapshot1

Parameter tags : The tags to be assigned to the cluster snapshot.

Implementation

Future<CreateDBClusterSnapshotResult> createDBClusterSnapshot({
  required String dBClusterIdentifier,
  required String dBClusterSnapshotIdentifier,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(dBClusterIdentifier, 'dBClusterIdentifier');
  ArgumentError.checkNotNull(
      dBClusterSnapshotIdentifier, 'dBClusterSnapshotIdentifier');
  final $request = <String, dynamic>{};
  $request['DBClusterIdentifier'] = dBClusterIdentifier;
  $request['DBClusterSnapshotIdentifier'] = dBClusterSnapshotIdentifier;
  tags?.also((arg) => $request['Tags'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'CreateDBClusterSnapshot',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateDBClusterSnapshotMessage'],
    shapes: shapes,
    resultWrapper: 'CreateDBClusterSnapshotResult',
  );
  return CreateDBClusterSnapshotResult.fromXml($result);
}