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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe network (vpc).voidsetInstanceId(String value) The ID of the instance.voidsetNetworkBorderGroup(String value) A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.voidsetPublicIpv4Pool(String value) The ID of an address pool that you own.voidsetTransferAddress(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, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
inspectin 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:
renderPropertiesin 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:
getCfnPropertiesin classCfnResource
-
getTags
Any tags assigned to the Elastic IP address.Updates to the
Tagsproperty 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
InstanceIdproperty may require some interruptions . Updates on an EIP reassociates the address on its associated resource. -
setInstanceId
The ID of the instance.Updates to the
InstanceIdproperty 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
InvalidParameterCombinationerror. -
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
InvalidParameterCombinationerror. -
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
PublicIpv4Poolproperty 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
PublicIpv4Poolproperty 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 .
-