【发布时间】:2017-02-27 04:33:00
【问题描述】:
我有以下 CF 模板
{
"Conditions":{
"CreatedProdStage" : {...}
}
...
"Resources":{
"GetMethod": {
...
},
"ApiDeployement":{
...
},
"ProdStage":{
"Type":"AWS::ApiGateway::Stage",
"Condition":"CreatedProdStage",
"Properties": {
"DeploymentId":"...",
"RestApiId":"...",
"MethodSettings":[{
"CachingEnabled":true,
"HttpMethod":{"Ref":"GetMethod"},
"ResourcePath":"/"
}]
}
}
}
}
我遇到了错误
方法设置路径无效: /~1/st-GetMetho-xxxAUMMRWxxx/缓存/启用。必须是以下之一: [/deploymentId, /description, /cacheClusterEnabled/cacheClusterSize/clientCertificateId/{resourcePath}/{httpMethod}/metrics/enabled, /{resourcePath}/{httpMethod}/logging/dataTrace, /{resourcePath}/{httpMethod}/logging/loglevel, /{resourcePath}/{httpMethod}/throttling/burstLimit/{resourcePath}/{httpMethod}/throttling/rateLimit/{resourcePath}/{httpMethod}/caching/ttlInSeconds, /{resourcePath}/{httpMethod}/caching/enabled, /{resourcePath}/{httpMethod}/caching/dataEncrypted, /{resourcePath}/{httpMethod}/caching/requireAuthorizationForCacheControl, /{resourcePath}/{httpMethod}/caching/unauthorizedCacheControlHeaderStrategy, ///metrics/enabled, ///logging/dataTrace, ///logging/loglevel, ///throttling/burstLimit ///throttling/rateLimit ///caching/ttlInSeconds, ///caching/enabled, ///caching/dataEncrypted, ///caching/requireAuthorizationForCacheControl, ///caching/unauthorizedCacheControlHeaderStrategy, /va
我错过了什么吗?我认为ResourcePath 和HttpMethod 是唯一需要的属性
【问题讨论】:
标签: templates caching aws-api-gateway amazon-cloudformation