aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
987 lines • 122 kB
TypeScript
import * as cdk from "../../core";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
/**
* The `AWS::ApiGatewayV2::Api` resource creates an API.
*
* WebSocket APIs and HTTP APIs are supported. For more information about WebSocket APIs, see [About WebSocket APIs in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-overview.html) in the *API Gateway Developer Guide* . For more information about HTTP APIs, see [HTTP APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api.html) in the *API Gateway Developer Guide.*
*
* @cloudformationResource AWS::ApiGatewayV2::Api
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html
*/
export declare class CfnApi extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnApi from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnApi;
/**
* The default endpoint for an API. For example: `https://abcdef.execute-api.us-west-2.amazonaws.com` .
*
* @cloudformationAttribute ApiEndpoint
*/
readonly attrApiEndpoint: string;
/**
* The API identifier.
*
* @cloudformationAttribute ApiId
*/
readonly attrApiId: string;
/**
* An API key selection expression.
*/
apiKeySelectionExpression?: string;
/**
* Specifies how to interpret the base path of the API during import.
*/
basePath?: string;
/**
* The OpenAPI definition.
*/
body?: any | cdk.IResolvable;
/**
* The S3 location of an OpenAPI definition.
*/
bodyS3Location?: CfnApi.BodyS3LocationProperty | cdk.IResolvable;
/**
* A CORS configuration.
*/
corsConfiguration?: CfnApi.CorsProperty | cdk.IResolvable;
/**
* This property is part of quick create.
*/
credentialsArn?: string;
/**
* The description of the API.
*/
description?: string;
/**
* Specifies whether clients can invoke your API by using the default `execute-api` endpoint.
*/
disableExecuteApiEndpoint?: boolean | cdk.IResolvable;
/**
* Avoid validating models when creating a deployment.
*/
disableSchemaValidation?: boolean | cdk.IResolvable;
/**
* Specifies whether to rollback the API creation when a warning is encountered.
*/
failOnWarnings?: boolean | cdk.IResolvable;
/**
* The name of the API.
*/
name?: string;
/**
* The API protocol.
*/
protocolType?: string;
/**
* This property is part of quick create.
*/
routeKey?: string;
/**
* The route selection expression for the API.
*/
routeSelectionExpression?: string;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* The collection of tags.
*/
tagsRaw?: Record<string, string>;
/**
* This property is part of quick create.
*/
target?: string;
/**
* A version identifier for the API.
*/
version?: string;
/**
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props?: CfnApiProps);
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnApi {
/**
* The `BodyS3Location` property specifies an S3 location from which to import an OpenAPI definition.
*
* Supported only for HTTP APIs.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html
*/
interface BodyS3LocationProperty {
/**
* The S3 bucket that contains the OpenAPI definition to import.
*
* Required if you specify a `BodyS3Location` for an API.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-bucket
*/
readonly bucket?: string;
/**
* The Etag of the S3 object.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-etag
*/
readonly etag?: string;
/**
* The key of the S3 object.
*
* Required if you specify a `BodyS3Location` for an API.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-key
*/
readonly key?: string;
/**
* The version of the S3 object.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-version
*/
readonly version?: string;
}
/**
* The `Cors` property specifies a CORS configuration for an API.
*
* Supported only for HTTP APIs. See [Configuring CORS](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html) for more information.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html
*/
interface CorsProperty {
/**
* Specifies whether credentials are included in the CORS request.
*
* Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowcredentials
*/
readonly allowCredentials?: boolean | cdk.IResolvable;
/**
* Represents a collection of allowed headers.
*
* Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowheaders
*/
readonly allowHeaders?: Array<string>;
/**
* Represents a collection of allowed HTTP methods.
*
* Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowmethods
*/
readonly allowMethods?: Array<string>;
/**
* Represents a collection of allowed origins.
*
* Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-alloworigins
*/
readonly allowOrigins?: Array<string>;
/**
* Represents a collection of exposed headers.
*
* Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-exposeheaders
*/
readonly exposeHeaders?: Array<string>;
/**
* The number of seconds that the browser should cache preflight request results.
*
* Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-maxage
*/
readonly maxAge?: number;
}
}
/**
* Properties for defining a `CfnApi`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html
*/
export interface CfnApiProps {
/**
* An API key selection expression.
*
* Supported only for WebSocket APIs. See [API Key Selection Expressions](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-apikeyselectionexpression
*/
readonly apiKeySelectionExpression?: string;
/**
* Specifies how to interpret the base path of the API during import.
*
* Valid values are `ignore` , `prepend` , and `split` . The default value is `ignore` . To learn more, see [Set the OpenAPI basePath Property](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-import-api-basePath.html) . Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-basepath
*/
readonly basePath?: string;
/**
* The OpenAPI definition.
*
* Supported only for HTTP APIs. To import an HTTP API, you must specify a `Body` or `BodyS3Location` . If you specify a `Body` or `BodyS3Location` , don't specify CloudFormation resources such as `AWS::ApiGatewayV2::Authorizer` or `AWS::ApiGatewayV2::Route` . API Gateway doesn't support the combination of OpenAPI and CloudFormation resources.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-body
*/
readonly body?: any | cdk.IResolvable;
/**
* The S3 location of an OpenAPI definition.
*
* Supported only for HTTP APIs. To import an HTTP API, you must specify a `Body` or `BodyS3Location` . If you specify a `Body` or `BodyS3Location` , don't specify CloudFormation resources such as `AWS::ApiGatewayV2::Authorizer` or `AWS::ApiGatewayV2::Route` . API Gateway doesn't support the combination of OpenAPI and CloudFormation resources.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-bodys3location
*/
readonly bodyS3Location?: CfnApi.BodyS3LocationProperty | cdk.IResolvable;
/**
* A CORS configuration.
*
* Supported only for HTTP APIs. See [Configuring CORS](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html) for more information.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-corsconfiguration
*/
readonly corsConfiguration?: CfnApi.CorsProperty | cdk.IResolvable;
/**
* This property is part of quick create.
*
* It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify `arn:aws:iam::*:user/*` . To use resource-based permissions on supported AWS services, specify `null` . Currently, this property is not used for HTTP integrations. Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-credentialsarn
*/
readonly credentialsArn?: string;
/**
* The description of the API.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-description
*/
readonly description?: string;
/**
* Specifies whether clients can invoke your API by using the default `execute-api` endpoint.
*
* By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-disableexecuteapiendpoint
*/
readonly disableExecuteApiEndpoint?: boolean | cdk.IResolvable;
/**
* Avoid validating models when creating a deployment.
*
* Supported only for WebSocket APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-disableschemavalidation
*/
readonly disableSchemaValidation?: boolean | cdk.IResolvable;
/**
* Specifies whether to rollback the API creation when a warning is encountered.
*
* By default, API creation continues if a warning is encountered.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-failonwarnings
*/
readonly failOnWarnings?: boolean | cdk.IResolvable;
/**
* The name of the API.
*
* Required unless you specify an OpenAPI definition for `Body` or `S3BodyLocation` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-name
*/
readonly name?: string;
/**
* The API protocol.
*
* Valid values are `WEBSOCKET` or `HTTP` . Required unless you specify an OpenAPI definition for `Body` or `S3BodyLocation` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-protocoltype
*/
readonly protocolType?: string;
/**
* This property is part of quick create.
*
* If you don't specify a `routeKey` , a default route of `$default` is created. The `$default` route acts as a catch-all for any request made to your API, for a particular stage. The `$default` route key can't be modified. You can add routes after creating the API, and you can update the route keys of additional routes. Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-routekey
*/
readonly routeKey?: string;
/**
* The route selection expression for the API.
*
* For HTTP APIs, the `routeSelectionExpression` must be `${request.method} ${request.path}` . If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-routeselectionexpression
*/
readonly routeSelectionExpression?: string;
/**
* The collection of tags.
*
* Each tag element is associated with a given resource.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-tags
*/
readonly tags?: Record<string, string>;
/**
* This property is part of quick create.
*
* Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-target
*/
readonly target?: string;
/**
* A version identifier for the API.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-api.html#cfn-apigatewayv2-api-version
*/
readonly version?: string;
}
/**
* The `AWS::ApiGatewayV2::ApiGatewayManagedOverrides` resource overrides the default properties of API Gateway-managed resources that are implicitly configured for you when you use quick create.
*
* When you create an API by using quick create, an `AWS::ApiGatewayV2::Route` , `AWS::ApiGatewayV2::Integration` , and `AWS::ApiGatewayV2::Stage` are created for you and associated with your `AWS::ApiGatewayV2::Api` . The `AWS::ApiGatewayV2::ApiGatewayManagedOverrides` resource enables you to set, or override the properties of these implicit resources. Supported only for HTTP APIs.
*
* @cloudformationResource AWS::ApiGatewayV2::ApiGatewayManagedOverrides
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apigatewaymanagedoverrides.html
*/
export declare class CfnApiGatewayManagedOverrides extends cdk.CfnResource implements cdk.IInspectable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnApiGatewayManagedOverrides from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnApiGatewayManagedOverrides;
/**
* The identifier.
*
* @cloudformationAttribute Id
*/
readonly attrId: string;
/**
* The ID of the API for which to override the configuration of API Gateway-managed resources.
*/
apiId: string;
/**
* Overrides the integration configuration for an API Gateway-managed integration.
*/
integration?: CfnApiGatewayManagedOverrides.IntegrationOverridesProperty | cdk.IResolvable;
/**
* Overrides the route configuration for an API Gateway-managed route.
*/
route?: cdk.IResolvable | CfnApiGatewayManagedOverrides.RouteOverridesProperty;
/**
* Overrides the stage configuration for an API Gateway-managed stage.
*/
stage?: cdk.IResolvable | CfnApiGatewayManagedOverrides.StageOverridesProperty;
/**
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnApiGatewayManagedOverridesProps);
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnApiGatewayManagedOverrides {
/**
* The `IntegrationOverrides` property overrides the integration settings for an API Gateway-managed integration.
*
* If you remove this property, API Gateway restores the default values.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides.html
*/
interface IntegrationOverridesProperty {
/**
* The description of the integration.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides-description
*/
readonly description?: string;
/**
* Specifies the integration's HTTP method type.
*
* For WebSocket APIs, if you use a Lambda integration, you must set the integration method to `POST` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides-integrationmethod
*/
readonly integrationMethod?: string;
/**
* Specifies the format of the payload sent to an integration.
*
* Required for HTTP APIs. For HTTP APIs, supported values for Lambda proxy integrations are `1.0` and `2.0` . For all other integrations, `1.0` is the only supported value. To learn more, see [Working with AWS Lambda proxy integrations for HTTP APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides-payloadformatversion
*/
readonly payloadFormatVersion?: string;
/**
* Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs.
*
* The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-integrationoverrides-timeoutinmillis
*/
readonly timeoutInMillis?: number;
}
/**
* The `StageOverrides` property overrides the stage configuration for an API Gateway-managed stage.
*
* If you remove this property, API Gateway restores the default values.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-stageoverrides.html
*/
interface StageOverridesProperty {
/**
* Settings for logging access in a stage.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-stageoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-stageoverrides-accesslogsettings
*/
readonly accessLogSettings?: CfnApiGatewayManagedOverrides.AccessLogSettingsProperty | cdk.IResolvable;
/**
* Specifies whether updates to an API automatically trigger a new deployment.
*
* The default value is `true` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-stageoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-stageoverrides-autodeploy
*/
readonly autoDeploy?: boolean | cdk.IResolvable;
/**
* The default route settings for the stage.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-stageoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-stageoverrides-defaultroutesettings
*/
readonly defaultRouteSettings?: cdk.IResolvable | CfnApiGatewayManagedOverrides.RouteSettingsProperty;
/**
* The description for the API stage.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-stageoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-stageoverrides-description
*/
readonly description?: string;
/**
* Route settings for the stage.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-stageoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-stageoverrides-routesettings
*/
readonly routeSettings?: any | cdk.IResolvable;
/**
* A map that defines the stage variables for a `Stage` .
*
* Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-stageoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-stageoverrides-stagevariables
*/
readonly stageVariables?: any | cdk.IResolvable;
}
/**
* The `AccessLogSettings` property overrides the access log settings for an API Gateway-managed stage.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-accesslogsettings.html
*/
interface AccessLogSettingsProperty {
/**
* The ARN of the CloudWatch Logs log group to receive access logs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-accesslogsettings.html#cfn-apigatewayv2-apigatewaymanagedoverrides-accesslogsettings-destinationarn
*/
readonly destinationArn?: string;
/**
* A single line format of the access logs of data, as specified by selected $context variables.
*
* The format must include at least $context.requestId.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-accesslogsettings.html#cfn-apigatewayv2-apigatewaymanagedoverrides-accesslogsettings-format
*/
readonly format?: string;
}
/**
* The `RouteSettings` property overrides the route settings for an API Gateway-managed route.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routesettings.html
*/
interface RouteSettingsProperty {
/**
* Specifies whether ( `true` ) or not ( `false` ) data trace logging is enabled for this route.
*
* This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routesettings.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routesettings-datatraceenabled
*/
readonly dataTraceEnabled?: boolean | cdk.IResolvable;
/**
* Specifies whether detailed metrics are enabled.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routesettings.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routesettings-detailedmetricsenabled
*/
readonly detailedMetricsEnabled?: boolean | cdk.IResolvable;
/**
* Specifies the logging level for this route: `INFO` , `ERROR` , or `OFF` .
*
* This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routesettings.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routesettings-logginglevel
*/
readonly loggingLevel?: string;
/**
* Specifies the throttling burst limit.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routesettings.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routesettings-throttlingburstlimit
*/
readonly throttlingBurstLimit?: number;
/**
* Specifies the throttling rate limit.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routesettings.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routesettings-throttlingratelimit
*/
readonly throttlingRateLimit?: number;
}
/**
* The `RouteOverrides` property overrides the route configuration for an API Gateway-managed route.
*
* If you remove this property, API Gateway restores the default values.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routeoverrides.html
*/
interface RouteOverridesProperty {
/**
* The authorization scopes supported by this route.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routeoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routeoverrides-authorizationscopes
*/
readonly authorizationScopes?: Array<string>;
/**
* The authorization type for the route.
*
* To learn more, see [AuthorizationType](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html#cfn-apigatewayv2-route-authorizationtype) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routeoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routeoverrides-authorizationtype
*/
readonly authorizationType?: string;
/**
* The identifier of the `Authorizer` resource to be associated with this route.
*
* The authorizer identifier is generated by API Gateway when you created the authorizer.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routeoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routeoverrides-authorizerid
*/
readonly authorizerId?: string;
/**
* The operation name for the route.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routeoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routeoverrides-operationname
*/
readonly operationName?: string;
/**
* For HTTP integrations, specify a fully qualified URL.
*
* For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-apigatewaymanagedoverrides-routeoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-routeoverrides-target
*/
readonly target?: string;
}
}
/**
* Properties for defining a `CfnApiGatewayManagedOverrides`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apigatewaymanagedoverrides.html
*/
export interface CfnApiGatewayManagedOverridesProps {
/**
* The ID of the API for which to override the configuration of API Gateway-managed resources.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apigatewaymanagedoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-apiid
*/
readonly apiId: string;
/**
* Overrides the integration configuration for an API Gateway-managed integration.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apigatewaymanagedoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-integration
*/
readonly integration?: CfnApiGatewayManagedOverrides.IntegrationOverridesProperty | cdk.IResolvable;
/**
* Overrides the route configuration for an API Gateway-managed route.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apigatewaymanagedoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-route
*/
readonly route?: cdk.IResolvable | CfnApiGatewayManagedOverrides.RouteOverridesProperty;
/**
* Overrides the stage configuration for an API Gateway-managed stage.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apigatewaymanagedoverrides.html#cfn-apigatewayv2-apigatewaymanagedoverrides-stage
*/
readonly stage?: cdk.IResolvable | CfnApiGatewayManagedOverrides.StageOverridesProperty;
}
/**
* The `AWS::ApiGatewayV2::ApiMapping` resource contains an API mapping.
*
* An API mapping relates a path of your custom domain name to a stage of your API. A custom domain name can have multiple API mappings, but the paths can't overlap. A custom domain can map only to APIs of the same protocol type. For more information, see [CreateApiMapping](https://docs.aws.amazon.com/apigatewayv2/latest/api-reference/domainnames-domainname-apimappings.html#CreateApiMapping) in the *Amazon API Gateway V2 API Reference* .
*
* @cloudformationResource AWS::ApiGatewayV2::ApiMapping
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html
*/
export declare class CfnApiMapping extends cdk.CfnResource implements cdk.IInspectable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnApiMapping from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnApiMapping;
/**
* The API mapping resource ID.
*
* @cloudformationAttribute ApiMappingId
*/
readonly attrApiMappingId: string;
/**
* The API identifier.
*/
apiId: string;
/**
* The API mapping key.
*/
apiMappingKey?: string;
/**
* The domain name.
*/
domainName: string;
/**
* The API stage.
*/
stage: string;
/**
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnApiMappingProps);
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
/**
* Properties for defining a `CfnApiMapping`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html
*/
export interface CfnApiMappingProps {
/**
* The API identifier.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-apiid
*/
readonly apiId: string;
/**
* The API mapping key.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-apimappingkey
*/
readonly apiMappingKey?: string;
/**
* The domain name.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-domainname
*/
readonly domainName: string;
/**
* The API stage.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-apimapping.html#cfn-apigatewayv2-apimapping-stage
*/
readonly stage: string;
}
/**
* The `AWS::ApiGatewayV2::Authorizer` resource creates an authorizer for a WebSocket API or an HTTP API.
*
* To learn more, see [Controlling and managing access to a WebSocket API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-control-access.html) and [Controlling and managing access to an HTTP API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-access-control.html) in the *API Gateway Developer Guide* .
*
* @cloudformationResource AWS::ApiGatewayV2::Authorizer
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html
*/
export declare class CfnAuthorizer extends cdk.CfnResource implements cdk.IInspectable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnAuthorizer from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnAuthorizer;
/**
* The authorizer ID.
*
* @cloudformationAttribute AuthorizerId
*/
readonly attrAuthorizerId: string;
/**
* The API identifier.
*/
apiId: string;
/**
* Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.
*/
authorizerCredentialsArn?: string;
/**
* Specifies the format of the payload sent to an HTTP API Lambda authorizer.
*/
authorizerPayloadFormatVersion?: string;
/**
* The time to live (TTL) for cached authorizer results, in seconds.
*/
authorizerResultTtlInSeconds?: number;
/**
* The authorizer type.
*/
authorizerType: string;
/**
* The authorizer's Uniform Resource Identifier (URI).
*/
authorizerUri?: string;
/**
* Specifies whether a Lambda authorizer returns a response in a simple format.
*/
enableSimpleResponses?: boolean | cdk.IResolvable;
/**
* The identity source for which authorization is requested.
*/
identitySource?: Array<string>;
/**
* This parameter is not used.
*/
identityValidationExpression?: string;
/**
* The `JWTConfiguration` property specifies the configuration of a JWT authorizer.
*/
jwtConfiguration?: cdk.IResolvable | CfnAuthorizer.JWTConfigurationProperty;
/**
* The name of the authorizer.
*/
name: string;
/**
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnAuthorizerProps);
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnAuthorizer {
/**
* The `JWTConfiguration` property specifies the configuration of a JWT authorizer.
*
* Required for the `JWT` authorizer type. Supported only for HTTP APIs.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html
*/
interface JWTConfigurationProperty {
/**
* A list of the intended recipients of the JWT.
*
* A valid JWT must provide an `aud` that matches at least one entry in this list. See [RFC 7519](https://docs.aws.amazon.com/https://tools.ietf.org/html/rfc7519#section-4.1.3) . Required for the `JWT` authorizer type. Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html#cfn-apigatewayv2-authorizer-jwtconfiguration-audience
*/
readonly audience?: Array<string>;
/**
* The base domain of the identity provider that issues JSON Web Tokens.
*
* For example, an Amazon Cognito user pool has the following format: `https://cognito-idp. {region} .amazonaws.com/ {userPoolId}` . Required for the `JWT` authorizer type. Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html#cfn-apigatewayv2-authorizer-jwtconfiguration-issuer
*/
readonly issuer?: string;
}
}
/**
* Properties for defining a `CfnAuthorizer`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html
*/
export interface CfnAuthorizerProps {
/**
* The API identifier.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-apiid
*/
readonly apiId: string;
/**
* Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.
*
* To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for `REQUEST` authorizers.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizercredentialsarn
*/
readonly authorizerCredentialsArn?: string;
/**
* Specifies the format of the payload sent to an HTTP API Lambda authorizer.
*
* Required for HTTP API Lambda authorizers. Supported values are `1.0` and `2.0` . To learn more, see [Working with AWS Lambda authorizers for HTTP APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizerpayloadformatversion
*/
readonly authorizerPayloadFormatVersion?: string;
/**
* The time to live (TTL) for cached authorizer results, in seconds.
*
* If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway caches authorizer responses. The maximum value is 3600, or 1 hour. Supported only for HTTP API Lambda authorizers.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizerresultttlinseconds
*/
readonly authorizerResultTtlInSeconds?: number;
/**
* The authorizer type.
*
* Specify `REQUEST` for a Lambda function using incoming request parameters. Specify `JWT` to use JSON Web Tokens (supported only for HTTP APIs).
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizertype
*/
readonly authorizerType: string;
/**
* The authorizer's Uniform Resource Identifier (URI).
*
* For `REQUEST` authorizers, this must be a well-formed Lambda function URI, for example, `arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2: *{account_id}* :function: *{lambda_function_name}* /invocations` . In general, the URI has this form: `arn:aws:apigateway: *{region}* :lambda:path/ *{service_api}*` , where *{region}* is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial `/` . For Lambda functions, this is usually of the form `/2015-03-31/functions/[FunctionARN]/invocations` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-authorizeruri
*/
readonly authorizerUri?: string;
/**
* Specifies whether a Lambda authorizer returns a response in a simple format.
*
* By default, a Lambda authorizer must return an IAM policy. If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy. Supported only for HTTP APIs. To learn more, see [Working with AWS Lambda authorizers for HTTP APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-enablesimpleresponses
*/
readonly enableSimpleResponses?: boolean | cdk.IResolvable;
/**
* The identity source for which authorization is requested.
*
* For a `REQUEST` authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. The identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name for WebSocket APIs. For HTTP APIs, use selection expressions prefixed with `$` , for example, `$request.header.Auth` , `$request.querystring.Name` . These parameters are used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function. For HTTP APIs, identity sources are also used as the cache key when caching is enabled. To learn more, see [Working with AWS Lambda authorizers for HTTP APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html) .
*
* For `JWT` , a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example `$request.header.Authorization` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource
*/
readonly identitySource?: Array<string>;
/**
* This parameter is not used.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identityvalidationexpression
*/
readonly identityValidationExpression?: string;
/**
* The `JWTConfiguration` property specifies the configuration of a JWT authorizer.
*
* Required for the `JWT` authorizer type. Supported only for HTTP APIs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-jwtconfiguration
*/
readonly jwtConfiguration?: cdk.IResolvable | CfnAuthorizer.JWTConfigurationProperty;
/**
* The name of the authorizer.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-name
*/
readonly name: string;
}
/**
* The `AWS::ApiGatewayV2::Deployment` resource creates a deployment for an API.
*
* @cloudformationResource AWS::ApiGatewayV2::Deployment
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-deployment.html
*/
export declare class CfnDeployment extends cdk.CfnResource implements cdk.IInspectable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnDeployment f