Alpn Class
The ALPN protocol identifier.
Example
ts
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
declare const myZone: route53.HostedZone;
declare const distribution: cloudfront.CloudFrontWebDistribution;
// Alias to CloudFront target
new route53.HttpsRecord(this, 'HttpsRecord-CloudFrontAlias', {
zone: myZone,
target: route53.RecordTarget.fromAlias(new targets.CloudFrontTarget(distribution)),
});
// ServiceMode (priority >= 1)
new route53.HttpsRecord(this, 'HttpsRecord-ServiceMode', {
zone: myZone,
values: [route53.HttpsRecordValue.service({ alpn: [route53.Alpn.H3, route53.Alpn.H2] })],
});
// AliasMode (priority = 0)
new route53.HttpsRecord(this, 'HttpsRecord-AliasMode', {
zone: myZone,
values: [route53.HttpsRecordValue.alias('service.example.com')],
});
Properties
Methods
of(protocol: string): Alpn // chainable@staticmethod def of(protocol: str) -> Alpnpublic static Alpn of(String protocol)public static Alpn Of(string protocol)func Of(Protocol *string) Alpnstatic#A custom ALPN protocol identifier.
1 parameter
Parameters
protocolprotocolprotocolprotocolProtocol— The ALPN protocol identifier.