1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. rds
  5. DbSubnetGroup

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.rds.DbSubnetGroup

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

The AWS::RDS::DBSubnetGroup resource creates a database subnet group. Subnet groups must contain at least two subnets in two different Availability Zones in the same region. For more information, see Working with DB subnet groups in the Amazon RDS User Guide.

Create DbSubnetGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DbSubnetGroup(name: string, args: DbSubnetGroupArgs, opts?: CustomResourceOptions);
@overload
def DbSubnetGroup(resource_name: str,
                  args: DbSubnetGroupArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def DbSubnetGroup(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  db_subnet_group_description: Optional[str] = None,
                  subnet_ids: Optional[Sequence[str]] = None,
                  db_subnet_group_name: Optional[str] = None,
                  tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewDbSubnetGroup(ctx *Context, name string, args DbSubnetGroupArgs, opts ...ResourceOption) (*DbSubnetGroup, error)
public DbSubnetGroup(string name, DbSubnetGroupArgs args, CustomResourceOptions? opts = null)
public DbSubnetGroup(String name, DbSubnetGroupArgs args)
public DbSubnetGroup(String name, DbSubnetGroupArgs args, CustomResourceOptions options)
type: aws-native:rds:DbSubnetGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DbSubnetGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DbSubnetGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DbSubnetGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DbSubnetGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DbSubnetGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DbSubnetGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DbSubnetGroup resource accepts the following input properties:

DbSubnetGroupDescription This property is required. string
The description for the DB subnet group.
SubnetIds This property is required. List<string>
The EC2 Subnet IDs for the DB subnet group.
DbSubnetGroupName string

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

Tags List<Pulumi.AwsNative.Inputs.Tag>
Tags to assign to the DB subnet group.
DbSubnetGroupDescription This property is required. string
The description for the DB subnet group.
SubnetIds This property is required. []string
The EC2 Subnet IDs for the DB subnet group.
DbSubnetGroupName string

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

Tags TagArgs
Tags to assign to the DB subnet group.
dbSubnetGroupDescription This property is required. String
The description for the DB subnet group.
subnetIds This property is required. List<String>
The EC2 Subnet IDs for the DB subnet group.
dbSubnetGroupName String

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

tags List<Tag>
Tags to assign to the DB subnet group.
dbSubnetGroupDescription This property is required. string
The description for the DB subnet group.
subnetIds This property is required. string[]
The EC2 Subnet IDs for the DB subnet group.
dbSubnetGroupName string

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

tags Tag[]
Tags to assign to the DB subnet group.
db_subnet_group_description This property is required. str
The description for the DB subnet group.
subnet_ids This property is required. Sequence[str]
The EC2 Subnet IDs for the DB subnet group.
db_subnet_group_name str

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

tags Sequence[TagArgs]
Tags to assign to the DB subnet group.
dbSubnetGroupDescription This property is required. String
The description for the DB subnet group.
subnetIds This property is required. List<String>
The EC2 Subnet IDs for the DB subnet group.
dbSubnetGroupName String

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

tags List<Property Map>
Tags to assign to the DB subnet group.

Outputs

All input properties are implicitly available as output properties. Additionally, the DbSubnetGroup resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Supporting Types

Tag
, TagArgs

Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag
key This property is required. string
The key name of the tag
value This property is required. string
The value of the tag
key This property is required. str
The key name of the tag
value This property is required. str
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi