Skip to content

AtfRestApiProps

Open in ChatGPTOpen in Claude

Defined in: packages/constructs/src/api/rest-api.ts:38

  • Omit<apigateway.RestApiProps, "restApiName" | "deployOptions" | "defaultCorsPreflightOptions">

readonly optional apiKeySourceType?: ApiKeySourceType

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:244

The source of the API key for metering requests according to a usage plan.

- Metering is disabled.

Omit.apiKeySourceType


readonly optional binaryMediaTypes?: string[]

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:208

The list of binary media mime-types that are supported by the RestApi resource, such as “image/png” or “application/octet-stream”

- RestApi supports only UTF-8-encoded text payloads.

Omit.binaryMediaTypes


readonly optional cloneFrom?: IRestApi

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:237

The ID of the API Gateway RestApi resource that you want to clone.

- None.

Omit.cloneFrom


readonly optional cloudWatchRole?: boolean

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:153

Automatically configure an AWS CloudWatch role for API Gateway.

  • false if @aws-cdk/aws-apigateway:disableCloudWatchRole is enabled, true otherwise

Omit.cloudWatchRole


readonly optional cloudWatchRoleRemovalPolicy?: RemovalPolicy

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:161

The removal policy applied to the AWS CloudWatch role when this resource is removed from the application. Requires cloudWatchRole to be enabled.

- RemovalPolicy.RETAIN

Omit.cloudWatchRoleRemovalPolicy


optional corsAllowedOrigins?: string[]

Defined in: packages/constructs/src/api/rest-api.ts:48

CORS allowed origins — Axis wires preflight automatically


readonly optional defaultIntegration?: Integration

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/resource.d.ts:109

An integration to use as a default for all methods created within this API unless an integration is specified.

- Inherited from parent.

Omit.defaultIntegration


readonly optional defaultMethodOptions?: MethodOptions

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/resource.d.ts:116

Method options to use as a default for all methods created within this API unless custom options are specified.

- Inherited from parent.

Omit.defaultMethodOptions


readonly optional deploy?: boolean

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:97

Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.

Since API Gateway deployments are immutable, When this option is enabled (by default), an AWS::ApiGateway::Deployment resource will automatically created with a logical ID that hashes the API model (methods, resources and options). This means that when the model changes, the logical ID of this CloudFormation resource will change, and a new deployment will be created.

If this is set, latestDeployment will refer to the Deployment object and deploymentStage will refer to a Stage that points to this deployment. To customize the stage options, use the deployOptions property.

A CloudFormation Output will also be defined with the root URL endpoint of this REST API.

true

Omit.deploy


readonly optional description?: string

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:196

A description of the RestApi construct.

- 'Automatically created by the RestApi construct'

Omit.description


readonly optional disableExecuteApiEndpoint?: boolean

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:190

Specifies whether clients can invoke the API using the default execute-api endpoint. To require that clients use a custom domain name to invoke the API, disable the default endpoint.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html

false

Omit.disableExecuteApiEndpoint


readonly optional domainName?: DomainNameOptions

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:147

Configure a custom domain name and map it to this API.

  • no domain name is defined, use addDomainName or directly define a DomainName.

Omit.domainName


readonly optional endpointConfiguration?: EndpointConfiguration

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:181

The EndpointConfiguration property type specifies the endpoint types of a REST API

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-restapi-endpointconfiguration.html

EndpointType.EDGE

Omit.endpointConfiguration


readonly optional endpointExportName?: string

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:167

Export name for the CfnOutput containing the API endpoint

- when no export name is given, output will be created without export

Omit.endpointExportName


readonly optional endpointTypes?: EndpointType[]

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:174

A list of the endpoint types of the API. Use this property when creating an API.

EndpointType.EDGE

Omit.endpointTypes


envConfig: BaseEnvConfig

Defined in: packages/constructs/src/api/rest-api.ts:44


readonly optional failOnWarnings?: boolean

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:141

Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.

false

Omit.failOnWarnings


optional lambdaAuthorizer?: AtfLambdaAuthorizerConfig

Defined in: packages/constructs/src/api/rest-api.ts:56

Optional Lambda (REQUEST) authorizer for routes with authorizer:“custom”.


lambdaConfigs: ApiLambdaConfig[]

Defined in: packages/constructs/src/api/rest-api.ts:50

API lambda route configs


readonly optional minCompressionSize?: Size

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:231

A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

- Compression is disabled.

Omit.minCompressionSize


readonly optional minimumCompressionSize?: number

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:220

A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

- Compression is disabled.

Omit.minimumCompressionSize


readonly optional parameters?: object

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:126

Custom header parameters for the request.

[key: string]: string

https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html

- No parameters.

Omit.parameters


readonly optional policy?: PolicyDocument

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:134

A policy document that contains the permissions for this RestApi

- No policy.

Omit.policy


projectRoot: string

Defined in: packages/constructs/src/api/rest-api.ts:54

Project root for entry path resolution


registry: ResourceRegistry

Defined in: packages/constructs/src/api/rest-api.ts:52

Resource registry for token resolution


readonly optional retainDeployments?: boolean

Defined in: node_modules/.pnpm/aws-cdk-lib@2.261.0_constructs@10.7.0/node_modules/aws-cdk-lib/aws-apigateway/lib/restapi.d.ts:113

Retains old deployment resources when the API changes. This allows manually reverting stages to point to old deployments via the AWS Console.

false

Omit.retainDeployments


optional userPool?: IUserPool

Defined in: packages/constructs/src/api/rest-api.ts:46

Cognito User Pool for the default authorizer

© 2026 Axis Tech. Powered by axis-tech.co.