BasePathMappingProps
- class aws_cdk.aws_apigateway.BasePathMappingProps(*, attach_to_stage=None, base_path=None, stage=None, domain_name, rest_api)
Bases:
BasePathMappingOptions
- Parameters:
attach_to_stage (
Optional
[bool
]) – 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 ifstage
is provided. Default: - truebase_path (
Optional
[str
]) – 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.stage (
Optional
[Stage
]) – The Deployment stage of API [disable-awslint:ref-via-interface]. Default: - map to deploymentStage of restApi otherwise stage needs to pass in URLdomain_name (
IDomainName
) – The DomainName to associate with this base path mapping.rest_api (
IRestApi
) – The RestApi resource to target.
- ExampleMetadata:
infused
Example:
# api: apigateway.RestApi domain_name = apigateway.DomainName.from_domain_name_attributes(self, "DomainName", domain_name="domainName", domain_name_alias_hosted_zone_id="domainNameAliasHostedZoneId", domain_name_alias_target="domainNameAliasTarget" ) apigateway.BasePathMapping(self, "BasePathMapping", domain_name=domain_name, rest_api=api )
Attributes
- attach_to_stage
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.- Default:
true
- base_path
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.
- domain_name
The DomainName to associate with this base path mapping.
- rest_api
The RestApi resource to target.
- stage
ref-via-interface].
- Default:
map to deploymentStage of restApi otherwise stage needs to pass in URL
- Type:
The Deployment stage of API [disable-awslint