UpdateLogStoreTemplate

BLS

  • Function Release Records
  • Product Description
    • Usage restrictions
    • Product Introduction
  • Product pricing
  • Quick Start
    • Introduction
    • Install agent
    • Create LogStore
    • Create Transmission Task
    • Log Analysis and Alerting
    • Create Delivery Task
  • Operation guide
    • Baidu Intelligent Cloud Environment Preparation
    • Overview
    • Identity and access management
    • Logset Management
    • Agent
      • Install Agent on Host
      • Install Agent in K8s Environment
      • Agent Management
      • Agent Release Version
      • Set Agent Startup Parameters
    • Log Collection
      • Transmission Task Collection
        • Create Transmission Task
        • Manage Transmission Task
      • Uploading Logs Using Kafka Protocol
    • Query analysis
      • Log query
      • SQL Syntax
      • Search Syntax
    • Dashboard
      • Overview
      • Management Dashboard
      • Management Dashboard Charts
    • Alarm management
      • Alert Overview
      • Alarm strategy
        • Management alarm strategy
        • Trigger conditions
      • Alarm history
      • Alert execution statistics
      • Alarm notification
        • Alarm Notification Template
        • Alarm callback
    • Data processing
      • Log Delivery
        • Log Delivery Overview
        • Create Delivery Task
        • Manage Delivery Task
      • Scheduled SQL Analysis
        • Manage Scheduled SQL Analysis Task
        • Create Scheduled SQL Analysis Task
      • Real-Time Consumption
      • Data processing
        • Data processing
          • Overview of data processing functions
          • Process control function
          • Mapping enrichment functions
          • Event operation functions
          • Field operation functions
          • Field value extraction functions
    • Log Applications
      • Intelligent Diagnostics
  • Best Practices
    • Use Year-Over-Year and Month-Over-Month as Alert Trigger Conditions
    • BLS Integration with Kibana
    • Use BLS via Grafana
  • Development Guide
    • API Reference
      • API function release records
      • API Overview
      • Interface Overview
      • General Description
      • Service domain
      • Common error codes
      • Terminology
      • Project Related APIs
        • Create Project
        • Update Project
        • Describe Project
        • Delete Project
        • List Project
      • LogStore Related APIs
        • Create LogStore
        • Update LogStore
        • Delete LogStore
        • Describe LogStore
        • Batch Get LogStore
        • List LogStore
      • LogStream Related APIs
        • List LogStream
      • LogRecord Related APIs
        • Push log PushLogRecord
        • Obtain logrecord PullLogRecord
        • Search analysis log QueryLogRecord
        • Histogram API QueryLogHistogram
      • Fast Query FastQuery Related Interfaces
        • Create Fast Query CreateFastQuery
        • Update Fast Query UpdateFastQuery
        • Delete Fast Query DeleteFastQuery
        • Get Fast Query Details DescribeFastQuery
        • Get Fast Query List ListFastQuery
      • Index Related APIs
        • Create Index
        • Update Index
        • Delete Index
        • Describe Index
      • Log Shipper LogShipper Related Interfaces
        • Create Log Shipper
        • Update Log Shipper
        • Set Single Log Shipper Status
        • Delete Single Log Shipper
        • Bulk Delete Log Shipper
        • List Log Shipper Records
        • List Log Shipper
        • Bulk Set Log Shipper Status
        • Get Log Shipper
      • Alarm-Related Interfaces
        • CreateAlarmPolicy
        • UpdateAlarmPolicy
        • DeleteAlarmPolicy
        • ValidateAlarmCondition
        • ValidateAlarmPolicySQL
        • EnableAlarmPolicy
        • DescribeAlarmRecord
        • DisableAlarmPolicy
        • DescribeAlarmPolicy
        • ListAlarmPolicy
        • ListAlarmRecord
        • ListAlarmExecutionStats
        • ListAlarmExecutions
      • LogStore Template-Related Interfaces
        • CreateLogStoreTemplate
        • UpdateLogStoreTemplate
        • DeleteLogStoreTemplates
        • DescribeLogStoreTemplates
        • DescribeLogStoreTemplate
      • Download Log Download Related Interfaces
        • Create Download Task CreateDownloadTask
        • Get Download Task List ListDownloadTask
        • Delete Download Task DeleteDownloadTask
        • Get Download Task Address GetDownloadTaskLink
        • Get Download Task Details DescribeDownloadTask
      • LogAlarm Related Interfaces
        • SetLogAlarmStatus
        • deleteLogAlarm
        • createLogAlarm
        • listLogAlarm
        • updateLogAlarm
        • BulkDeleteLogAlarm
        • PreviewAlarmLogRecord
        • getLogAlarm
        • BulkSetLogAlarmStatus
      • Transmission Task Related Interfaces
        • Create Task CreateTask
        • UpdateTask
      • Interfaces Compatible with Elasticsearch
        • ResolveIndex
        • FieldCaps
        • TermsEnum
        • AsyncSearch
    • SDK Reference
      • Go SDK
        • Overview
        • Initialization
        • Version Release Records
        • Project Operations
        • LogStore Operations
        • Install the SDK Package
        • LogStream Operations
        • LogRecord Operations
        • FastQuery Operations
        • LogShipper Operations
        • Index Operations
        • Download Task Operations
      • Java SDK
        • Overview
        • Install the SDK Package
        • LogRecord Operations
      • iOS SDK
        • Overview
        • Quick start
        • Version Release Records
      • Android SDK
        • Overview
        • Quick start
        • Version Release Records
      • Android & iOS SDK Download
      • SDK Privacy Policy
      • SDK Developer Personal Information Protection Compliance Guide
    • Importing SLS Collection Configuration
  • FAQs
    • Common Questions Overview
    • Fault-related questions
    • Configuration-related questions
  • Log Service Level Agreement SLA
All documents
menu
No results found, please re-enter

BLS

  • Function Release Records
  • Product Description
    • Usage restrictions
    • Product Introduction
  • Product pricing
  • Quick Start
    • Introduction
    • Install agent
    • Create LogStore
    • Create Transmission Task
    • Log Analysis and Alerting
    • Create Delivery Task
  • Operation guide
    • Baidu Intelligent Cloud Environment Preparation
    • Overview
    • Identity and access management
    • Logset Management
    • Agent
      • Install Agent on Host
      • Install Agent in K8s Environment
      • Agent Management
      • Agent Release Version
      • Set Agent Startup Parameters
    • Log Collection
      • Transmission Task Collection
        • Create Transmission Task
        • Manage Transmission Task
      • Uploading Logs Using Kafka Protocol
    • Query analysis
      • Log query
      • SQL Syntax
      • Search Syntax
    • Dashboard
      • Overview
      • Management Dashboard
      • Management Dashboard Charts
    • Alarm management
      • Alert Overview
      • Alarm strategy
        • Management alarm strategy
        • Trigger conditions
      • Alarm history
      • Alert execution statistics
      • Alarm notification
        • Alarm Notification Template
        • Alarm callback
    • Data processing
      • Log Delivery
        • Log Delivery Overview
        • Create Delivery Task
        • Manage Delivery Task
      • Scheduled SQL Analysis
        • Manage Scheduled SQL Analysis Task
        • Create Scheduled SQL Analysis Task
      • Real-Time Consumption
      • Data processing
        • Data processing
          • Overview of data processing functions
          • Process control function
          • Mapping enrichment functions
          • Event operation functions
          • Field operation functions
          • Field value extraction functions
    • Log Applications
      • Intelligent Diagnostics
  • Best Practices
    • Use Year-Over-Year and Month-Over-Month as Alert Trigger Conditions
    • BLS Integration with Kibana
    • Use BLS via Grafana
  • Development Guide
    • API Reference
      • API function release records
      • API Overview
      • Interface Overview
      • General Description
      • Service domain
      • Common error codes
      • Terminology
      • Project Related APIs
        • Create Project
        • Update Project
        • Describe Project
        • Delete Project
        • List Project
      • LogStore Related APIs
        • Create LogStore
        • Update LogStore
        • Delete LogStore
        • Describe LogStore
        • Batch Get LogStore
        • List LogStore
      • LogStream Related APIs
        • List LogStream
      • LogRecord Related APIs
        • Push log PushLogRecord
        • Obtain logrecord PullLogRecord
        • Search analysis log QueryLogRecord
        • Histogram API QueryLogHistogram
      • Fast Query FastQuery Related Interfaces
        • Create Fast Query CreateFastQuery
        • Update Fast Query UpdateFastQuery
        • Delete Fast Query DeleteFastQuery
        • Get Fast Query Details DescribeFastQuery
        • Get Fast Query List ListFastQuery
      • Index Related APIs
        • Create Index
        • Update Index
        • Delete Index
        • Describe Index
      • Log Shipper LogShipper Related Interfaces
        • Create Log Shipper
        • Update Log Shipper
        • Set Single Log Shipper Status
        • Delete Single Log Shipper
        • Bulk Delete Log Shipper
        • List Log Shipper Records
        • List Log Shipper
        • Bulk Set Log Shipper Status
        • Get Log Shipper
      • Alarm-Related Interfaces
        • CreateAlarmPolicy
        • UpdateAlarmPolicy
        • DeleteAlarmPolicy
        • ValidateAlarmCondition
        • ValidateAlarmPolicySQL
        • EnableAlarmPolicy
        • DescribeAlarmRecord
        • DisableAlarmPolicy
        • DescribeAlarmPolicy
        • ListAlarmPolicy
        • ListAlarmRecord
        • ListAlarmExecutionStats
        • ListAlarmExecutions
      • LogStore Template-Related Interfaces
        • CreateLogStoreTemplate
        • UpdateLogStoreTemplate
        • DeleteLogStoreTemplates
        • DescribeLogStoreTemplates
        • DescribeLogStoreTemplate
      • Download Log Download Related Interfaces
        • Create Download Task CreateDownloadTask
        • Get Download Task List ListDownloadTask
        • Delete Download Task DeleteDownloadTask
        • Get Download Task Address GetDownloadTaskLink
        • Get Download Task Details DescribeDownloadTask
      • LogAlarm Related Interfaces
        • SetLogAlarmStatus
        • deleteLogAlarm
        • createLogAlarm
        • listLogAlarm
        • updateLogAlarm
        • BulkDeleteLogAlarm
        • PreviewAlarmLogRecord
        • getLogAlarm
        • BulkSetLogAlarmStatus
      • Transmission Task Related Interfaces
        • Create Task CreateTask
        • UpdateTask
      • Interfaces Compatible with Elasticsearch
        • ResolveIndex
        • FieldCaps
        • TermsEnum
        • AsyncSearch
    • SDK Reference
      • Go SDK
        • Overview
        • Initialization
        • Version Release Records
        • Project Operations
        • LogStore Operations
        • Install the SDK Package
        • LogStream Operations
        • LogRecord Operations
        • FastQuery Operations
        • LogShipper Operations
        • Index Operations
        • Download Task Operations
      • Java SDK
        • Overview
        • Install the SDK Package
        • LogRecord Operations
      • iOS SDK
        • Overview
        • Quick start
        • Version Release Records
      • Android SDK
        • Overview
        • Quick start
        • Version Release Records
      • Android & iOS SDK Download
      • SDK Privacy Policy
      • SDK Developer Personal Information Protection Compliance Guide
    • Importing SLS Collection Configuration
  • FAQs
    • Common Questions Overview
    • Fault-related questions
    • Configuration-related questions
  • Log Service Level Agreement SLA
  • Document center
  • arrow
  • BLS
  • arrow
  • Development Guide
  • arrow
  • API Reference
  • arrow
  • LogStore Template-Related Interfaces
  • arrow
  • UpdateLogStoreTemplate
Table of contents on this page
  • Description
  • Request
  • Response
  • Error code
  • Example

UpdateLogStoreTemplate

Updated at:2025-11-03

Description

Update logstore template

Request

  • Request syntax
Text
1POST /v3/bls?action=UpdateLogStoreTemplate HTTP/1.1
2Host: <Endpoint>
3Authorization: <Authorization String>
4Content-Type: application/json; charset=utf-8
5{
6  "name": <name>,
7  "priority": <priority>
8}
  • Request headers

No additional headers are required beyond the standard request headers.

  • Request parameters
Parameter name Types Required or not Parameter location Description
name String Yes RequestBody Template name: Unique under the same user
projectPatterns List<String> Yes RequestBody Log group matching pattern: Supports * wildcard
logstorePatterns List<String> Yes RequestBody Logstore matching pattern: Supports * wildcard
priority Int Yes RequestBody Logstore template priority: Higher values indicate higher priority; unique under the same user
template Template No RequestBody Template configuration

The element structure of Template object is as follows:

Parameter name Types Required or not Parameter location Description
retention Int No RequestBody Logstore retention period: Unit is days
shardCount Int No RequestBody Initial number of shards for the logstore
disableShardAutoSplit Boolean No RequestBody Whether to disable automatic shard splitting: If automatic splitting is enabled, BLS will automatically expand shards based on the log write traffic of the logstore. Optional; default value: false
maxShardCount Int No RequestBody If automatic shard splitting is enabled, this field is required. Enter the maximum number of splits; value range: [1 to 50]
enableHotRetention Boolean No RequestBody Whether to enable automatic hot-cold tiering: Optional; default value: false
hotRetention Int No RequestBody If hot-cold tiering is enabled, this field is required. Enter the hot storage retention period (unit: days); 7 <= hotRetention <= retention
index Object No RequestBody Index configuration: Refer to Create Index API

Response

  • Response headers

No additional headers are required beyond the standard response headers.

  • Response parameters
Field Types Description
success Boolean Whether the request succeeded
code String Request code, OK for success, or a specific error code for failure
message String Empty for request success, or a specific error message for request failure

Error code

Apart from standard error codes, the following codes may be returned:

Error code Error message Description HTTP status code
InvalidParameter Request param invalid: [msg] Invalid parameter exception 400

Example

  • Request example
Text
1POST /v3/bls?action=UpdateLogStoreTemplate HTTP/1.1
2Host: bls-log.bj.baidubce.com
3Authorization:bce-auth-v1/18717522d39411e9b721df098b0b908c/2019-09-10T07:00:20Z/1800/content-type;host;x-bce-date;x-bce-request-id/6a7cb6c9ac7ec156c805e55e7d0bcfc443b47feee97cf099c1c0d93a0b4c8304
4Content-Type: application/json; charset=utf-8
5{
6    // Template name: Unique under the same user, required
7    "name": "my-template",
8    // Log group matching pattern: Supports * wildcard, required
9    "projectPatterns": [
10        "my-project-*"
11    ],
12    // Logstore matching pattern: Supports * wildcard, required
13    "logstorePatterns": [
14        "my-logstore-*"
15    ],
16    // Logstore template priority: Higher values indicate higher priority, required
17    "priority": 10,
18    // Template configuration: Optional
19    "template": {
20        // Retention period (unit: days): Optional
21        "retention": 30,
22        // Initial number of shards: Optional
23        "shardCount": 1,
24         // Whether to disable automatic shard splitting: If automatic splitting is enabled, BLS will automatically expand shards based on the log write traffic of the logstore. Optional; default value: false
25        "disableShardAutoSplit": false,        
26        // If automatic shard splitting is enabled, this field is required. Enter the maximum number of splits; value range: 1 to 50
27        "maxShardCount": 50,
28        
29        // Whether to enable automatic hot-cold tiering: Optional; default value: false
30        "enableHotRetention": false,
31        // If hot-cold tiering is enabled, this field is required. Enter the hot storage retention period (unit: days); 7 <= hotRetention <= retention
32        "hotRetention": 7,
33       
34        // Index configuration: Optional
35        "index": {
36            // Whether to enable full-text index: Optional; default value: false   
37            "fulltext": true,            
38            // Case sensitivity for full-text index: Optional; default value: false
39            "caseSensitive": false,
40            // Custom separator for full-text index: Optional. If not specified, the default separator is used: "@&?|#()='\",;:<>[]{}/ \n\t\r\\"
41            "separators": "@&?|#()='\",;:<>[]{}/ \n\t\r\\",
42            // Whether full-text index includes Chinese: Optional; default value: false
43            "includeChinese": false,
44            
45            // Field index list: Optional
46            "fields": {
47                // Key: Name of the indexed field
48                "level": {
49                    // Field type: Required. Optional values: bool, long, text, float, json
50                    "type": "string",
51                    // Case sensitivity: Optional; default value: false
52                    "caseSensitive": false,
53                    // Custom separator: Optional. If not specified, the default separator is used: "@&?|#()='\",;:<>[]{}/ \n\t\r\\"
54                    "separators": "@&?|#()='\",;:<>[]{}/ \n\t\r\\",
55                    // Whether to include Chinese: Optional; default value: false
56                    "includeChinese": false,
57                    // Whether to enable dynamic indexing: Optional; default value: false. Dynamic indexing can only be enabled when type=json
58                    "dynamicMapping": false
59                },                
60                "salary": {
61                    "type": "float",
62                    "caseSensitive": false,
63                    "separators": "@&?|#()='\",;:<>[]{}/ \n\t\r\\",
64                    "includeChinese": false,
65                    "dynamicMapping": false
66                }
67            }
68        }
69    }
70}
  • Response example
Text
1HTTP/1.1 201
2Content-Type: application/json; charset=utf-8
3X-Bce-Request-Id: 2eeba101-4cc7-4cfe-b5ac-a3be8d060e33
4Date: Fri, 10 Apr 2020 04:42:37 GMT
5{
6    "success": true,
7    "code": "OK",  // Error code
8    "message": "",  // Error details
9}

Previous
CreateLogStoreTemplate
Next
DeleteLogStoreTemplates