Menu
AWS Database Migration Service
API Reference (API Version 2016-01-01)

CreateReplicationSubnetGroup

Creates a replication subnet group given a list of the subnet IDs in a VPC.

Request Syntax

{
   "ReplicationSubnetGroupDescription": "string",
   "ReplicationSubnetGroupIdentifier": "string",
   "SubnetIds": [ "string" ],
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ReplicationSubnetGroupDescription

The description for the subnet group.

Type: String

Required: Yes

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

Type: String

Required: Yes

SubnetIds

The EC2 subnet IDs for the subnet group.

Type: Array of strings

Required: Yes

Tags

The tag to be assigned to the subnet group.

Type: Array of Tag objects

Required: No

Response Syntax

{
   "ReplicationSubnetGroup": { 
      "ReplicationSubnetGroupDescription": "string",
      "ReplicationSubnetGroupIdentifier": "string",
      "SubnetGroupStatus": "string",
      "Subnets": [ 
         { 
            "SubnetAvailabilityZone": { 
               "Name": "string"
            },
            "SubnetIdentifier": "string",
            "SubnetStatus": "string"
         }
      ],
      "VpcId": "string"
   }
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ReplicationSubnetGroup

The replication subnet group that was created.

Type: ReplicationSubnetGroup object

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedFault

AWS DMS was denied access to the endpoint.

HTTP Status Code: 400

InvalidSubnet

The subnet provided is invalid.

HTTP Status Code: 400

ReplicationSubnetGroupDoesNotCoverEnoughAZs

The replication subnet group does not cover enough Availability Zones (AZs). Edit the replication subnet group and add more AZs.

HTTP Status Code: 400

ResourceAlreadyExistsFault

The resource you are attempting to create already exists.

HTTP Status Code: 400

ResourceNotFoundFault

The resource could not be found.

HTTP Status Code: 400

ResourceQuotaExceededFault

The quota for this resource quota has been exceeded.

HTTP Status Code: 400

Example

Sample Request

   
POST / HTTP/1.1
Host: dms.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonDMSv20160101.CreateReplicationSubnetGroup
{
   "ReplicationSubnetGroupIdentifier":"test-subnet-group",
   "ReplicationSubnetGroupDescription":"dms testing",
   "SubnetIds":[
      "subnet-f6dd91af",
      "subnet-3605751d",
      "subnet-c2daefb5"
   ],
   "Tags":[
      {
         "Key":"",
         "Value":""
      }
   ]
}

 

Sample Response


 HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
 {
   "ReplicationSubnetGroup":{
      "ReplicationSubnetGroupDescription":"dms testing",
      "Subnets":[
         {
            "SubnetStatus":"Active",
            "SubnetIdentifier":"subnet-f6dd91af",
            "SubnetAvailabilityZone":{
               "Name":"us-east-1d"
            }
         },
         {
            "SubnetStatus":"Active",
            "SubnetIdentifier":"subnet-3605751d",
            "SubnetAvailabilityZone":{
               "Name":"us-east-1b"
            }
         },
         {
            "SubnetStatus":"Active",
            "SubnetIdentifier":"subnet-c2daefb5",
            "SubnetAvailabilityZone":{
               "Name":"us-east-1c"
            }
         }
      ],
      "VpcId":"vpc-6741a603",
      "SubnetGroupStatus":"Complete",
      "ReplicationSubnetGroupIdentifier":"test-subnet-group"
   }
}
 

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: