aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.47k stars 3.83k forks source link

(sam): support property ‘DisableExecuteApiEndpoint’ in REST- API #18348

Open sattigar opened 2 years ago

sattigar commented 2 years ago

Description

Support property ‘DisableExecuteApiEndpoint’ in REST- API, which was recently added in SAM.

SAM link -https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-api.html#sam-api-disableexecuteapiendpoint The same property is already supported by CDK for Http APIs - https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-sam.CfnHttpApi.html

Use Case

This property is used to specifies whether clients can invoke your API by using the default execute-api endpoint https://{api_id}.execute-api.{region}.amazonaws.com. By default, clients can invoke your API with the default endpoint. To require that clients only use a custom domain name to invoke your API, disable the default endpoint.

Proposed Solution

Addition of this property to be supported from CDK.

Other information

No response

Acknowledge

njlynch commented 2 years ago

Thanks for the feature request. It's worth noting that in general the SAM spec used by the CDK is quite out of date, and we have no proposed solution for keeping it up to date automatically (see https://github.com/aws/aws-cdk/issues/13507). In the meantime, individual tweaks to the spec can be made.

ingwinlu commented 1 year ago

i think this might already be exposed via https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApiProps.html#disableexecuteapiendpoint