interface CfnHttpApiProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.SAM.CfnHttpApiProps |
Java | software.amazon.awscdk.services.sam.CfnHttpApiProps |
Python | aws_cdk.aws_sam.CfnHttpApiProps |
TypeScript | @aws-cdk/aws-sam » CfnHttpApiProps |
Properties for defining a CfnHttpApi.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as sam from '@aws-cdk/aws-sam';
declare const authorizers: any;
declare const definitionBody: any;
const cfnHttpApiProps: sam.CfnHttpApiProps = {
accessLogSetting: {
destinationArn: 'destinationArn',
format: 'format',
},
auth: {
authorizers: authorizers,
defaultAuthorizer: 'defaultAuthorizer',
},
corsConfiguration: false,
defaultRouteSettings: {
dataTraceEnabled: false,
detailedMetricsEnabled: false,
loggingLevel: 'loggingLevel',
throttlingBurstLimit: 123,
throttlingRateLimit: 123,
},
definitionBody: definitionBody,
definitionUri: 'definitionUri',
description: 'description',
disableExecuteApiEndpoint: false,
domain: {
certificateArn: 'certificateArn',
domainName: 'domainName',
// the properties below are optional
basePath: 'basePath',
endpointConfiguration: 'endpointConfiguration',
mutualTlsAuthentication: {
truststoreUri: 'truststoreUri',
truststoreVersion: false,
},
route53: {
distributedDomainName: 'distributedDomainName',
evaluateTargetHealth: false,
hostedZoneId: 'hostedZoneId',
hostedZoneName: 'hostedZoneName',
ipV6: false,
},
securityPolicy: 'securityPolicy',
},
failOnWarnings: false,
routeSettings: {
dataTraceEnabled: false,
detailedMetricsEnabled: false,
loggingLevel: 'loggingLevel',
throttlingBurstLimit: 123,
throttlingRateLimit: 123,
},
stageName: 'stageName',
stageVariables: {
stageVariablesKey: 'stageVariables',
},
tags: {
tagsKey: 'tags',
},
};
Properties
| Name | Type | Description |
|---|---|---|
| access | IResolvable | Access | AWS::Serverless::HttpApi.AccessLogSetting. |
| auth? | IResolvable | Http | AWS::Serverless::HttpApi.Auth. |
| cors | boolean | IResolvable | Cors | AWS::Serverless::HttpApi.CorsConfiguration. |
| default | IResolvable | Route | AWS::Serverless::HttpApi.DefaultRouteSettings. |
| definition | any | AWS::Serverless::HttpApi.DefinitionBody. |
| definition | string | IResolvable | S3 | AWS::Serverless::HttpApi.DefinitionUri. |
| description? | string | AWS::Serverless::HttpApi.Description. |
| disable | boolean | IResolvable | AWS::Serverless::HttpApi.DisableExecuteApiEndpoint. |
| domain? | IResolvable | Http | AWS::Serverless::HttpApi.Domain. |
| fail | boolean | IResolvable | AWS::Serverless::HttpApi.FailOnWarnings. |
| route | IResolvable | Route | AWS::Serverless::HttpApi.RouteSettings. |
| stage | string | AWS::Serverless::HttpApi.StageName. |
| stage | IResolvable | { [string]: string } | AWS::Serverless::HttpApi.StageVariables. |
| tags? | { [string]: string } | AWS::Serverless::HttpApi.Tags. |
accessLogSetting?
Type:
IResolvable | Access
(optional)
AWS::Serverless::HttpApi.AccessLogSetting.
auth?
Type:
IResolvable | Http
(optional)
AWS::Serverless::HttpApi.Auth.
corsConfiguration?
Type:
boolean | IResolvable | Cors
(optional)
AWS::Serverless::HttpApi.CorsConfiguration.
defaultRouteSettings?
Type:
IResolvable | Route
(optional)
AWS::Serverless::HttpApi.DefaultRouteSettings.
definitionBody?
Type:
any
(optional)
AWS::Serverless::HttpApi.DefinitionBody.
definitionUri?
Type:
string | IResolvable | S3
(optional)
AWS::Serverless::HttpApi.DefinitionUri.
description?
Type:
string
(optional)
AWS::Serverless::HttpApi.Description.
disableExecuteApiEndpoint?
Type:
boolean | IResolvable
(optional)
AWS::Serverless::HttpApi.DisableExecuteApiEndpoint.
domain?
Type:
IResolvable | Http
(optional)
AWS::Serverless::HttpApi.Domain.
failOnWarnings?
Type:
boolean | IResolvable
(optional)
AWS::Serverless::HttpApi.FailOnWarnings.
routeSettings?
Type:
IResolvable | Route
(optional)
AWS::Serverless::HttpApi.RouteSettings.
stageName?
Type:
string
(optional)
AWS::Serverless::HttpApi.StageName.
stageVariables?
Type:
IResolvable | { [string]: string }
(optional)
AWS::Serverless::HttpApi.StageVariables.
tags?
Type:
{ [string]: string }
(optional)
AWS::Serverless::HttpApi.Tags.

.NET
Java
Python
TypeScript