tencent cloud

CreateGlobalAcceleratorAccessLog

下载
聚焦模式
字号
最后更新时间: 2026-09-14 20:56:30

1. API Description

Domain name for API request: ga2.intl.tencentcloudapi.com.

Create a GA access log

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateGlobalAcceleratorAccessLog.
Version Yes String Common Params. The value used for this API: 2025-01-15.
Region No String Common Params. This parameter is not required.
GlobalAcceleratorId Yes String

Unique Id of the sample GA

ListenerId Yes String

Listener Id

EndpointGroupId Yes String

Terminal node group Id

CloudRegion Yes String

Logset region

CloudLogId Yes String

Log topic Id

CloudLogSetId Yes String

Log Set Id

FieldKeys.N No Array of String

Specify data collection fields

Enumeration values:

  • session_time: Layer 4, session duration
  • upstream_bytes_received: Layer 4 and Layer 7, number of bytes received from the terminal node
  • upstream_bytes_sent: Layer 4 and Layer 7, number of bytes sent to the terminal node
  • request_method: Layer 7, GET/POST
  • scheme: Layer 7, http/https
  • request_uri: Layer 7, uri of the client's raw request
  • uri: Layer 7, uri of the current request
  • host: Layer 7, domain name accessed by the client (Layer 7)
  • remote_user: Layer 7, userName for basic authentication ("-" when unauthenticated)
  • http_user_agent: Layer 7, client browser identification
  • http_referer: Layer 7, request source URL ("-" when accessed directly from the address bar)
  • http_x_forwarded_for: Layer 7, records the client's original IP and the proxy server IP chain it transited
  • content_type: Layer 7, content_type
  • body_bytes_sent: Layer 7, http body size sent to the client, excluding the header
  • request_time: Layer 7, total time from receiving the first byte of the client request to sending the last byte of the response (unit: seconds)
  • sent_http_content_type: Layer 7, response content type
  • upstream_header_time: Layer 7, arrival time of the terminal node's response header
  • upstream_response_length: Layer 7, length of the response body returned by the terminal node
  • upstream_response_time: Layer 7, complete response time of the terminal node
  • upstream_status: Layer 7, http status code returned by the terminal node
FlowLogDescription No String

Log description

3. Output Parameters

Parameter Name Type Description
LogPushTaskId String

Log Task Unique Id

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Creating an Access Log Example

Input Example

POST / HTTP/1.1
Host: ga2.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateGlobalAcceleratorAccessLog
<Common request parameters>

{
    "GlobalAcceleratorId": "ga-8sreohed",
    "ListenerId": "lsr-4afw0c06",
    "EndpointGroupId": "epg-du8oqpy5",
    "CloudRegion": "ap-guangzhou",
    "CloudLogId": "61f7ee4c-4704-4669-82fe-2c191f8f200b",
    "CloudLogSetId": "81217ea2-f578-451a-946e-f31e2131a9ac",
    "FieldKeys": [
        "request_method"
    ],
    "FlowLogDescription": "ga_log_test_http"
}

Output Example

{
    "Response": {
        "LogPushTaskId": "galog-gv9duwet",
        "RequestId": "383fea40-a621-4bb6-8695-ad35e26515c2"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InvalidParameter.InputRepeat The input parameter %(key)s in the request has duplicate values.
InvalidParameterValue.InstanceMismatch The instance object %(value)s has a mismatched relationship.
InvalidParameterValue.LogsetNotExist Logset topic %(value)s does not exist.
InvalidParameterValue.Range The value %(value)s of the parameter %(parameter)s must be within the range %(value_range)s.
InvalidParameterValue.VpgHaGroupNotFound
UnsupportedOperation.ExistAccessLog An access log exists. The current operation is not supported.
UnsupportedOperation.InstanceNotRunning The instance is not in the running state. The current operation is not supported.
UnsupportedOperation.NotAuthorization Not supported. Please grant the permission first to enable the log task.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈