Skip to content

NatIp

This class encapsulates and extends the ROS resource type ALIYUN::VPC::NatIp.

Initializers

import com.aliyun.ros.cdk.vpc.NatIp;
NatIp.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .natGatewayId(java.lang.String)
    .natGatewayId(IResolvable)
    .natIpCidr(java.lang.String)
    .natIpCidr(IResolvable)
    .natIpDescription(java.lang.String)
    .natIpDescription(IResolvable)
    .natIpName(java.lang.String)
    .natIpName(IResolvable)
//  .ipv4Prefix(java.lang.String)
//  .ipv4Prefix(IResolvable)
//  .ipv4PrefixCount(java.lang.Number)
//  .ipv4PrefixCount(IResolvable)
//  .natIp(java.lang.String)
//  .natIp(IResolvable)
//  .natIpCidrId(java.lang.String)
//  .natIpCidrId(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.
natGatewayId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property natGatewayId: The ID of the Virtual Private Cloud (VPC) NAT gateway for which you want to create the NAT IP address.
natIpCidr java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property natIpCidr: The CIDR block to which the NAT IP address belongs.
natIpDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property natIpDescription: The description of the NAT IP address.
natIpName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property natIpName: The name of the NAT IP address.
ipv4Prefix java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property ipv4Prefix: The IPv4 prefix of the IP address range to be created.
ipv4PrefixCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property ipv4PrefixCount: The number of IPv4 prefixes to automatically allocate.
natIp java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property natIp: The NAT IP address that you want to create.
natIpCidrId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property natIpCidrId: The ID of the CIDR block to which the NAT IP address belongs.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

natGatewayIdRequired

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

Property natGatewayId: The ID of the Virtual Private Cloud (VPC) NAT gateway for which you want to create the NAT IP address.


natIpCidrRequired

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

Property natIpCidr: The CIDR block to which the NAT IP address belongs.


natIpDescriptionRequired

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

Property natIpDescription: The description of the NAT IP address.

The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.


natIpNameRequired

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

Property natIpName: The name of the NAT IP address.

The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. It cannot start with http:// or https://.


ipv4PrefixOptional

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

Property ipv4Prefix: The IPv4 prefix of the IP address range to be created.

The IPv4 prefix must be within the reserved CIDR block of the switch where the NAT gateway is deployed, and the reserved CIDR block must not be occupied. The prefix length must be /28.


ipv4PrefixCountOptional

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

Property ipv4PrefixCount: The number of IPv4 prefixes to automatically allocate.

Randomly allocated from the unassigned reserved CIDR blocks of the switch where the NAT gateway is deployed. Valid values: 1 to 10.


natIpOptional

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

Property natIp: The NAT IP address that you want to create.

If you do not specify an IP address, the system selects a random IP address from the specified CIDR block.


natIpCidrIdOptional

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

Property natIpCidrId: The ID of the CIDR block to which the NAT IP address belongs.


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.

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

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)

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.vpc.NatIp;
NatIp.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.
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.
attrNatIp java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute NatIp: NAT IP address.
attrNatIpId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute NatIpId: The ID of the NAT IP address.
props NatIpProps 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

attrNatIpRequired

public java.lang.Object getAttrNatIp();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute NatIp: NAT IP address.


attrNatIpIdRequired

public java.lang.Object getAttrNatIpId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute NatIpId: The ID of the NAT IP address.


propsRequired

public NatIpProps getProps();