Skip to content

Creates a new DB subnet group

Description

Creates a new DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the Amazon Web Services Region.

Usage

rds_create_db_subnet_group(DBSubnetGroupName, DBSubnetGroupDescription,
  SubnetIds, Tags)

Arguments

  • DBSubnetGroupName

    [required] The name for the DB subnet group. This value is stored as a lowercase string.

    Constraints:

    • Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens.
    • Must not be default.
    • First character must be a letter.

    Example: mydbsubnetgroup

  • DBSubnetGroupDescription

    [required] The description for the DB subnet group.

  • SubnetIds

    [required] The EC2 Subnet IDs for the DB subnet group.

  • Tags

    Tags to assign to the DB subnet group.

Value

A list with the following syntax:

list(
  DBSubnetGroup = list(
    DBSubnetGroupName = "string",
    DBSubnetGroupDescription = "string",
    VpcId = "string",
    SubnetGroupStatus = "string",
    Subnets = list(
      list(
        SubnetIdentifier = "string",
        SubnetAvailabilityZone = list(
          Name = "string"
        ),
        SubnetOutpost = list(
          Arn = "string"
        ),
        SubnetStatus = "string"
      )
    ),
    DBSubnetGroupArn = "string",
    SupportedNetworkTypes = list(
      "string"
    )
  )
)

Request syntax

svc$create_db_subnet_group(
  DBSubnetGroupName = "string",
  DBSubnetGroupDescription = "string",
  SubnetIds = list(
    "string"
  ),
  Tags = list(
    list(
      Key = "string",
      Value = "string"
    )
  )
)

Examples

# This example creates a DB subnet group.
svc$create_db_subnet_group(
  DBSubnetGroupDescription = "My DB subnet group",
  DBSubnetGroupName = "mydbsubnetgroup",
  SubnetIds = list(
    "subnet-1fab8a69",
    "subnet-d43a468c"
  )
)