BasePathMappingProps Struct
Example
ts
declare const api: apigateway.RestApi;
const domainName = apigateway.DomainName.fromDomainNameAttributes(this, 'DomainName', {
domainName: 'domainName',
domainNameAliasHostedZoneId: 'domainNameAliasHostedZoneId',
domainNameAliasTarget: 'domainNameAliasTarget',
});
new apigateway.BasePathMapping(this, 'BasePathMapping', {
domainName: domainName,
restApi: api,
});
Properties
attachToStageoptionalbooleanattach_to_stageoptionalboolattachToStageoptionalBooleanAttachToStageoptionalboolAttachToStageoptional*bool= true#Whether to attach the base path mapping to a stage.
Use this property to create a base path mapping without attaching it to the Rest API default stage. This property is ignored if stage is provided.
basePathoptionalstringbase_pathoptionalstrbasePathoptionalStringBasePathoptionalstringBasePathoptional*string#The base path name that callers of the API must provide in the URL after the domain name (e.g. `example.com/base-path`). If you specify this property, it can't be an empty string.
Default: map requests from the domain root (e.g. example.com). If this is undefined, no additional mappings will be allowed on this domain name.
domainNameIDomainNameRefdomain_nameIDomainNameRefdomainNameIDomainNameRefDomainNameIDomainNameRefDomainNameIDomainNameRefrequired#The DomainName to associate with this base path mapping.
restApiIRestApiRefrest_apiIRestApiRefrestApiIRestApiRefRestApiIRestApiRefRestApiIRestApiRefrequired#The RestApi resource to target.