Skip to main content

replication_subnet_groups

Creates, updates, deletes, gets or lists a replication_subnet_groups resource.

Overview

Namereplication_subnet_groups
TypeResource
Idaws.dms.replication_subnet_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
is_read_onlybooleanIndicates whether the replication subnet group is read-only. When set to true, this subnet group is managed by DMS as part of a zero-ETL integration and cannot be modified or deleted directly. You can only modify or delete read-only subnet groups through their associated zero-ETL integration.
replication_subnet_group_descriptionstringA description for the replication subnet group.
replication_subnet_group_identifierstringThe identifier of the replication instance subnet group.
subnet_group_statusstringThe status of the subnet group.
subnetsarrayThe subnets that are in the subnet group.
supported_network_typesarrayThe IP addressing protocol supported by the subnet group. This is used by a replication instance with values such as IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not yet supported.
vpc_idstringThe ID of the VPC.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_replication_subnet_groupsselectregionReturns information about the replication subnet groups.
create_replication_subnet_groupinsertregion, ReplicationSubnetGroupIdentifier, ReplicationSubnetGroupDescription, SubnetIdsCreates a replication subnet group given a list of the subnet IDs in a VPC. The VPC needs to have at least one subnet in at least two availability zones in the Amazon Web Services Region, otherwise the service will throw a ReplicationSubnetGroupDoesNotCoverEnoughAZs exception. If a replication subnet group exists in your Amazon Web Services account, the CreateReplicationSubnetGroup action returns the following error message: The Replication Subnet Group already exists. In this case, delete the existing replication subnet group. To do so, use the DeleteReplicationSubnetGroup action. Optionally, choose Subnet groups in the DMS console, then choose your subnet group. Next, choose Delete from Actions.
modify_replication_subnet_groupupdateregion, ReplicationSubnetGroupIdentifier, SubnetIdsModifies the settings for the specified replication subnet group.
delete_replication_subnet_groupdeleteregionDeletes a subnet group.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about the replication subnet groups.

SELECT
is_read_only,
replication_subnet_group_description,
replication_subnet_group_identifier,
subnet_group_status,
subnets,
supported_network_types,
vpc_id
FROM aws.dms.replication_subnet_groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a replication subnet group given a list of the subnet IDs in a VPC. The VPC needs to have at least one subnet in at least two availability zones in the Amazon Web Services Region, otherwise the service will throw a ReplicationSubnetGroupDoesNotCoverEnoughAZs exception. If a replication subnet group exists in your Amazon Web Services account, the CreateReplicationSubnetGroup action returns the following error message: The Replication Subnet Group already exists. In this case, delete the existing replication subnet group. To do so, use the DeleteReplicationSubnetGroup action. Optionally, choose Subnet groups in the DMS console, then choose your subnet group. Next, choose Delete from Actions.

INSERT INTO aws.dms.replication_subnet_groups (
ReplicationSubnetGroupIdentifier,
ReplicationSubnetGroupDescription,
SubnetIds,
Tags,
region
)
SELECT
'{{ ReplicationSubnetGroupIdentifier }}' /* required */,
'{{ ReplicationSubnetGroupDescription }}' /* required */,
'{{ SubnetIds }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
replication_subnet_group
;

UPDATE examples

Modifies the settings for the specified replication subnet group.

UPDATE aws.dms.replication_subnet_groups
SET
ReplicationSubnetGroupIdentifier = '{{ ReplicationSubnetGroupIdentifier }}',
ReplicationSubnetGroupDescription = '{{ ReplicationSubnetGroupDescription }}',
SubnetIds = '{{ SubnetIds }}'
WHERE
region = '{{ region }}' --required
AND ReplicationSubnetGroupIdentifier = '{{ ReplicationSubnetGroupIdentifier }}' --required
AND SubnetIds = '{{ SubnetIds }}' --required
RETURNING
replication_subnet_group;

DELETE examples

Deletes a subnet group.

DELETE FROM aws.dms.replication_subnet_groups
WHERE region = '{{ region }}' --required
;