選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

CreateDBSubnetGroup

焦點模式
CreateDBSubnetGroup - Amazon Relational Database Service
此頁面尚未翻譯為您的語言。 請求翻譯

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

Request Parameters

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

DBSubnetGroupDescription

The description for the DB subnet group.

Type: String

Required: Yes

DBSubnetGroupName

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

Type: String

Required: Yes

SubnetIds.SubnetIdentifier.N

The EC2 Subnet IDs for the DB subnet group.

Type: Array of strings

Required: Yes

Tags.Tag.N

Tags to assign to the DB subnet group.

Type: Array of Tag objects

Required: No

Response Elements

The following element is returned by the service.

DBSubnetGroup

Contains the details of an Amazon RDS DB subnet group.

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

Type: DBSubnetGroup object

Errors

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

DBSubnetGroupAlreadyExists

DBSubnetGroupName is already used by an existing DB subnet group.

HTTP Status Code: 400

DBSubnetGroupDoesNotCoverEnoughAZs

Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.

HTTP Status Code: 400

DBSubnetGroupQuotaExceeded

The request would result in the user exceeding the allowed number of DB subnet groups.

HTTP Status Code: 400

DBSubnetQuotaExceededFault

The request would result in the user exceeding the allowed number of subnets in a DB subnet groups.

HTTP Status Code: 400

InvalidSubnet

The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of CreateDBSubnetGroup.

Sample Request

https://rds.us-east-1.amazonaws.com/ ?Action=CreateDBSubnetGroup &DBSubnetGroupDescription=My%20new%20DB%20Subnet%20Group &DBSubnetGroupName=myawsuser-dbsubnetgroup &SignatureMethod=HmacSHA256 &SignatureVersion=4 &SubnetIds.member.1=subnet-e4d398a1 &SubnetIds.member.2=subnet-c2bdb6ba &Version=2014-10-31 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20140425/us-east-1/rds/aws4_request &X-Amz-Date=20140425T173028Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=f434cd02a766ea034637debf67996a743ca3e098efc9a5881c61e0c6859259d3

Sample Response

<CreateDBSubnetGroupResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/"> <CreateDBSubnetGroupResult> <DBSubnetGroup> <VpcId>vpc-33dc97ea</VpcId> <SubnetGroupStatus>Complete</SubnetGroupStatus> <DBSubnetGroupDescription>My new DB subnet group</DBSubnetGroupDescription> <DBSubnetGroupName>myawsuser-dbsubnetgroup</DBSubnetGroupName> <Subnets> <Subnet> <SubnetStatus>Active</SubnetStatus> <SubnetIdentifier>subnet-e4d398a1</SubnetIdentifier> <SubnetAvailabilityZone> <Name>us-east-1b</Name> <ProvisionedIopsCapable>false</ProvisionedIopsCapable> </SubnetAvailabilityZone> </Subnet> <Subnet> <SubnetStatus>Active</SubnetStatus> <SubnetIdentifier>subnet-c2bdb6ba</SubnetIdentifier> <SubnetAvailabilityZone> <Name>us-east-1c</Name> <ProvisionedIopsCapable>false</ProvisionedIopsCapable> </SubnetAvailabilityZone> </Subnet> </Subnets> </DBSubnetGroup> </CreateDBSubnetGroupResult> <ResponseMetadata> <RequestId>3a401b3f-bb9e-11d3-f4c6-37db295f7674</RequestId> </ResponseMetadata> </CreateDBSubnetGroupResponse>

See Also

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

隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。