You need to enable JavaScript to run this app.
文档中心
负载均衡

负载均衡

复制全文
下载 pdf
访问日志投递TOS
EnableAccessLog-开启访问日志
复制全文
下载 pdf
EnableAccessLog-开启访问日志
调用 EnableAccessLog 接口,开启访问日志。​
使用说明​
每秒最多提交 5 个 API 请求。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
Action String 必选 示例值:EnableAccessLog​
接口名称。当前 API 的名称为 EnableAccessLog。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
LoadBalancerId String 必选 示例值:alb-bp1b6c719dfa08ex****​
ALB 实例ID。​
​
BucketName String 必选 示例值:alb-tos1​
用于存储访问日志的对象存储桶的名称。​
​
​
返回参数​
RequestId String 示例值:20210811152539010225146063030****​
请求ID。​
​
​
请求示例​
​
GET /?Action=EnableAccessLog&Version=2020-04-01&LoadBalancerId=alb-bp1b6c719dfa08ex****&BucketName=alb-tos1 HTTP/1.1​
Host: alb.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/alb/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202108171522560****524314701095A5A",​
"Action": "EnableAccessLog",​
"Version": "2020-04-01",​
"Service": "alb",​
"Region": "cn-test"​
},​
"Result": {​
"RequestId": "202108171522560****524314701095A5A"​
}​
}​
​
错误码​
如果响应正文包含 Error 字段,则表示 API 请求失败。此处仅展示当前 API 的错误码,更多错误码请参见公共错误码。​
​
状态码​
错误码​
错误信息​
说明​
400​
OperationDenied.AccountArrears​
The request on the specified resource is denied due to the account being in arrears status.​
因账号处于欠费状态,对于该资源的操作请求被拒绝。​
409​
InvalidAccessLog.Conflict​
The specified AccessLog of the LoadBalancer already exists.​
指定的 ALB 实例的访问日志投递功能已存在。​
400​
OperationFailed.QueryIAM​
The request on the specified resource failed due to the query on IAM failed.​
因请求 IAM 失败,对于该资源的操作请求失败。​
400​
InvalidBucketName.NotFound​
The specified Bucket does not exist.​
指定的存储桶不存在。​
400​
OperationFailed.QueryTos​
The request on the specified resource failed due to the query on TOS failed.​
因请求 TOS 失败,对于该资源的操作请求失败。​
400​
InvalidLoadBalancer.InvalidStatus​
The specified LoadBalancer is not in the correct status for the request.​
指定的 ALB 实例所处状态无法响应该请求。​
404​
InvalidLoadBalancer.NotFound​
The specified LoadBalancer does not exist.​
指定的 ALB 实例不存在。​
403​
Forbidden​
You are not authorized to delivery access log to TOS.​
您无权限开启访问日志投递TOS。​
​
最近更新时间:2026.02.27 11:57:36
这个页面对您有帮助吗?
有用
有用
无用
无用