I have an API within API Gateway and I want to enable or disable caching on request parameters via AWS SDK.
The method is GET /cats. I'm using the updateStage method and I have tried the following:
params = {
restApiId: 'myRestApiId',
stageName: 'myStageName',
patchOperations: [
{
op: 'replace',
path: '/~1cats/GET/requestParameters/method.request.header.pawId/caching/enabled'
}];
await aws.updateStage(params).promise();
which fails with:
Invalid method setting path: requestParameters/method.request.path.pawId/caching/enabled. Must be one of: [.../metrics/enabled, .../logging/dataTrace, .../logging/loglevel,.../throttling/burstLimit, .../throttling/rateLimit, .../caching/ttlInSeconds, .../caching/enabled, .../caching/dataEncrypted, .../caching/requireAuthorizationForCacheControl, .../caching/unauthorizedCacheControlHeaderStrategy]
which is strange, because .../caching/enabled is one of the options it "must be"!
How do I enable caching on my request parameter via the SDK?
