You need to enable JavaScript to run this app.
Load Balancer

Load Balancer

Copy page
Download PDF
Access log (Layer-7)
EnableAccessLog - Enabling the layer 7 access log collection
Copy page
Download PDF
EnableAccessLog - Enabling the layer 7 access log collection
Call the EnableAccessLog API to enable the layer-7 access log collection feature for the specified CLB instance.​
Debug​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Action String required Example: EnableAccessLog​
Action to execute. Set the value to EnableAccessLog.​
​
Version String required Example: 2020-04-01​
API version. The current version is 2020-04-01.​
​
LoadBalancerId String required Example: clb-bp1b6c719dfa08ex****​
CLB Instance ID.​
You can call the DescribeLoadBalancers API to query the CLB Instance ID.​
​
DeliveryType String optional Example: tos​
Log delivery type. Values:​
  • tos (default): Deliver logs to the TOS.​
  • tls: Deliver logs to the Torch Log Service (TLS).​
​
BucketName String optional Example: clb-tos1​
The name of the Torch Object Storage (TOS) bucket used to store access logs.​
When the DeliveryType parameter is set to TOS, this parameter is required.​
​
TlsProjectId String optional Example: fc6953c1-fe50-43aa-9d26-c1e0a207****​
The ID of the log project.​
  • When the DeliveryType parameter is set to TLS, this parameter is required.​
​
TlsTopicId String optional Example: 74936ae4-bbd6-41de-a0d2-ed156203****​
The ID of the log topic.​
  • When the DeliveryType parameter is set to TLS, this parameter is required.​
​
​
​
Response parameters​
RequestId String Example: 20210811152539010225146063030****​
Request ID.​
​
​
​
Request examples​
​
GET /?Action=EnableAccessLog&Version=2020-04-01&LoadBalancerId=clb-bp1b6c719dfa08ex****&DeliveryType=tos&BucketName=clb-tos1&TlsProjectId=fc6953c1-fe50-43aa-9d26-c1e0a207****&TlsTopicId=74936ae4-bbd6-41de-a0d2-ed156203****​
Host: clb.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/clb/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
Response examples​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "EnableAccessLog",​
"Version": "2020-04-01",​
"Service": "clb",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "20210811152539010225146063030****"​
}​
}​
​
Error codes​
This section displays only the error codes of the current API. For more error codes, see Common error codes.​
​
Status code​
Error codes​
Error message​
Notes​
400​
InvalidDeliveryType.Malformed​
The specified DeliveryType is malformed.​
The specified DeliveryType parameter format is invalid.​
400​
InvalidLoadBalancer.InvalidStatus​
The specified LoadBalancer is not in the correct status for the request.​
The specified load balancer cannot respond to this request due to its status.​
400​
InvalidLoadBalancer.UnSupportAction​
The specified LoadBalancer does not support this action.​
The specified CLB does not support this action.​
400​
InvalidParameter​
Bad Request.​
Invalid request.​
400​
InvalidTlsProjectId.UsedInHealthCheckLog​
The specified Project has been used in health check log.​
The specified Project is already used by health check logs.​
400​
InvalidTlsProjectId.UsedInOtherService​
The specified Project has been used in other service.​
The specified Project is already in use by another cloud service.​
400​
InvalidTlsTopicId.TlsProjectIdMismatch​
The specified TlsTopicId not match with TlsProjectId.​
The specified TopicId does not match the ProjectId.​
400​
InvalidTlsTopicId.UsedInOtherService​
The specified Project has been used in other service.​
The specified Topic is already in use by another cloud service.​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the ''.​
This request is missing a required parameter. Ensure the request includes all required parameters, such as .​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'TlsTopicId'.​
This request is missing a required parameter. Please ensure the request includes all required parameters, such as TlsTopicId.​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'LoadBalancerId'.​
This request is missing a required parameter. Please ensure the request includes all required parameters, such as LoadBalancerId.​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'TlsProjectId'.​
This request is missing a required parameter. Please ensure the request includes all required parameters, such as TlsProjectId.​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'BucketName'.​
This request is missing a required parameter. Please ensure the request includes all required parameters, such as BucketName.​
400​
UnsupportedOperation.AccountArrears​
The request on the specified instance is denied due to the account in arrears status.​
The action request on this instance is denied because the account is in arrears.​
403​
Forbidden​
You are not authorized to perform operations on the tls.​
No permission to operate on the specified TLS.​
403​
Forbidden​
You are not authorized to perform operations on the specified service.​
You do not have permission to perform operations on the specified service.​
403​
Forbidden​
You are not authorized to perform operations on the tos.​
No permission to operate on the specified TOS.​
403​
InvalidResourceType.ServcieManaged​
The specified ResourceType is managed by a service.​
The specified resource is a service-managed resource.​
404​
InvalidBucketName.NotFound​
The specified bucket does not exist.​
The specified bucket does not exist.​
404​
InvalidExclusiveCluster.NotFound​
The specified ExclusiveCluster does not exist.​
The specified Exclusive Cluster does not exist.​
404​
InvalidLoadBalancer.NotFound​
The specified LoadBalancer does not exist.​
The specified load balancer does not exist.​
409​
InvalidAccessLog.Conflict​
The specified AccessLog already exists.​
The specified CLB access log already exists.​
412​
InvalidExclusiveCluster.Expired​
The specified ExclusiveCluster has expired.​
The specified Exclusive Cluster has expired.​
412​
InvalidExclusiveCluster.UnPurchased​
The specified ExclusiveCluster is not purchased.​
The specified Exclusive Cluster is not purchased.​
412​
InvalidLoadBalancer.Expired​
The specified LoadBalancer has expired.​
The specified CLB has expired.​
500​
InternalError​
An internal error has occurred.​
An internal error occurred.​
​
​
Last updated: 2026.05.09 10:35:11