ApiMappingProps
Struct Stable
Properties used to create the ApiMapping resource.
| Source | aws-apigatewayv2/lib/common/api-mapping.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
import { aws_apigatewayv2 as interfaces_apigatewayv2 } from 'aws-cdk-lib/interfaces';
declare const apiRef: interfaces_apigatewayv2.IApiRef;
declare const domainNameRef: interfaces_apigatewayv2.IDomainNameRef;
declare const stage: apigatewayv2.IStage;
const apiMappingProps: apigatewayv2.ApiMappingProps = {
api: apiRef,
domainName: domainNameRef,
// the properties below are optional
apiMappingKey: 'apiMappingKey',
stage: stage,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigatewayv2 as apigatewayv2
from aws_cdk.interfaces import aws_apigatewayv2 as interfaces_apigatewayv2
# api_ref: interfaces_apigatewayv2.IApiRef
# domain_name_ref: interfaces_apigatewayv2.IDomainNameRef
# stage: apigatewayv2.IStage
api_mapping_props = apigatewayv2.ApiMappingProps(
api=api_ref,
domain_name=domain_name_ref,
# the properties below are optional
api_mapping_key="apiMappingKey",
stage=stage
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigatewayv2.*;
import software.amazon.awscdk.interfaces.apigatewayv2.*;
IApiRef apiRef;
IDomainNameRef domainNameRef;
IStage stage;
ApiMappingProps apiMappingProps = ApiMappingProps.builder()
.api(apiRef)
.domainName(domainNameRef)
// the properties below are optional
.apiMappingKey("apiMappingKey")
.stage(stage)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Apigatewayv2;
using Amazon.CDK.Interfaces.Apigatewayv2;
IApiRef apiRef;
IDomainNameRef domainNameRef;
IStage stage;
var apiMappingProps = new ApiMappingProps {
Api = apiRef,
DomainName = domainNameRef,
// the properties below are optional
ApiMappingKey = "apiMappingKey",
Stage = stage
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var apiRef IApiRef
var domainNameRef IDomainNameRef
var stage IStage
apiMappingProps := &ApiMappingProps{
Api: apiRef,
DomainName: domainNameRef,
// the properties below are optional
ApiMappingKey: jsii.String("apiMappingKey"),
Stage: stage,
}
Properties
The Api to which this mapping is applied.
apiMappingKeyoptionalstringapi_mapping_keyoptionalstrapiMappingKeyoptionalStringApiMappingKeyoptionalstringApiMappingKeyoptional*string #Api mapping key.
Default: undefined for the root path mapping.
The path where this stage should be mapped to on the domain
domainNameIDomainNameRefdomain_nameIDomainNameRefdomainNameIDomainNameRefDomainNameIDomainNameRefDomainNameIDomainNameRef required #custom domain name of the mapping target.