Class CfnClusterSecurityGroupIngress

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.redshift.CfnClusterSecurityGroupIngress
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:23.658Z") @Stability(Stable) public class CfnClusterSecurityGroupIngress extends CfnResource implements IInspectable
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 .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.redshift.*;
 CfnClusterSecurityGroupIngress cfnClusterSecurityGroupIngress = CfnClusterSecurityGroupIngress.Builder.create(this, "MyCfnClusterSecurityGroupIngress")
         .clusterSecurityGroupName("clusterSecurityGroupName")
         // the properties below are optional
         .cidrip("cidrip")
         .ec2SecurityGroupName("ec2SecurityGroupName")
         .ec2SecurityGroupOwnerId("ec2SecurityGroupOwnerId")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnClusterSecurityGroupIngress

      protected CfnClusterSecurityGroupIngress(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnClusterSecurityGroupIngress

      protected CfnClusterSecurityGroupIngress(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnClusterSecurityGroupIngress

      @Stability(Stable) public CfnClusterSecurityGroupIngress(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnClusterSecurityGroupIngressProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      Specifies an inbound (ingress) rule for an Amazon Redshift security group.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getClusterSecurityGroupName

      @Stability(Stable) @NotNull public String getClusterSecurityGroupName()
      The name of the security group to which the ingress rule is added.
    • setClusterSecurityGroupName

      @Stability(Stable) public void setClusterSecurityGroupName(@NotNull String value)
      The name of the security group to which the ingress rule is added.
    • getCidrip

      @Stability(Stable) @Nullable public String getCidrip()
      The IP range to be added the Amazon Redshift security group.
    • setCidrip

      @Stability(Stable) public void setCidrip(@Nullable String value)
      The IP range to be added the Amazon Redshift security group.
    • getEc2SecurityGroupName

      @Stability(Stable) @Nullable public String getEc2SecurityGroupName()
      The EC2 security group to be added the Amazon Redshift security group.
    • setEc2SecurityGroupName

      @Stability(Stable) public void setEc2SecurityGroupName(@Nullable String value)
      The EC2 security group to be added the Amazon Redshift security group.
    • getEc2SecurityGroupOwnerId

      @Stability(Stable) @Nullable public String getEc2SecurityGroupOwnerId()
      The AWS account number of the owner of the security group specified by the EC2SecurityGroupName parameter.
    • setEc2SecurityGroupOwnerId

      @Stability(Stable) public void setEc2SecurityGroupOwnerId(@Nullable String value)
      The AWS account number of the owner of the security group specified by the EC2SecurityGroupName parameter.