InterfaceVpcEndpointTarget Class
Set an InterfaceVpcEndpoint as a target for an ARecord.
Example
ts
import * as ec2 from 'aws-cdk-lib/aws-ec2';
declare const zone: route53.HostedZone;
declare const interfaceVpcEndpoint: ec2.InterfaceVpcEndpoint;
new route53.ARecord(this, 'AliasRecord', {
zone,
target: route53.RecordTarget.fromAlias(new targets.InterfaceVpcEndpointTarget(interfaceVpcEndpoint)),
});
python
import aws_cdk.aws_ec2 as ec2
# zone: route53.HostedZone
# interface_vpc_endpoint: ec2.InterfaceVpcEndpoint
route53.ARecord(self, "AliasRecord",
zone=zone,
target=route53.RecordTarget.from_alias(targets.InterfaceVpcEndpointTarget(interface_vpc_endpoint))
)
java
import software.amazon.awscdk.services.ec2.*;
HostedZone zone;
InterfaceVpcEndpoint interfaceVpcEndpoint;
ARecord.Builder.create(this, "AliasRecord")
.zone(zone)
.target(RecordTarget.fromAlias(new InterfaceVpcEndpointTarget(interfaceVpcEndpoint)))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.EC2;
HostedZone zone;
InterfaceVpcEndpoint interfaceVpcEndpoint;
new ARecord(this, "AliasRecord", new ARecordProps {
Zone = zone,
Target = RecordTarget.FromAlias(new InterfaceVpcEndpointTarget(interfaceVpcEndpoint))
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import ec2 "github.com/aws/aws-cdk-go/awscdk"
var zone HostedZone
var interfaceVpcEndpoint InterfaceVpcEndpoint
route53.NewARecord(this, jsii.String("AliasRecord"), &ARecordProps{
Zone: Zone,
Target: route53.RecordTarget_FromAlias(targets.NewInterfaceVpcEndpointTarget(interfaceVpcEndpoint)),
})
Initializer
ts
new InterfaceVpcEndpointTarget(vpcEndpoint: InterfaceVpcEndpoint)
python
InterfaceVpcEndpointTarget(vpc_endpoint: InterfaceVpcEndpoint)
java
new InterfaceVpcEndpointTarget(InterfaceVpcEndpoint vpcEndpoint)
csharp
new InterfaceVpcEndpointTarget(InterfaceVpcEndpoint vpcEndpoint)
go
NewInterfaceVpcEndpointTarget(VpcEndpoint InterfaceVpcEndpoint)
Methods
bind(_record: IRecordSet, _zone?: IHostedZone): AliasRecordTargetConfigdef bind(self, _record: IRecordSet, _zone: typing.Optional[IHostedZone] = None) -> AliasRecordTargetConfigpublic AliasRecordTargetConfig bind(IRecordSet _record, IHostedZone _zone)public AliasRecordTargetConfig Bind(IRecordSet _record, IHostedZone? _zone = null)func Bind(_record IRecordSet, _zone IHostedZone) AliasRecordTargetConfig#Return hosted zone ID and DNS name, usable for Route53 alias targets.