interface DomainMappingOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Apigatewayv2.DomainMappingOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#DomainMappingOptions |
![]() | software.amazon.awscdk.services.apigatewayv2.DomainMappingOptions |
![]() | aws_cdk.aws_apigatewayv2.DomainMappingOptions |
![]() | aws-cdk-lib » aws_apigatewayv2 » DomainMappingOptions |
Options for DomainMapping.
Example
import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
declare const handler: lambda.Function;
declare const dn: apigwv2.DomainName;
const apiDemo = new apigwv2.HttpApi(this, 'DemoApi', {
defaultIntegration: new HttpLambdaIntegration('DefaultIntegration', handler),
// https://${dn.domainName}/demo goes to apiDemo $default stage
defaultDomainMapping: {
domainName: dn,
mappingKey: 'demo',
},
});
Properties
Name | Type | Description |
---|---|---|
domain | IDomain | The domain name for the mapping. |
mapping | string | The API mapping key. |
domainName
Type:
IDomain
The domain name for the mapping.
mappingKey?
Type:
string
(optional, default: empty key for the root path mapping)
The API mapping key.
Leave it undefined for the root path mapping.