Class CfnEIPAssociation
Associates an Elastic IP address with an instance or a network interface.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnEIPAssociation : CfnResource, IInspectable
Syntax (vb)
Public Class CfnEIPAssociation
Inherits CfnResource
Implements IInspectable
Remarks
Before you can use an Elastic IP address, you must allocate it to your account. For more information about working with Elastic IP addresses, see Elastic IP address concepts and rules .
You must specify AllocationId
and either InstanceId
, NetworkInterfaceId
, or PrivateIpAddress
.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-eipassociation.html
CloudformationResource: AWS::EC2::EIPAssociation
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnEIPAssociation = new CfnEIPAssociation(this, "MyCfnEIPAssociation", new CfnEIPAssociationProps {
AllocationId = "allocationId",
Eip = "eip",
InstanceId = "instanceId",
NetworkInterfaceId = "networkInterfaceId",
PrivateIpAddress = "privateIpAddress"
});
Synopsis
Constructors
CfnEIPAssociation(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnEIPAssociation(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnEIPAssociation(Construct, String, ICfnEIPAssociationProps) |
Properties
AllocationId | The allocation ID. |
AttrId | The ID of the association. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Eip | (deprecated) The Elastic IP address to associate with the instance. |
InstanceId | The ID of the instance. |
NetworkInterfaceId | The ID of the network interface. |
PrivateIpAddress | The primary or secondary private IP address to associate with the Elastic IP address. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnEIPAssociation(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnEIPAssociation(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnEIPAssociation(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnEIPAssociation(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnEIPAssociation(Construct, String, ICfnEIPAssociationProps)
public CfnEIPAssociation(Construct scope, string id, ICfnEIPAssociationProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnEIPAssociationProps
Resource properties.
Properties
AllocationId
The allocation ID.
public virtual string AllocationId { get; set; }
Property Value
System.String
AttrId
The ID of the association.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
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
Eip
(deprecated) The Elastic IP address to associate with the instance.
public virtual string Eip { get; set; }
Property Value
System.String
Remarks
Stability: Deprecated
InstanceId
The ID of the instance.
public virtual string InstanceId { get; set; }
Property Value
System.String
NetworkInterfaceId
The ID of the network interface.
public virtual string NetworkInterfaceId { get; set; }
Property Value
System.String
PrivateIpAddress
The primary or secondary private IP address to associate with the Elastic IP address.
public virtual string PrivateIpAddress { get; set; }
Property Value
System.String
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>