Class CfnEIP
A CloudFormation AWS::EC2::EIP
.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnEIP : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnEIP
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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 .
CloudformationResource: AWS::EC2::EIP
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-eip.html
ExampleMetadata: infused
Examples
Instance instance;
HostedZone myZone;
var elasticIp = new CfnEIP(this, "EIP", new CfnEIPProps {
Domain = "vpc",
InstanceId = instance.InstanceId
});
new ARecord(this, "ARecord", new ARecordProps {
Zone = myZone,
Target = RecordTarget.FromIpAddresses(elasticIp.Ref)
});
Synopsis
Constructors
CfnEIP(Construct, String, ICfnEIPProps) | Create a new |
CfnEIP(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnEIP(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrAllocationId | The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC. |
AttrPublicIp | The Elastic IP address. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Domain | The network ( |
InstanceId | The ID of the instance. |
NetworkBorderGroup | A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses. |
PublicIpv4Pool | The ID of an address pool that you own. |
Tags | Any tags assigned to the Elastic IP address. |
TransferAddress | The Elastic IP address you are accepting for transfer. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnEIP(Construct, String, ICfnEIPProps)
Create a new AWS::EC2::EIP
.
public CfnEIP(Construct scope, string id, ICfnEIPProps props = null)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnEIPProps
- resource properties.
CfnEIP(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnEIP(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnEIP(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnEIP(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrAllocationId
The ID that AWS assigns to represent the allocation of the address for use with Amazon VPC.
public virtual string AttrAllocationId { get; }
Property Value
System.String
Remarks
This is returned only for VPC elastic IP addresses. For example, eipalloc-5723d13e
.
CloudformationAttribute: AllocationId
AttrPublicIp
The Elastic IP address.
public virtual string AttrPublicIp { get; }
Property Value
System.String
Remarks
CloudformationAttribute: PublicIp
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Domain
The network ( vpc
).
public virtual string Domain { get; set; }
Property Value
System.String
Remarks
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.
InstanceId
The ID of the instance.
public virtual string InstanceId { get; set; }
Property Value
System.String
Remarks
Updates to the InstanceId
property may require some interruptions . Updates on an EIP reassociates the address on its associated resource.
NetworkBorderGroup
A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.
public virtual string NetworkBorderGroup { get; set; }
Property Value
System.String
Remarks
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.
PublicIpv4Pool
The ID of an address pool that you own.
public virtual string PublicIpv4Pool { get; set; }
Property Value
System.String
Remarks
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.
Tags
Any tags assigned to the Elastic IP address.
public virtual TagManager Tags { get; }
Property Value
Remarks
Updates to the Tags
property may require some interruptions . Updates on an EIP reassociates the address on its associated resource.
TransferAddress
The Elastic IP address you are accepting for transfer.
public virtual string TransferAddress { get; set; }
Property Value
System.String
Remarks
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 .
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>