@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:31.510Z") 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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnClusterSecurityGroupIngress.Builder
A fluent builder for
CfnClusterSecurityGroupIngress . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnClusterSecurityGroupIngress(Construct scope,
java.lang.String id,
CfnClusterSecurityGroupIngressProps props)
Create a new `AWS::Redshift::ClusterSecurityGroupIngress`.
|
protected |
CfnClusterSecurityGroupIngress(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnClusterSecurityGroupIngress(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCidrip()
The IP range to be added the Amazon Redshift security group.
|
java.lang.String |
getClusterSecurityGroupName()
The name of the security group to which the ingress rule is added.
|
java.lang.String |
getEc2SecurityGroupName()
The EC2 security group to be added the Amazon Redshift security group.
|
java.lang.String |
getEc2SecurityGroupOwnerId()
The AWS account number of the owner of the security group specified by the *EC2SecurityGroupName* parameter.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setCidrip(java.lang.String value)
The IP range to be added the Amazon Redshift security group.
|
void |
setClusterSecurityGroupName(java.lang.String value)
The name of the security group to which the ingress rule is added.
|
void |
setEc2SecurityGroupName(java.lang.String value)
The EC2 security group to be added the Amazon Redshift security group.
|
void |
setEc2SecurityGroupOwnerId(java.lang.String value)
The AWS account number of the owner of the security group specified by the *EC2SecurityGroupName* parameter.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnClusterSecurityGroupIngress(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnClusterSecurityGroupIngress(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnClusterSecurityGroupIngress(Construct scope, java.lang.String id, CfnClusterSecurityGroupIngressProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getClusterSecurityGroupName()
public void setClusterSecurityGroupName(java.lang.String value)
public java.lang.String getCidrip()
public void setCidrip(java.lang.String value)
public java.lang.String getEc2SecurityGroupName()
public void setEc2SecurityGroupName(java.lang.String value)
public java.lang.String getEc2SecurityGroupOwnerId()
The AWS Access Key ID is not an acceptable value.
Example: 111122223333
Conditional. If you specify the EC2SecurityGroupName
property, you must specify this property.
public void setEc2SecurityGroupOwnerId(java.lang.String value)
The AWS Access Key ID is not an acceptable value.
Example: 111122223333
Conditional. If you specify the EC2SecurityGroupName
property, you must specify this property.