CustomerGateway
- Implements: ICustomerGateway
This class encapsulates and extends the ROS resource type ALIYUN::VPC::CustomerGateway, which is used to create a customer gateway.
Initializers
import com.aliyun.ros.cdk.vpc.CustomerGateway;
CustomerGateway.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.ipAddress(java.lang.String)
.ipAddress(IResolvable)
// .asn(java.lang.Number)
// .asn(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .name(java.lang.String)
// .name(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(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. |
ipAddress | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property ipAddress: The static IP address of the gateway device in the data center. |
asn | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property asn: The autonomous system number (ASN) of the gateway device in your data center. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: The description of the customer gateway. |
name | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property name: The name of the customer gateway. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: The ID of the resource group to which the user gateway belongs. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
ipAddressRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipAddress: The static IP address of the gateway device in the data center.
- If you want to create a public IPsec-VPN connection, enter a public IP address.
- If you want to create a private IPsec-VPN connection, enter a private IP address. You cannot use the following IP addresses. Otherwise, a IPsec-VPN connection cannot be established:
- 100.64.0.0~100.127.255.255
- 127.0.0.0~127.255.255.255
- 169.254.0.0~169.254.255.255
- 224.0.0.0~239.255.255.255
- 255.0.0.0~255.255.255.255
asnOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property asn: The autonomous system number (ASN) of the gateway device in your data center.
This parameter is required If you want to use Border Gateway Protocol (BGP) for the IPsec-VPN connection. Valid values: 1 to 4294967295. 45104 is not supported. Asn is a 4-byte number. You can enter it in two segments and separate the first 16 bits from the following 16 bits with a period (.). Enter the number in each segment in decimal format. For example, if you enter 123.456, the ASN is 8061384. The ASN is calculated by using the following formula: 123 × 65536 + 456 = 8061384.
- We recommend that you use a private ASN to establish BGP connections to the cloud platform. For information about the range of private ASNs, see the relevant documentation.
- 45104 is a unique identifier assigned by IANA to the cloud platform. It is used to identify the cloud platform during route selection and data transmission over the Internet.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of the customer gateway.
The description must be 1 to 100 characters in length, and cannot start with http:\/\/ or https:\/\/.
nameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property name: The name of the customer gateway.
The name must be 1 to 100 characters in length, and cannot start with http:\/\/ or https:\/\/.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group to which the user gateway belongs.
- You can call the ListResourceGroups interface to query the resource group ID.
- If you do not specify a resource group, the user gateway will belong to the default resource group after creation.
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. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | 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
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
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.vpc.CustomerGateway;
CustomerGateway.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. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
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. |
attrCustomerGatewayId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CustomerGatewayId: The ID of the user gateway. |
props | CustomerGatewayProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
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
attrCustomerGatewayIdRequired
public java.lang.Object getAttrCustomerGatewayId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CustomerGatewayId: The ID of the user gateway.
propsRequired
public CustomerGatewayProps getProps();
- Type: CustomerGatewayProps