要在控制台中设置AWS API网关的缓存设置为不可见,可以使用AWS CLI来完成。以下是一个示例代码:
aws apigateway update-stage --rest-api-id your_api_id --stage-name your_stage_name --patch-operations op=remove,path=/caching/enabled
上述代码使用update-stage
命令来更新API网关的阶段设置。--rest-api-id
参数用于指定API的ID,--stage-name
参数用于指定阶段的名称。--patch-operations
参数用于指定要执行的操作,这里使用op=remove,path=/caching/enabled
来移除缓存设置。
请将your_api_id
和your_stage_name
替换为您的API的ID和阶段的名称。
执行上述代码后,API网关的缓存设置将在控制台中不可见。