createReplicationSubnetGroup method
Creates a replication subnet group given a list of the subnet IDs in a VPC.
May throw AccessDeniedFault. May throw ResourceAlreadyExistsFault. May throw ResourceNotFoundFault. May throw ResourceQuotaExceededFault. May throw ReplicationSubnetGroupDoesNotCoverEnoughAZs. May throw InvalidSubnet.
Parameter replicationSubnetGroupDescription
:
The description for the subnet group.
Parameter replicationSubnetGroupIdentifier
:
The name for the replication subnet group. This value is stored as a
lowercase string.
Constraints: Must contain no more than 255 alphanumeric characters, periods, spaces, underscores, or hyphens. Must not be "default".
Example: mySubnetgroup
Parameter subnetIds
:
One or more subnet IDs to be assigned to the subnet group.
Parameter tags
:
One or more tags to be assigned to the subnet group.
Implementation
Future<CreateReplicationSubnetGroupResponse> createReplicationSubnetGroup({
required String replicationSubnetGroupDescription,
required String replicationSubnetGroupIdentifier,
required List<String> subnetIds,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(
replicationSubnetGroupDescription, 'replicationSubnetGroupDescription');
ArgumentError.checkNotNull(
replicationSubnetGroupIdentifier, 'replicationSubnetGroupIdentifier');
ArgumentError.checkNotNull(subnetIds, 'subnetIds');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.CreateReplicationSubnetGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ReplicationSubnetGroupDescription': replicationSubnetGroupDescription,
'ReplicationSubnetGroupIdentifier': replicationSubnetGroupIdentifier,
'SubnetIds': subnetIds,
if (tags != null) 'Tags': tags,
},
);
return CreateReplicationSubnetGroupResponse.fromJson(jsonResponse.body);
}