Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.
- What's New
- Function Overview
- Service Overview
- Getting Started
- User Guide
- Best Practices
- API Reference
- SDK Reference
-
FAQs
- Must I Use an IAM User (Sub Account) to Configure Transfer on CTS and Perform Operations on an OBS Bucket?
- How Will CTS Be Affected If My Account Is in Arrears?
- What Are the Recommended Users of CTS?
- What Will Happen If I Have Enabled Trace Transfer But Have Not Configured an Appropriate Policy for an OBS Bucket?
- Does CTS Support Integrity Verification of Trace Files?
- Why Are There Some Null Fields on the View Trace Page?
- Why Is an Operation Recorded Twice in the Trace List?
- What Services Are Supported by Key Event Notifications?
- How Can I Store Trace Files for a Long Time?
- Why Are user and source_ip Null for Some Traces with trace_type as SystemAction?
- How Can I Find Out Who Created a Specific ECS?
- How Can I Find Out the Login IP Address of an IAM User?
- Why Are Two deleteMetadata Traces Generated When I Buy an ECS in Pay-per-Use or Yearly/Monthly?
- What Can I Do If I Cannot Query Traces?
- Can I Disable CTS?
- How Do I Configure the Storage Duration of CTS Audit Logs to 180 Days?
- What Should I Do If I Cannot Enable CTS as an IAM User?
- How Do I Enable Alarm Notifications for EVS?
- Videos
Show all
Getting Started
This section describes how to create a tracker by calling APIs.
The token obtained from IAM is valid for only 24 hours. If you want to use the same token for authentication, you can cache it to avoid frequent calling of the IAM API.
Involved APIs
For token-based authentication, you must obtain a token and add X-Auth-Token to the request header when calling an API.
- IAM API used to obtain a token
- CTS API used to create a tracker
Procedure
- Obtain a token by referring to Authentication.
- Send POST /v1.0/ {project_id} /tracker.
- Add Content-Type and X-Auth-Token to the request header.
- Set parameters in the request body as follows:
POST /v1.0/{project_id}/tracker { "bucket_name": "obs-f1da", //Name of an Object Storage Service (OBS) bucket to which traces will be transferred. This parameter is mandatory and its value is a string. "is_support_trace_files_encryption": true, //Whether trace files will be encrypted during transfer. This parameter is optional and its value is of boolean type. "kms_id": "13a4207c-7abe-4b68-8510-16b84c3b5504", //ID of the key for trace file encryption. When is_support_trace_files_encryption is set to true, this parameter is mandatory. "is_obs_created": true, //Whether a new OBS bucket will be created. This parameter is optional and its value is of boolean type. "file_prefix_name": "yO8Q", //File name prefix to mark trace files that need to be stored in OBS. This parameter is optional and its value is a string. "log_file_validate": { "is_support_validate": true //Whether trace files will be verified. This parameter is optional and its value is of boolean type. } }
If the request is successful, information about the created tracker is returned.
{ "bucket_name": "obs-f1da", "file_prefix_name": "yO8Q", "is_obs_created": true, "is_support_trace_files_encryption": true, "kms_id": "13a4207c-7abe-4b68-8510-16b84c3b5504", "log_file_validate": { "is_support_validate": true }, "tracker_name": "system", //Tracker name "status": "enabled" //Tracker status }
If the request fails, an error code and error message are returned. For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.