CfnEIPAssociationProps Struct
Properties for defining a CfnEIPAssociation.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnEIPAssociationProps: ec2.CfnEIPAssociationProps = {
allocationId: 'allocationId',
eip: 'eip',
instanceId: 'instanceId',
networkInterfaceId: 'networkInterfaceId',
privateIpAddress: 'privateIpAddress',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
cfn_eip_association_props = ec2.CfnEIPAssociationProps(
allocation_id="allocationId",
eip="eip",
instance_id="instanceId",
network_interface_id="networkInterfaceId",
private_ip_address="privateIpAddress"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
CfnEIPAssociationProps cfnEIPAssociationProps = CfnEIPAssociationProps.builder()
.allocationId("allocationId")
.eip("eip")
.instanceId("instanceId")
.networkInterfaceId("networkInterfaceId")
.privateIpAddress("privateIpAddress")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 cfnEIPAssociationProps = new CfnEIPAssociationProps {
AllocationId = "allocationId",
Eip = "eip",
InstanceId = "instanceId",
NetworkInterfaceId = "networkInterfaceId",
PrivateIpAddress = "privateIpAddress"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnEIPAssociationProps := &CfnEIPAssociationProps{
AllocationId: jsii.String("allocationId"),
Eip: jsii.String("eip"),
InstanceId: jsii.String("instanceId"),
NetworkInterfaceId: jsii.String("networkInterfaceId"),
PrivateIpAddress: jsii.String("privateIpAddress"),
}
Properties
allocationIdoptionalstringallocation_idoptionalstrallocationIdoptionalStringAllocationIdoptionalstringAllocationIdoptional*string #The allocation ID.
This is required.
eipoptionalstring | IEIPRefeipoptionaltyping.Union[str, IEIPRef]eipoptionalStringEipoptionalstringEipoptionalinterface{} deprecated #this property has been deprecated
instanceIdoptionalstring | IInstanceRefinstance_idoptionaltyping.Union[str, IInstanceRef]instanceIdoptionalStringInstanceIdoptionalstringInstanceIdoptionalinterface{} #The ID of the instance.
The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
networkInterfaceIdoptionalstring | INetworkInterfaceRefnetwork_interface_idoptionaltyping.Union[str, INetworkInterfaceRef]networkInterfaceIdoptionalStringNetworkInterfaceIdoptionalstringNetworkInterfaceIdoptionalinterface{} #The ID of the network interface.
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.
privateIpAddressoptionalstringprivate_ip_addressoptionalstrprivateIpAddressoptionalStringPrivateIpAddressoptionalstringPrivateIpAddressoptional*string #The primary or secondary private IP address to associate with the Elastic IP address.
If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.