[英]Enable CloudWatch logs for AWS API Gateway using Terraform
[英]How to enable Cloudwatch Logs for API Gateway using Cloudformation?
這些日志設置是使用MethodSetting設置的:
DataTraceEnabled
- 用於“記錄完整請求...”LoggingLevel
用於“日志級別”MetricsEnabled
用於“啟用詳細的 CloudWatch 指標” Yaml
模板片段:
SomeApiStage:
Type: AWS::ApiGateway::Stage
Properties:
RestApiId:
Ref: SomeApi
DeploymentId:
Ref: SomeApiDeployment
StageName: some-api
Description: Some Api stage
MethodSettings:
- ResourcePath: "/*"
HttpMethod: "*"
MetricsEnabled: true
DataTraceEnabled: true
LoggingLevel: "INFO"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.