选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

ModifyClusterSubnetGroup - Amazon Redshift
此页面尚未翻译为您的语言。 请求翻译

ModifyClusterSubnetGroup

Modifies a cluster subnet group to include the specified list of VPC subnets. The operation replaces the existing list of subnets with the new list of subnets.

VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. If a subnet group for a provisioned cluster is in an account with VPC BPA turned on, the following capabilities are blocked:

  • Creating a public cluster

  • Restoring a public cluster

  • Modifying a private cluster to be public

  • Adding a subnet with VPC BPA turned on to the subnet group when there's at least one public cluster within the group

For more information about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.

Request Parameters

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

ClusterSubnetGroupName

The name of the subnet group to be modified.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: Yes

SubnetIds.SubnetIdentifier.N

An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request.

Type: Array of strings

Length Constraints: Maximum length of 2147483647.

Required: Yes

Description

A text description of the subnet group to be modified.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

Response Elements

The following element is returned by the service.

ClusterSubnetGroup

Describes a subnet group.

Type: ClusterSubnetGroup object

Errors

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

ClusterSubnetGroupNotFoundFault

The cluster subnet group name does not refer to an existing cluster subnet group.

HTTP Status Code: 400

ClusterSubnetQuotaExceededFault

The request would result in user exceeding the allowed number of subnets in a cluster subnet groups. For information about increasing your quota, go to Limits in Amazon Redshift in the Amazon Redshift Cluster Management Guide.

HTTP Status Code: 400

DependentServiceRequestThrottlingFault

The request cannot be completed because a dependent service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.

HTTP Status Code: 400

InvalidSubnet

The requested subnet is not valid, or not all of the subnets are in the same VPC.

HTTP Status Code: 400

SubnetAlreadyInUse

A specified subnet is already in use by another cluster.

HTTP Status Code: 400

UnauthorizedOperation

Your account is not authorized to perform the requested operation.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of ModifyClusterSubnetGroup.

Sample Request

https://redshift.us-east-2.amazonaws.com/ ?Action=ModifyClusterSubnetGroup &ClusterSubnetGroupName=mysubnetgroup &SubnetIds.SubnetIdentifier.1=subnet-a1b21abc &SubnetIds.SubnetIdentifier.2=subnet-a1b22abc &SignatureMethod=HmacSHA256&SignatureVersion=4 &Version=2012-12-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIAIOSFODNN7EXAMPLE/20190817/us-east-2/redshift/aws4_request &X-Amz-Date=20190825T160000Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=0aa1234bb5cc678ddddd901ee2ff3aa45678b90c12d345e6ff789012345a6b7b

Sample Response

<ModifyClusterSubnetGroupResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <ModifyClusterSubnetGroupResult> <ClusterSubnetGroup> <VpcId>vpc-a1abc1a1</VpcId> <Description>My subnet group</Description> <Subnets> <Subnet> <SubnetStatus>Active</SubnetStatus> <SubnetIdentifier>subnet-a1b21abc</SubnetIdentifier> <SubnetAvailabilityZone> <Name>us-east-2f</Name> </SubnetAvailabilityZone> </Subnet> <Subnet> <SubnetStatus>Active</SubnetStatus> <SubnetIdentifier>subnet-a1b22abc</SubnetIdentifier> <SubnetAvailabilityZone> <Name>us-east-2a</Name> </SubnetAvailabilityZone> </Subnet> </Subnets> <ClusterSubnetGroupName>mysubnetgroup</ClusterSubnetGroupName> <SubnetGroupStatus>Complete</SubnetGroupStatus> <Tags/> </ClusterSubnetGroup> </ModifyClusterSubnetGroupResult> <ResponseMetadata> <RequestId>0b638b21-28eb-11ea-8cc9-43f1872b4b75</RequestId> </ResponseMetadata> </ModifyClusterSubnetGroupResponse>

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. 或其附属公司。保留所有权利。