Class CfnEIP
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::EC2::EIP
.
Specifies an Elastic IP (EIP) address and can, optionally, associate it with an Amazon EC2 instance.
You can allocate an Elastic IP address from an address pool owned by AWS or from an address pool created from a public IPv4 address range that you have brought to AWS for use with your AWS resources using bring your own IP addresses (BYOIP). For more information, see Bring Your Own IP Addresses (BYOIP) in the Amazon EC2 User Guide .
For more information, see Elastic IP Addresses in the Amazon EC2 User Guide .
Example:
Instance instance; HostedZone myZone; CfnEIP elasticIp = CfnEIP.Builder.create(this, "EIP") .domain("vpc") .instanceId(instance.getInstanceId()) .build(); ARecord.Builder.create(this, "ARecord") .zone(myZone) .target(RecordTarget.fromIpAddresses(elasticIp.getRef())) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe ID that AWS assigns to represent the allocation of the address for use with Amazon VPC.The Elastic IP address.The network (vpc
).The ID of the instance.A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.The ID of an address pool that you own.getTags()
Any tags assigned to the Elastic IP address.The Elastic IP address you are accepting for transfer.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The network (vpc
).void
setInstanceId
(String value) The ID of the instance.void
setNetworkBorderGroup
(String value) A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.void
setPublicIpv4Pool
(String value) The ID of an address pool that you own.void
setTransferAddress
(String value) The Elastic IP address you are accepting for transfer.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnEIP
protected CfnEIP(software.amazon.jsii.JsiiObjectRef objRef) -
CfnEIP
protected CfnEIP(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnEIP
@Stability(Stable) public CfnEIP(@NotNull Construct scope, @NotNull String id, @Nullable CfnEIPProps props) Create a newAWS::EC2::EIP
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
CfnEIP
Create a newAWS::EC2::EIP
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrAllocationId
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC.This is returned only for VPC elastic IP addresses. For example,
eipalloc-5723d13e
. -
getAttrPublicIp
The Elastic IP address. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Any tags assigned to the Elastic IP address.Updates to the
Tags
property may require some interruptions . Updates on an EIP reassociates the address on its associated resource. -
getDomain
The network (vpc
).If you define an Elastic IP address and associate it with a VPC that is defined in the same template, you must declare a dependency on the VPC-gateway attachment by using the DependsOn Attribute on this resource.
-
setDomain
The network (vpc
).If you define an Elastic IP address and associate it with a VPC that is defined in the same template, you must declare a dependency on the VPC-gateway attachment by using the DependsOn Attribute on this resource.
-
getInstanceId
The ID of the instance.Updates to the
InstanceId
property may require some interruptions . Updates on an EIP reassociates the address on its associated resource. -
setInstanceId
The ID of the instance.Updates to the
InstanceId
property may require some interruptions . Updates on an EIP reassociates the address on its associated resource. -
getNetworkBorderGroup
A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.
Use DescribeAvailabilityZones to view the network border groups.
You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 Classic, you receive an
InvalidParameterCombination
error. -
setNetworkBorderGroup
A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.
Use DescribeAvailabilityZones to view the network border groups.
You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 Classic, you receive an
InvalidParameterCombination
error. -
getPublicIpv4Pool
The ID of an address pool that you own.Use this parameter to let Amazon EC2 select an address from the address pool.
Updates to the
PublicIpv4Pool
property may require some interruptions . Updates on an EIP reassociates the address on its associated resource. -
setPublicIpv4Pool
The ID of an address pool that you own.Use this parameter to let Amazon EC2 select an address from the address pool.
Updates to the
PublicIpv4Pool
property may require some interruptions . Updates on an EIP reassociates the address on its associated resource. -
getTransferAddress
The Elastic IP address you are accepting for transfer.You can only accept one transferred address. For more information on Elastic IP address transfers, see Transfer Elastic IP addresses in the Amazon Virtual Private Cloud User Guide .
-
setTransferAddress
The Elastic IP address you are accepting for transfer.You can only accept one transferred address. For more information on Elastic IP address transfers, see Transfer Elastic IP addresses in the Amazon Virtual Private Cloud User Guide .
-