CfnEIPProps Struct
Properties for defining a CfnEIP.
| Source | |
|---|---|
| Type last changed |
Example
declare const instance: ec2.Instance;
const elasticIp = new ec2.CfnEIP(this, 'EIP', {
domain: 'vpc',
instanceId: instance.instanceId,
});
declare const myZone: route53.HostedZone;
new route53.ARecord(this, 'ARecord', {
zone: myZone,
target: route53.RecordTarget.fromIpAddresses(elasticIp.ref),
});
# instance: ec2.Instance
# my_zone: route53.HostedZone
elastic_ip = ec2.CfnEIP(self, "EIP",
domain="vpc",
instance_id=instance.instance_id
)
route53.ARecord(self, "ARecord",
zone=my_zone,
target=route53.RecordTarget.from_ip_addresses(elastic_ip.ref)
)
Instance instance;
HostedZone myZone;
CfnEIP elasticIp = CfnEIP.Builder.create(this, "EIP")
.domain("vpc")
.instanceId(instance.getInstanceId())
.build();
ARecord.Builder.create(this, "ARecord")
.zone(myZone)
.target(RecordTarget.fromIpAddresses(elasticIp.getRef()))
.build();
// Install: dotnet add package Amazon.CDK.Lib
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)
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var instance Instance
var myZone HostedZone
elasticIp := ec2.NewCfnEIP(this, jsii.String("EIP"), &CfnEIPProps{
Domain: jsii.String("vpc"),
InstanceId: instance.InstanceId,
})
route53.NewARecord(this, jsii.String("ARecord"), &ARecordProps{
Zone: myZone,
Target: route53.RecordTarget_FromIpAddresses(elasticIp.ref),
})
Properties
addressoptionalstringaddressoptionalstraddressoptionalStringAddressoptionalstringAddressoptional*string #domainoptionalstringdomainoptionalstrdomainoptionalStringDomainoptionalstringDomainoptional*string #notes
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.
instanceIdoptionalstring | IInstanceRefinstance_idoptionaltyping.Union[str, IInstanceRef]instanceIdoptionalStringInstanceIdoptionalstringInstanceIdoptionalinterface{} #Updates to the
InstanceIdproperty may require some interruptions . Updates on an EIP reassociates the address on its associated resource.
ipamPoolIdoptionalstringipam_pool_idoptionalstripamPoolIdoptionalStringIpamPoolIdoptionalstringIpamPoolIdoptional*string #For more information, see Allocate sequential Elastic IP addresses from an IPAM pool in the Amazon VPC IPAM User Guide .
networkBorderGroupoptionalstringnetwork_border_groupoptionalstrnetworkBorderGroupoptionalStringNetworkBorderGroupoptionalstringNetworkBorderGroupoptional*string #notes
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.
publicIpv4Pooloptionalstringpublic_ipv4_pooloptionalstrpublicIpv4PooloptionalStringPublicIpv4PooloptionalstringPublicIpv4Pooloptional*string #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.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #Updates to the
Tagsproperty may require some interruptions . Updates on an EIP reassociates the address on its associated resource.
transferAddressoptionalstringtransfer_addressoptionalstrtransferAddressoptionalStringTransferAddressoptionalstringTransferAddressoptional*string #notes
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 .