SecurityGroupIngress
This class encapsulates and extends the ROS resource type ALIYUN::ECS::SecurityGroupIngress
, which is used to create an inbound rule for a security group.
Initializers
import com.aliyun.ros.cdk.ecs.SecurityGroupIngress;
SecurityGroupIngress.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.ipProtocol(java.lang.String)
.ipProtocol(IResolvable)
.portRange(java.lang.String)
.portRange(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .ipv6SourceCidrIp(java.lang.String)
// .ipv6SourceCidrIp(IResolvable)
// .nicType(java.lang.String)
// .nicType(IResolvable)
// .policy(java.lang.String)
// .policy(IResolvable)
// .priority(java.lang.Number)
// .priority(IResolvable)
// .securityGroupId(java.lang.String)
// .securityGroupId(IResolvable)
// .sourceCidrIp(java.lang.String)
// .sourceCidrIp(IResolvable)
// .sourceGroupId(java.lang.String)
// .sourceGroupId(IResolvable)
// .sourceGroupOwnerId(java.lang.String)
// .sourceGroupOwnerId(IResolvable)
// .sourcePortRange(java.lang.String)
// .sourcePortRange(IResolvable)
// .sourcePrefixListId(java.lang.String)
// .sourcePrefixListId(IResolvable)
.build();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
ipProtocol |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ipProtocol: Ip protocol for in rule. |
portRange |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property portRange: Ip protocol relative port range. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: Description of the security group rule, [1, 512] characters. |
ipv6SourceCidrIp |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ipv6SourceCidrIp: Source IPv6 CIDR address segment. |
nicType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property nicType: Network type, could be 'internet' or 'intranet'. |
policy |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property policy: Authorization policies, parameter values can be: accept (accepted access), drop (denied access). |
priority |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property priority: Authorization policies priority range[1, 100]. |
securityGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property securityGroupId: Id of the security group. |
sourceCidrIp |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property sourceCidrIp: The source IPv4 CIDR block to which you want to control access. |
sourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property sourceGroupId: Source Group Id. |
sourceGroupOwnerId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property sourceGroupOwnerId: Source Group Owner Account ID. |
sourcePortRange |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property sourcePortRange: The range of the ports enabled by the source security group for the transport layer protocol. |
sourcePrefixListId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property sourcePrefixListId: The ID of the source prefix list to which you want to control access. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
ipProtocol
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipProtocol: Ip protocol for in rule.
portRange
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property portRange: Ip protocol relative port range.
For tcp and udp, the port rang is [1,65535], using format '1/200'For icmp|gre|all protocel, the port range should be '-1/-1'
description
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: Description of the security group rule, [1, 512] characters.
The default is empty.
ipv6SourceCidrIp
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipv6SourceCidrIp: Source IPv6 CIDR address segment.
Supports IP address ranges in CIDR format and IPv6 format. Note Only VPC type IP addresses are supported.
nicType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property nicType: Network type, could be 'internet' or 'intranet'.
Default value is internet.
policy
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property policy: Authorization policies, parameter values can be: accept (accepted access), drop (denied access).
Default value is accept.
priority
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property priority: Authorization policies priority range[1, 100].
securityGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property securityGroupId: Id of the security group.
sourceCidrIp
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourceCidrIp: The source IPv4 CIDR block to which you want to control access.
CIDR blocks and IPv4 addresses are supported.
sourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourceGroupId: Source Group Id.
sourceGroupOwnerId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourceGroupOwnerId: Source Group Owner Account ID.
sourcePortRange
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourcePortRange: The range of the ports enabled by the source security group for the transport layer protocol.
Valid values: TCP/UDP: Value range: 1 to 65535. The start port and the end port are separated by a slash (/). Correct example: 1/200. Incorrect example: 200/1.ICMP: -1/-1.GRE: -1/-1.ALL: -1/-1.
sourcePrefixListId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourcePrefixListId: The ID of the source prefix list to which you want to control access.
You can call the DescribePrefixLists operation to query the IDs of available prefix lists. Take note of the following items:
- If a security group is in the classic network, you cannot configure prefix lists in the security group rules.
- If you specify the SourceCidrIp, Ipv6SourceCidrIp, or SourceGroupId parameter, this parameter is ignored.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.ecs.SecurityGroupIngress;
SecurityGroupIngress.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource