选择您的 Cookie 首选项

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

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

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

AuthorizeClusterSecurityGroupIngress

Adds an inbound (ingress) rule to an Amazon Redshift security group. Depending on whether the application accessing your cluster is running on the Internet or an Amazon EC2 instance, you can authorize inbound access to either a Classless Interdomain Routing (CIDR)/Internet Protocol (IP) range or to an Amazon EC2 security group. You can add as many as 20 ingress rules to an Amazon Redshift security group.

If you authorize access to an Amazon EC2 security group, specify EC2SecurityGroupName and EC2SecurityGroupOwnerId. The Amazon EC2 security group and Amazon Redshift cluster must be in the same AWS Region.

If you authorize access to a CIDR/IP address range, specify CIDRIP. For an overview of CIDR blocks, see the Wikipedia article on Classless Inter-Domain Routing.

You must also associate the security group with a cluster so that clients running on these IP addresses or the EC2 instance are authorized to connect to the cluster. For information about managing security groups, go to Working with Security Groups in the Amazon Redshift Cluster Management Guide.

Request Parameters

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

ClusterSecurityGroupName

The name of the security group to which the ingress rule is added.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: Yes

CIDRIP

The IP range to be added the Amazon Redshift security group.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

EC2SecurityGroupName

The EC2 security group to be added the Amazon Redshift security group.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

EC2SecurityGroupOwnerId

The AWS account number of the owner of the security group specified by the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value.

Example: 111122223333

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

Response Elements

The following element is returned by the service.

ClusterSecurityGroup

Describes a security group.

Type: ClusterSecurityGroup object

Errors

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

AuthorizationAlreadyExists

The specified CIDR block or EC2 security group is already authorized for the specified cluster security group.

HTTP Status Code: 400

AuthorizationQuotaExceeded

The authorization quota for the cluster security group has been reached.

HTTP Status Code: 400

ClusterSecurityGroupNotFound

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

HTTP Status Code: 404

InvalidClusterSecurityGroupState

The state of the cluster security group is not available.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of AuthorizeClusterSecurityGroupIngress.

Sample Request

https://redshift.us-east-2.amazonaws.com/ ?Action=AuthorizeClusterSecurityGroupIngress &CIDRIP=10.24.34.0/24 &ClusterSecurityGroupName=example-security-group &SignatureMethod=HmacSHA256&SignatureVersion=4 &Version=2012-12-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIAIOSFODNN7EXAMPLE/20150817/us-east-2/redshift/aws4_request &X-Amz-Date=20150825T160000Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=0aa1234bb5cc678ddddd901ee2ff3aa45678b90c12d345e6ff789012345a6b7b

Sample Response

<AuthorizeClusterSecurityGroupIngressResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <AuthorizeClusterSecurityGroupIngressResult> <ClusterSecurityGroup> <Tags/> <EC2SecurityGroups/> <IPRanges> <IPRange> <CIDRIP>10.24.34.0/24</CIDRIP> <Status>authorized</Status> </IPRange> </IPRanges> <Description>Example security group</Description> <ClusterSecurityGroupName>example-security-group</ClusterSecurityGroupName> </ClusterSecurityGroup> </AuthorizeClusterSecurityGroupIngressResult> <ResponseMetadata> <RequestId>534d1bce-46ac-11e5-b673-31d855cc98c6</RequestId> </ResponseMetadata> </AuthorizeClusterSecurityGroupIngressResponse>

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