Skip to content

SecurityGroupEgress

This class encapsulates and extends the ROS resource type ALIYUN::ECS::SecurityGroupEgress, which is used to create an outbound access rule for a security group.

Initializers

import com.aliyun.ros.cdk.ecs.SecurityGroupEgress;
SecurityGroupEgress.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)
//  .destCidrIp(java.lang.String)
//  .destCidrIp(IResolvable)
//  .destGroupId(java.lang.String)
//  .destGroupId(IResolvable)
//  .destGroupOwnerId(java.lang.String)
//  .destGroupOwnerId(IResolvable)
//  .destPrefixListId(java.lang.String)
//  .destPrefixListId(IResolvable)
//  .ipv6DestCidrIp(java.lang.String)
//  .ipv6DestCidrIp(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)
    .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.
destCidrIp java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destCidrIp: The destination IPv4 CIDR block to which you want to control access.
destGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destGroupId: The destination security group ID to which access permissions need to be set.
destGroupOwnerId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destGroupOwnerId: When setting security group rules across accounts, the Ali Cloud account ID of the destination security group.
destPrefixListId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destPrefixListId: The ID of the destination prefix list to which you want to control access.
ipv6DestCidrIp java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property ipv6DestCidrIp: Destination IPv6 CIDR address block for which access rights need to be set.
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.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

ipProtocolRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property ipProtocol: Ip protocol for in rule.


portRangeRequired

  • 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'


descriptionOptional

  • 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.


destCidrIpOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destCidrIp: The destination IPv4 CIDR block to which you want to control access.

CIDR blocks and IPv4 addresses are supported.


destGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destGroupId: The destination security group ID to which access permissions need to be set.

Set at least one of the DestGroupId, DestCidrIp, Ipv6DestCidrIp, or DestPrefixListId parameters.

  • If DestGroupId is specified without the DestCidrIp parameter, the NicType parameter can only take the value intranet.
  • If both DestGroupId and DestCidrIp are specified, DestCidrIp is assumed to prevail. You should pay attention to:
  • Enterprise Security groups do not support authorized security group access.
  • The maximum number of authorized security groups supported by ordinary security groups is 20.

destGroupOwnerIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destGroupOwnerId: When setting security group rules across accounts, the Ali Cloud account ID of the destination security group.

  • If neither DestGroupOwnerId nor DestGroupOwnerAccount is set, it is considered to set the access rights of your other security group.
  • If you have set the parameter DestCidrIp, the parameter DestGroupOwnerId is invalid.

destPrefixListIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destPrefixListId: The ID of the destination 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. For information about the limits on security groups and prefix lists, see the "Security group limits" in Limits. If you specify DestCidrIp, Ipv6DestCidrIp, or DestGroupId, DestPrefixListId is ignored.


ipv6DestCidrIpOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property ipv6DestCidrIp: Destination IPv6 CIDR address block for which access rights need to be set.

CIDR format and IPv6 format IP address range are supported.


nicTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property nicType: Network type, could be 'internet' or 'intranet'.

Default value is internet.


policyOptional

  • 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.


priorityOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property priority: Authorization policies priority range[1, 100].


securityGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property securityGroupId: Id of the security group.


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.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.ecs.SecurityGroupEgress;
SecurityGroupEgress.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • 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.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource