class Alpn
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Route53.Alpn |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsroute53#Alpn |
![]() | software.amazon.awscdk.services.route53.Alpn |
![]() | aws_cdk.aws_route53.Alpn |
![]() | aws-cdk-lib » aws_route53 » Alpn |
The ALPN protocol identifier.
Example
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
Name | Type | Description |
---|---|---|
protocol | string | The ALPN protocol identifier. |
static H2 | Alpn | HTTP2. |
static H3 | Alpn | HTTP3 (QUIC). |
static HTTP1_1 | Alpn | HTTP/1.1. |
protocol
Type:
string
The ALPN protocol identifier.
static H2
Type:
Alpn
HTTP2.
static H3
Type:
Alpn
HTTP3 (QUIC).
static HTTP1_1
Type:
Alpn
HTTP/1.1.
Methods
Name | Description |
---|---|
static of(protocol) | A custom ALPN protocol identifier. |
static of(protocol)
public static of(protocol: string): Alpn
Parameters
- protocol
string
— The ALPN protocol identifier.
Returns
A custom ALPN protocol identifier.