Updating AWS::ApiGateway::RestAPI
resources
When a generated template contains AWS::ApiGateway::RestApi
resources, then warnings are generated stating that Body
,
BodyS3Location
, and CloneFrom
properties are identified as
UNSUPPORTED_PROPERTIES
. This is because these are optional write-only properties. The IaC generator does
not know whether these properties were ever applied to the resource. The IaC generator does not include these
properties in the generated template.
If you want to set the Body
property for your REST API, you can update your generated template
using the following steps:
-
Use the Amazon API Gateway
GetExport
API action to download the API. For example, by using theaws apigateway get-export
AWS CLI command. For more information, see Export a REST API from API Gateway in the API Gateway Developer Guide. -
Retrieve the
Body
property from the response of theGetExport
API action. Upload it to an Amazon S3 bucket. -
Download the generated template.
-
Add the
BodyS3Location/Bucket
andBodyS3Location/Key
properties to the template, specifying the bucket name and key where theBody
is stored. -
Open the generated template in the IaC generator console and choose Import edited template.