Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Modifying a Tracker

Updated on 2024-12-05 GMT+08:00

Function

This API is used to modify configurations of a tracker, including trace transfer to OBS buckets, key event notifications, trace file encryption, trace search and analysis using LTS, trace file integrity check, and tracker enablement or disablement. Modifying tracker parameters does not affect the existing operation records. After the modification is complete, the new rules are immediately applied to operation recording.

API Calling

For details, see Calling APIs.

URI

PUT /v3/{project_id}/tracker

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining an Account ID and Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

tracker_type

Yes

String

Tracker type. The value can be system (management tracker), or data (data tracker). Both data and management trackers have the following parameters: is_lts_enabled, obs_info and is_support_validate. Parameters for management trackers: is_support_trace_files_encryption and kms_id. Parameters for data trackers: tracker_name and data_bucket.

Values:

  • system

  • data

tracker_name

Yes

String

Tracker name. When tracker_type is set to system, the default value system is used. When tracker_type is set to data, you need to set this parameter to a tracker name.

status

No

String

Tracker status. The value can be enabled or disabled. If you change the value to disabled, the tracker stops recording traces.

Values:

  • enabled

  • disabled

is_lts_enabled

No

Boolean

Whether to enable trace analysis.

is_organization_tracker

No

Boolean

Whether to apply the tracker configuration to the organization. This parameter is valid only for the management tracker. If the value is set to true, the audit logs of all members in the ORG organization in the current region will be transferred to the OBS bucket or LTS log stream configured for the management tracker. However, audit logs of other members cannot be viewed on the Trace List page.

management_event_selector

No

ManagementEventSelector object

Management trace selector.

obs_info

No

TrackerObsInfo object

Configurations of an OBS bucket to which traces will be transferred.

is_support_trace_files_encryption

No

Boolean

Whether trace files are encrypted during transfer to an OBS bucket. This parameter is valid when tracker_type is set to system. This parameter must be used with kms_id.

kms_id

No

String

Key ID used for transferring and encrypting trace files. This key ID is obtained from Key Management Service (KMS). This parameter is valid when tracker_type is set to system. This parameter is mandatory when is_support_trace_files_encryption is set to true.

is_support_validate

No

Boolean

Whether trace file verification is enabled for trace transfer.

data_bucket

No

DataBucket object

Information of an OBS bucket to be tracked. This parameter is valid when tracker_type is set to data.

agency_name

No

String

Name of a cloud service agency. If this parameter is set to cts_admin_trust, a cloud service agency named cts_admin_trust is automatically created during tracker modification.

Value:

  • cts_admin_trust

Table 3 ManagementEventSelector

Parameter

Mandatory

Type

Description

exclude_service

No

Array of strings

Cloud services whose traces will not be transferred. Currently, the value can only be set to KMS, indicating that the createDatakey traces of KMS will not be transferred.

Table 4 TrackerObsInfo

Parameter

Mandatory

Type

Description

bucket_name

No

String

OBS bucket name. The value contains 3 to 63 characters and must start with a digit or lowercase letter. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.

file_prefix_name

No

String

Prefix of trace files that need to be stored in OBS buckets. The value can contain 0 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

is_obs_created

No

Boolean

Whether an OBS bucket is created. If the value is true, an OBS bucket will be created to store trace files. If the value is false, trace files will be stored in an existing OBS bucket.

bucket_lifecycle

No

Integer

Duration that traces are stored in the OBS bucket. This parameter is valid when tracker_type is set to data.

Values:

  • 30

  • 60

  • 90

  • 180

  • 1,095

compress_type

No

String

Compression type. The value can be JSON (no compression) or GZIP (compression). The default format is GZIP.

Values:

  • gzip

  • json

is_sort_by_service

No

Boolean

Whether to sort the path by cloud service. If this option is enabled, the cloud service name is added to the transfer file path. The default value is true.

Table 5 DataBucket

Parameter

Mandatory

Type

Description

data_bucket_name

No

String

Name of the bucket tracked by a data tracker.

  • This parameter is mandatory when the data tracker is enabled or disabled.

  • This parameter is unavailable for a management tracker.

  • Once a tracker is created, the bucket that it tracks cannot be changed.

data_event

No

Array of strings

Type of operations tracked by a data tracker.

  • This parameter is mandatory when the data tracker is enabled or disabled.

  • This parameter is unavailable for a management tracker.

  • READ OBS: read operations; WRITE OBS: write operations.

Values:

  • WRITE

  • READ

Response Parameters

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 503

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Example Request

  • Modifying a management tracker

    PUT https://{endpoint}/v3/{project_id}/tracker
    
    {
      "tracker_type" : "system",
      "tracker_name" : "system",
      "agency_name" : "cts_admin_trust",
      "obs_info" : {
        "is_obs_created" : false,
        "bucket_name" : "test-data-tracker",
        "file_prefix_name" : "11"
      },
      "is_lts_enabled" : false,
      "is_support_trace_files_encryption" : false,
      "kms_id" : "",
      "is_support_validate" : false,
      "status" : "enabled"
    }
  • Modifying a data tracker

    {
      "tracker_type" : "data",
      "tracker_name" : "data-tracker-name",
      "agency_name" : "cts_admin_trust",
      "obs_info" : {
        "is_obs_created" : false,
        "bucket_name" : "",
        "file_prefix_name" : "",
        "bucket_lifecycle" : 60
      },
      "is_lts_enabled" : true,
      "data_bucket" : {
        "data_event" : [ "READ", "WRITE" ]
      }
    }

Example Response

None

Status Codes

Status Code

Description

200

The request is successful.

400

The server failed to process the request.

401

The request is rejected due to authentication failure.

403

The server understood the request but refused to authorize it.

404

The server failed to find the requested resource.

500

Failed to complete the request because of an internal service error.

503

The requested service is invalid. The client should not repeat the request without modifications.

Error Code

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback