Class CfnEIPAssociation
A CloudFormation AWS::EC2::EIPAssociation
.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnEIPAssociation : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnEIPAssociation
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Associates an Elastic IP address with an instance or a network interface. 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
.
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(Construct, String, ICfnEIPAssociationProps) | Create a new |
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 |
Properties
AllocationId | The allocation ID. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Eip | Deprecated. |
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(Construct, String, ICfnEIPAssociationProps)
Create a new AWS::EC2::EIPAssociation
.
public CfnEIPAssociation(Construct scope, string id, ICfnEIPAssociationProps props = null)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnEIPAssociationProps
- resource properties.
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
Properties
AllocationId
The allocation ID.
public virtual string AllocationId { get; set; }
Property Value
System.String
Remarks
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.
public virtual string Eip { get; set; }
Property Value
System.String
Remarks
InstanceId
The ID of the instance.
public virtual string InstanceId { get; set; }
Property Value
System.String
Remarks
The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
NetworkInterfaceId
The ID of the network interface.
public virtual string NetworkInterfaceId { get; set; }
Property Value
System.String
Remarks
If the instance has more than one network interface, you must specify a network interface ID.
You can specify either the instance ID or the network interface ID, but not both.
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
Remarks
If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
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>