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

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

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

aws-native.rds.getDbSubnetGroup

Explore with Pulumi AI

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

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 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.

Using getDbSubnetGroup

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDbSubnetGroup(args: GetDbSubnetGroupArgs, opts?: InvokeOptions): Promise<GetDbSubnetGroupResult>
function getDbSubnetGroupOutput(args: GetDbSubnetGroupOutputArgs, opts?: InvokeOptions): Output<GetDbSubnetGroupResult>
Copy
def get_db_subnet_group(db_subnet_group_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDbSubnetGroupResult
def get_db_subnet_group_output(db_subnet_group_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetDbSubnetGroupResult]
Copy
func LookupDbSubnetGroup(ctx *Context, args *LookupDbSubnetGroupArgs, opts ...InvokeOption) (*LookupDbSubnetGroupResult, error)
func LookupDbSubnetGroupOutput(ctx *Context, args *LookupDbSubnetGroupOutputArgs, opts ...InvokeOption) LookupDbSubnetGroupResultOutput
Copy

> Note: This function is named LookupDbSubnetGroup in the Go SDK.

public static class GetDbSubnetGroup 
{
    public static Task<GetDbSubnetGroupResult> InvokeAsync(GetDbSubnetGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetDbSubnetGroupResult> Invoke(GetDbSubnetGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDbSubnetGroupResult> getDbSubnetGroup(GetDbSubnetGroupArgs args, InvokeOptions options)
public static Output<GetDbSubnetGroupResult> getDbSubnetGroup(GetDbSubnetGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws-native:rds:getDbSubnetGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DbSubnetGroupName This property is required. 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

DbSubnetGroupName This property is required. 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

dbSubnetGroupName This property is required. 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

dbSubnetGroupName This property is required. 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

db_subnet_group_name This property is required. 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

dbSubnetGroupName This property is required. 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

getDbSubnetGroup Result

The following output properties are available:

DbSubnetGroupDescription string
The description for the DB subnet group.
SubnetIds List<string>
The EC2 Subnet IDs for the DB subnet group.
Tags List<Pulumi.AwsNative.Outputs.Tag>
Tags to assign to the DB subnet group.
DbSubnetGroupDescription string
The description for the DB subnet group.
SubnetIds []string
The EC2 Subnet IDs for the DB subnet group.
Tags Tag
Tags to assign to the DB subnet group.
dbSubnetGroupDescription String
The description for the DB subnet group.
subnetIds List<String>
The EC2 Subnet IDs for the DB subnet group.
tags List<Tag>
Tags to assign to the DB subnet group.
dbSubnetGroupDescription string
The description for the DB subnet group.
subnetIds string[]
The EC2 Subnet IDs for the DB subnet group.
tags Tag[]
Tags to assign to the DB subnet group.
db_subnet_group_description str
The description for the DB subnet group.
subnet_ids Sequence[str]
The EC2 Subnet IDs for the DB subnet group.
tags Sequence[root_Tag]
Tags to assign to the DB subnet group.
dbSubnetGroupDescription String
The description for the DB subnet group.
subnetIds List<String>
The EC2 Subnet IDs for the DB subnet group.
tags List<Property Map>
Tags to assign to the DB subnet group.

Supporting Types

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. 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.27.0 published on Monday, Apr 14, 2025 by Pulumi