aws-cdk-lib.aws_sam.CfnHttpApiProps

interface CfnHttpApiProps

LanguageType name
.NETAmazon.CDK.AWS.SAM.CfnHttpApiProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssam#CfnHttpApiProps
Javasoftware.amazon.awscdk.services.sam.CfnHttpApiProps
Pythonaws_cdk.aws_sam.CfnHttpApiProps
TypeScript aws-cdk-lib » 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 { aws_sam as sam } from 'aws-cdk-lib';

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

NameTypeDescription
accessLogSetting?IResolvable | AccessLogSettingPropertyAWS::Serverless::HttpApi.AccessLogSetting.
auth?IResolvable | HttpApiAuthPropertyAWS::Serverless::HttpApi.Auth.
corsConfiguration?boolean | IResolvable | CorsConfigurationObjectPropertyAWS::Serverless::HttpApi.CorsConfiguration.
defaultRouteSettings?IResolvable | RouteSettingsPropertyAWS::Serverless::HttpApi.DefaultRouteSettings.
definitionBody?anyAWS::Serverless::HttpApi.DefinitionBody.
definitionUri?string | IResolvable | S3LocationPropertyAWS::Serverless::HttpApi.DefinitionUri.
description?stringAWS::Serverless::HttpApi.Description.
disableExecuteApiEndpoint?boolean | IResolvableAWS::Serverless::HttpApi.DisableExecuteApiEndpoint.
domain?IResolvable | HttpApiDomainConfigurationPropertyAWS::Serverless::HttpApi.Domain.
failOnWarnings?boolean | IResolvableAWS::Serverless::HttpApi.FailOnWarnings.
routeSettings?IResolvable | RouteSettingsPropertyAWS::Serverless::HttpApi.RouteSettings.
stageName?stringAWS::Serverless::HttpApi.StageName.
stageVariables?IResolvable | { [string]: string }AWS::Serverless::HttpApi.StageVariables.
tags?{ [string]: string }AWS::Serverless::HttpApi.Tags.

accessLogSetting?

Type: IResolvable | AccessLogSettingProperty (optional)

AWS::Serverless::HttpApi.AccessLogSetting.


auth?

Type: IResolvable | HttpApiAuthProperty (optional)

AWS::Serverless::HttpApi.Auth.


corsConfiguration?

Type: boolean | IResolvable | CorsConfigurationObjectProperty (optional)

AWS::Serverless::HttpApi.CorsConfiguration.


defaultRouteSettings?

Type: IResolvable | RouteSettingsProperty (optional)

AWS::Serverless::HttpApi.DefaultRouteSettings.


definitionBody?

Type: any (optional)

AWS::Serverless::HttpApi.DefinitionBody.


definitionUri?

Type: string | IResolvable | S3LocationProperty (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 | HttpApiDomainConfigurationProperty (optional)

AWS::Serverless::HttpApi.Domain.


failOnWarnings?

Type: boolean | IResolvable (optional)

AWS::Serverless::HttpApi.FailOnWarnings.


routeSettings?

Type: IResolvable | RouteSettingsProperty (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.