createDBSnapshot method
May throw DBSnapshotAlreadyExistsFault. May throw InvalidDBInstanceStateFault. May throw DBInstanceNotFoundFault. May throw SnapshotQuotaExceededFault.
Implementation
Future<CreateDBSnapshotResult> createDBSnapshot({
required String dBInstanceIdentifier,
required String dBSnapshotIdentifier,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(dBInstanceIdentifier, 'dBInstanceIdentifier');
ArgumentError.checkNotNull(dBSnapshotIdentifier, 'dBSnapshotIdentifier');
final $request = <String, dynamic>{};
$request['DBInstanceIdentifier'] = dBInstanceIdentifier;
$request['DBSnapshotIdentifier'] = dBSnapshotIdentifier;
tags?.also((arg) => $request['Tags'] = arg);
final $result = await _protocol.send(
$request,
action: 'CreateDBSnapshot',
version: '2013-09-09',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateDBSnapshotMessage'],
shapes: shapes,
resultWrapper: 'CreateDBSnapshotResult',
);
return CreateDBSnapshotResult.fromXml($result);
}