You need to enable JavaScript to run this app.
文档中心
API 网关

API 网关

复制全文
下载 pdf
网关管理
UpdateGatewayLog - 更新网关日志配置
复制全文
下载 pdf
UpdateGatewayLog - 更新网关日志配置
更新网关日志配置。​
请求说明​
API 网关已在全球多个地域部署服务,旨在为您提供更稳定、低延迟的访问体验。您可以通过查阅 服务地址 文档,根据业务所在地域,选择最合适的接入点。​
  • 请求方式:POST​
  • 请求地址:https://apig.cn-beijing.volcengineapi.com?Action=UpdateGatewayLog&Version=2021-03-03​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:UpdateGatewayLog​
要执行的操作,取值:UpdateGatewayLog。​
​
Version string 必选 示例值:2021-03-03​
API的版本,取值:2021-03-03。​
​
Id string 必选 示例值:gd8****​
网关实例 ID。​
​
LogSpec object 必选 示例值:-​
日志配置。​
Enable boolean 必选 示例值:true​
是否开启日志服务。取值:​
  • true:开启。​
  • false:不开启。​
​
ProjectId string 必选 示例值:fc69****​
日志项目 ID。详情请参见 创建日志项目。​
说明​
当LogSpec.Enable值为 true 时,需要配置本参数。​
​
TopicId string 可选 示例值:b****​
日志主题 ID,取值为空时会在当前项目中生成名称为“网关实例 ID - accessLog”的主题。详情请参见 创建日志主题。​
说明​
当LogSpec.Enable值为 true 时,需要配置本参数。​
​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
Id string 示例值:gd8****​
网关实例 ID。​
​
​
​
请求示例​
​
POST https://apig.cn-beijing.volcengineapi.com?Action=UpdateGatewayLog&Version=2021-03-03​
Content-Type: application/json​
{​
"Id": "gd8****",​
"LogSpec": {​
"Enable": true,​
"TopicId": "b****",​
"ProjectId": "fc69****",​
"SamplingSpec": {​
"Rules": [​
{​
"StatusCodes": [​
200,​
201​
],​
"SamplingRatePermille": 100​
}​
],​
"Enabled": true​
}​
}​
}​
​
返回示例​
​
Content-Type: application/json​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "UpdateGatewayLog",​
"Version": "2021-03-03",​
"Service": "apig",​
"Region": "cn-beijing"​
},​
"Result": {​
"Id": "gd8****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidParameter​
The specified parameter %s is invalid.​
请求参数值不合法。请确认参数后重试。​
400​
MissingParameter​
The required parameter %s is missing.​
缺少必要的请求参数。请确认参数后重试。​
404​
ResourceNotFound​
The specified resource %s %s cannot be found.​
指定资源找不到。请确认参数后重试。​
500​
InternalError​
The request has failed due to an unknown error.​
未知错误。请稍后重试。如果多次尝试失败,请提交工单。​
​
​
最近更新时间:2026.10.28 14:59:49
这个页面对您有帮助吗?
有用
有用
无用
无用