Add GetAwayResponse to CfnApi #19824
-
Hi, There is an example from documentation. How can i describe the YAML object in gateway_responses field? if the field accepts such types as: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
UPDATE: As of next version, you will be able to natively use json with these properties #19885, and see discussion #19868 for a more correct explanation of what's happening with a workaround until next version releases SAM resources - the ones that lie in this module - are not native CloudFormation resources, but are native to SAM templates. The resources and properties specified will generally convert to CloudFormation resources/properties under the hood when deploying a SAM template through SAM. So, this allows CloudFormation to have some forwards compatibility and support SAM resources, which in turn allows the CDK to support SAM resources! Here's more information on the details of how serverless resources work in CloudFormation templates However, because this isn't native CloudFormation, some features are not supported through this forwards compatibility through CloudFormation. The gatewayResponses field that SAM provides doesn't directly translate into anything CloudFormation handles, and neither do a few other resources which you can find in the same docs. So, unfortunately, I don't think there's a way to use this property with CDK since we are limited by CloudFormation |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
UPDATE: As of next version, you will be able to natively use json with these properties #19885, and see discussion #19868 for a more correct explanation of what's happening with a workaround until next version releases
SAM resources - the ones that lie in this module - are not native CloudFormation resources, but are native to SAM templates. The resources and properties specified will generally convert to CloudFormation resources/properties under the hood when deploying a SAM template through SAM. So, this allows CloudFormation to have some forwards compatibility and support SAM resources, which in turn allows the CDK to support SAM resources! Here's more information on the details of how…