copyDBClusterParameterGroup method
Copies the specified cluster parameter group.
May throw DBParameterGroupNotFoundFault. May throw DBParameterGroupQuotaExceededFault. May throw DBParameterGroupAlreadyExistsFault.
Parameter sourceDBClusterParameterGroupIdentifier
:
The identifier or Amazon Resource Name (ARN) for the source cluster
parameter group.
Constraints:
- Must specify a valid cluster parameter group.
-
If the source cluster parameter group is in the same AWS Region as the
copy, specify a valid parameter group identifier; for example,
my-db-cluster-param-group
, or a valid ARN. -
If the source parameter group is in a different AWS Region than the copy,
specify a valid cluster parameter group ARN; for example,
arn:aws:rds:us-east-1:123456789012:sample-cluster:sample-parameter-group
.
Parameter targetDBClusterParameterGroupDescription
:
A description for the copied cluster parameter group.
Parameter targetDBClusterParameterGroupIdentifier
:
The identifier for the copied cluster parameter group.
Constraints:
- Cannot be null, empty, or blank.
- Must contain from 1 to 255 letters, numbers, or hyphens.
- The first character must be a letter.
- Cannot end with a hyphen or contain two consecutive hyphens.
my-cluster-param-group1
Parameter tags
:
The tags that are to be assigned to the parameter group.
Implementation
Future<CopyDBClusterParameterGroupResult> copyDBClusterParameterGroup({
required String sourceDBClusterParameterGroupIdentifier,
required String targetDBClusterParameterGroupDescription,
required String targetDBClusterParameterGroupIdentifier,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(sourceDBClusterParameterGroupIdentifier,
'sourceDBClusterParameterGroupIdentifier');
ArgumentError.checkNotNull(targetDBClusterParameterGroupDescription,
'targetDBClusterParameterGroupDescription');
ArgumentError.checkNotNull(targetDBClusterParameterGroupIdentifier,
'targetDBClusterParameterGroupIdentifier');
final $request = <String, dynamic>{};
$request['SourceDBClusterParameterGroupIdentifier'] =
sourceDBClusterParameterGroupIdentifier;
$request['TargetDBClusterParameterGroupDescription'] =
targetDBClusterParameterGroupDescription;
$request['TargetDBClusterParameterGroupIdentifier'] =
targetDBClusterParameterGroupIdentifier;
tags?.also((arg) => $request['Tags'] = arg);
final $result = await _protocol.send(
$request,
action: 'CopyDBClusterParameterGroup',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CopyDBClusterParameterGroupMessage'],
shapes: shapes,
resultWrapper: 'CopyDBClusterParameterGroupResult',
);
return CopyDBClusterParameterGroupResult.fromXml($result);
}