Skip to content

RDS  >  Operations  >  create_db_subnet_group

create_db_subnet_group

Operation

create_db_subnet_group async

create_db_subnet_group(input: CreateDBSubnetGroupInput, plugins: list[Plugin] | None = None) -> CreateDBSubnetGroupOutput

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.

Parameters:

Name Type Description Default
input CreateDBSubnetGroupInput

An instance of CreateDBSubnetGroupInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateDBSubnetGroupOutput

An instance of CreateDBSubnetGroupOutput.

Input

CreateDBSubnetGroupInput dataclass

Bases: _SerdeShape

Attributes

db_subnet_group_description class-attribute instance-attribute
db_subnet_group_description: str | None = ...

The description for the DB subnet group.

db_subnet_group_name class-attribute instance-attribute
db_subnet_group_name: str | None = ...

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

subnet_ids class-attribute instance-attribute
subnet_ids: list[str] | None = ...

The EC2 Subnet IDs for the DB subnet group.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

Tags to assign to the DB subnet group.

Output

CreateDBSubnetGroupOutput dataclass

Bases: _SerdeShape

Dataclass for CreateDBSubnetGroupOutput structure.

Attributes

db_subnet_group class-attribute instance-attribute
db_subnet_group: DBSubnetGroup | None = ...

Contains the details of an Amazon RDS DB subnet group.

This data type is used as a response element in the DescribeDBSubnetGroups action.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.