@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.370Z") @Stability(value=Stable) public class CfnVPCCidrBlock extends CfnResource implements IInspectable
Associates a CIDR block with your VPC. You can only associate a single IPv6 CIDR block with your VPC. The IPv6 CIDR block size is fixed at /56.
For more information about associating CIDR blocks with your VPC and applicable restrictions, see VPC and Subnet Sizing in the Amazon Virtual Private Cloud User 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.ec2.*;
CfnVPCCidrBlock cfnVPCCidrBlock = CfnVPCCidrBlock.Builder.create(this, "MyCfnVPCCidrBlock")
.vpcId("vpcId")
// the properties below are optional
.amazonProvidedIpv6CidrBlock(false)
.cidrBlock("cidrBlock")
.ipv4IpamPoolId("ipv4IpamPoolId")
.ipv4NetmaskLength(123)
.ipv6CidrBlock("ipv6CidrBlock")
.ipv6IpamPoolId("ipv6IpamPoolId")
.ipv6NetmaskLength(123)
.ipv6Pool("ipv6Pool")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnVPCCidrBlock.Builder
A fluent builder for
CfnVPCCidrBlock. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnVPCCidrBlock(software.constructs.Construct scope,
String id,
CfnVPCCidrBlockProps props)
Create a new `AWS::EC2::VPCCidrBlock`.
|
protected |
CfnVPCCidrBlock(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnVPCCidrBlock(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAmazonProvidedIpv6CidrBlock()
Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getCidrBlock()
An IPv4 CIDR block to associate with the VPC.
|
String |
getIpv4IpamPoolId()
Associate a CIDR allocated from an IPv4 IPAM pool to a VPC.
|
Number |
getIpv4NetmaskLength()
The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
|
String |
getIpv6CidrBlock()
An IPv6 CIDR block from the IPv6 address pool.
|
String |
getIpv6IpamPoolId()
Associates a CIDR allocated from an IPv6 IPAM pool to a VPC.
|
Number |
getIpv6NetmaskLength()
The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
|
String |
getIpv6Pool()
The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
|
String |
getVpcId()
The ID of the VPC.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAmazonProvidedIpv6CidrBlock(Boolean value)
Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.
|
void |
setAmazonProvidedIpv6CidrBlock(IResolvable value)
Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.
|
void |
setCidrBlock(String value)
An IPv4 CIDR block to associate with the VPC.
|
void |
setIpv4IpamPoolId(String value)
Associate a CIDR allocated from an IPv4 IPAM pool to a VPC.
|
void |
setIpv4NetmaskLength(Number value)
The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
|
void |
setIpv6CidrBlock(String value)
An IPv6 CIDR block from the IPv6 address pool.
|
void |
setIpv6IpamPoolId(String value)
Associates a CIDR allocated from an IPv6 IPAM pool to a VPC.
|
void |
setIpv6NetmaskLength(Number value)
The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.
|
void |
setIpv6Pool(String value)
The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
|
void |
setVpcId(String value)
The ID of the VPC.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnVPCCidrBlock(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnVPCCidrBlock(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnVPCCidrBlock(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnVPCCidrBlockProps 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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getVpcId()
@Stability(value=Stable)
public void setVpcId(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getAmazonProvidedIpv6CidrBlock()
You cannot specify the range of IPv6 addresses, or the size of the CIDR block.
@Stability(value=Stable)
public void setAmazonProvidedIpv6CidrBlock(@Nullable
Boolean value)
You cannot specify the range of IPv6 addresses, or the size of the CIDR block.
@Stability(value=Stable)
public void setAmazonProvidedIpv6CidrBlock(@Nullable
IResolvable value)
You cannot specify the range of IPv6 addresses, or the size of the CIDR block.
@Stability(value=Stable) @Nullable public String getCidrBlock()
@Stability(value=Stable)
public void setCidrBlock(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getIpv4IpamPoolId()
For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
@Stability(value=Stable)
public void setIpv4IpamPoolId(@Nullable
String value)
For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
@Stability(value=Stable) @Nullable public Number getIpv4NetmaskLength()
For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
@Stability(value=Stable)
public void setIpv4NetmaskLength(@Nullable
Number value)
For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
@Stability(value=Stable) @Nullable public String getIpv6CidrBlock()
To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
@Stability(value=Stable)
public void setIpv6CidrBlock(@Nullable
String value)
To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
@Stability(value=Stable) @Nullable public String getIpv6IpamPoolId()
For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
@Stability(value=Stable)
public void setIpv6IpamPoolId(@Nullable
String value)
For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
@Stability(value=Stable) @Nullable public Number getIpv6NetmaskLength()
For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
@Stability(value=Stable)
public void setIpv6NetmaskLength(@Nullable
Number value)
For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
@Stability(value=Stable) @Nullable public String getIpv6Pool()
@Stability(value=Stable)
public void setIpv6Pool(@Nullable
String value)
Copyright © 2022. All rights reserved.