@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.164Z") @Stability(value=Stable) public class CfnEIP extends CfnResource implements IInspectable
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 .
[EC2-VPC] If you release an Elastic IP address, you might be able to recover it. You cannot recover an Elastic IP address that you released after it is allocated to another AWS account. You cannot recover an Elastic IP address for EC2-Classic. To attempt to recover an Elastic IP address that you released, specify it in this operation.
An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic per Region and 5 Elastic IP addresses for EC2-VPC per Region.
For more information, see Elastic IP Addresses in the Amazon EC2 User Guide .
Example:
Listener listener;
CfnEIP eip;
listener.addEndpointGroup("Group", EndpointGroupOptions.builder()
.endpoints(List.of(
CfnEipEndpoint.Builder.create(eip)
.weight(128)
.build()))
.build());
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnEIP.Builder
A fluent builder for
CfnEIP. |
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 |
|---|---|
|
CfnEIP(software.constructs.Construct scope,
String id)
Create a new `AWS::EC2::EIP`.
|
|
CfnEIP(software.constructs.Construct scope,
String id,
CfnEIPProps props)
Create a new `AWS::EC2::EIP`.
|
protected |
CfnEIP(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnEIP(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrAllocationId()
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDomain()
Indicates whether the Elastic IP address is for use with instances in a VPC or instance in EC2-Classic.
|
String |
getInstanceId()
The ID of the instance.
|
String |
getNetworkBorderGroup()
`AWS::EC2::EIP.NetworkBorderGroup`.
|
String |
getPublicIpv4Pool()
The ID of an address pool that you own.
|
TagManager |
getTags()
Any tags assigned to the Elastic IP address.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDomain(String value)
Indicates whether the Elastic IP address is for use with instances in a VPC or instance in EC2-Classic.
|
void |
setInstanceId(String value)
The ID of the instance.
|
void |
setNetworkBorderGroup(String value)
`AWS::EC2::EIP.NetworkBorderGroup`.
|
void |
setPublicIpv4Pool(String value)
The ID of an address pool that you own.
|
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 CfnEIP(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnEIP(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnEIP(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
CfnEIPProps 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.@Stability(value=Stable)
public CfnEIP(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. 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 public String getAttrAllocationId()
This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e .
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
Updates to the
Tagsproperty may require some interruptions . Updates on an EIP reassociates the address on its associated resource.
@Stability(value=Stable) @Nullable public String getDomain()
Default: If the Region supports EC2-Classic, the default is standard . Otherwise, the default is vpc .
Use when allocating an address for use with a VPC if the Region supports EC2-Classic.
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.
@Stability(value=Stable)
public void setDomain(@Nullable
String value)
Default: If the Region supports EC2-Classic, the default is standard . Otherwise, the default is vpc .
Use when allocating an address for use with a VPC if the Region supports EC2-Classic.
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.
@Stability(value=Stable) @Nullable public String getInstanceId()
Updates to the
InstanceIdproperty may require some interruptions . Updates on an EIP reassociates the address on its associated resource.
@Stability(value=Stable)
public void setInstanceId(@Nullable
String value)
Updates to the
InstanceIdproperty may require some interruptions . Updates on an EIP reassociates the address on its associated resource.
@Stability(value=Stable) @Nullable public String getNetworkBorderGroup()
@Stability(value=Stable)
public void setNetworkBorderGroup(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getPublicIpv4Pool()
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.
@Stability(value=Stable)
public void setPublicIpv4Pool(@Nullable
String value)
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.
Copyright © 2022. All rights reserved.