LogShipper Operations

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
  • SDK Reference
  • arrow
  • Go SDK
  • arrow
  • LogShipper Operations
Table of contents on this page
  • Create logshippers
  • Update the specified logshipper
  • Query the specified logshipper
  • Obtain the logshipper list
  • View the logshipper execution record
  • Enable/disable logshipper
  • Single enable/disable
  • Bulk enable/disable
  • Delete logshippers
  • Single deletion
  • Batch delete

LogShipper Operations

Updated at:2025-11-03

Create logshippers

To create logshippers, the following guidelines shall be met:

  • More than one logshipper can be created for each logstore
  • Upper limit of total logshippers: 300
  • Logshipper name, at most 63 characters, including letters, digits, - and _
  • The delivery start time can be set to a minimum of 180 days in the past or a maximum of 24 hours in the future. By default, the task creation time is used as the start time. The format must meet ISO 8601.
Go
1createLogShipperRequest := CreateLogShipperRequest{
2    LogShipperName: "test",
3    Project:        "default",
4    LogStoreName:   "test",
5    StartTime:      time.Now().UTC().Format("2006-01-02T15:04:05Z"),
6    DestType:       "BOS",
7    DestConfig: &api.ShipperDestConfig{
8        BOSPath:                  "bls-test/sdk-log-shipper-test/",
9        PartitionFormatTS:        "%Y/%m/%d/%H/%M/",
10        PartitionFormatLogStream: false,
11        MaxObjectSize:            64,
12        CompressType:             "none",
13        DeliverInterval:          5,
14        StorageFormat:            "json",
15        ShipperType:              "text",
16    },
17}
18id, err := BLS_CLIENT.CreateLogShipperV2(createLogShipperRequest)
19if err != nil {
20  fmt.Println("Create LogShipper failed: ", err)
21} else {
22  fmt.Printf("Create LogShipper %s success.", id)
23}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document Create Logshipper

Update the specified logshipper

With following codes, update the specified logshipper; currently, logstore, start time and purpose type of logshipper cannot be updated

Go
1updateLogShipperRequest := UpdateLogShipperRequest{
2    LogShipperID:   "vxkAJtxc5hGbJIu2JwkqI5Ux",
3    LogShipperName: "test",
4    DestConfig: &api.ShipperDestConfig{
5        BOSPath:                  "bls-test/sdk-log-shipper-test/",
6        PartitionFormatTS:        "%Y/%m/%d/%H/%M/",
7        PartitionFormatLogStream: false,
8        MaxObjectSize:            128,
9        CompressType:             "none",
10        DeliverInterval:          10,
11        StorageFormat:            "JSON",
12    },
13}
14err := BLS_CLIENT.UpdateLogShipperV2(updateLogShipperRequest)
15if err != nil {
16  fmt.Println("Update LogShipper failed: ", err)
17} else {
18  fmt.Println("Update LogShipper success.")
19}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document Update Logshipper

Query the specified logshipper

Use the following code snippets to get the details of the specified logshipper.

Go
1getLogShipperRequest := GetLogShipperRequest{
2    LogShipperID: "vxkAJtxc5hGbJIu2JwkqI5Ux",
3}
4res, err := BLS_CLIENT.GetLogShipperV2(getLogShipperRequest)
5if err != nil {
6  fmt.Println("Get LogShipper failed: ", err)
7} else {
8  fmt.Println("LogShipper info: ", res)
9}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document Get Logshipper

Obtain the logshipper list

Use the following code snippets to query and view logshippers that match the given conditions.

Go
1listLogShipperRequest := ListLogShipperRequest{
2    Project:      "default",
3    LogStoreName: "test",
4    PageNo:       1,
5    PageSize:     10,
6}
7res, err := BLS_CLIENT.ListLogShipperV2(listLogShipperRequest)
8if err != nil {
9  fmt.Println("Get LogShipper list failed: ", err)
10} else {
11  fmt.Println("List LogShipper success: ", res)
12}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document List Logshipper

View the logshipper execution record

Use the following code snippets to review the execution records of the logshipper.

Go
1listShipperRecordRequest := ListShipperRecordRequest{
2    LogShipperID: "vxkAJtxc5hGbJIu2JwkqI5Ux",
3}
4res, err := BLS_CLIENT.ListLogShipperRecordV2(listShipperRecordRequest)
5if err != nil {
6  fmt.Println("Get LogShipper record failed: ", err)
7} else {
8  fmt.Println("Get LogShipper record success: ", res)
9}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document List Logshipper Record

Enable/disable logshipper

Single enable/disable

Use the following code snippets to enable or disable the specified logshipper.

Go
1updateLogShipperStatusRequest := UpdateLogShipperStatusRequest{
2    LogShipperID:  "vxkAJtxc5hGbJIu2JwkqI5Ux",
3    DesiredStatus: "Paused",
4}
5err := BLS_CLIENT.UpdateLogShipperStatusV2(updateLogShipperStatusRequest)
6if err != nil {
7  fmt.Println("Set LogShipper status failed: ", err)
8} else {
9  fmt.Println("Set LogShipper status success.")
10}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document Set Single Logshipper Status

Bulk enable/disable

Use the following code snippets to enable or disable multiple logshippers at once.

Go
1bulkUpdateLogShipperStatusRequest := BulkUpdateLogShipperStatusRequest{
2    LogShipperIDs: []string{"vxkAJtxc5hGbJIu2JwkqI5Ux"},
3    DesiredStatus: "Paused",
4}
5err := BLS_CLIENT.BulkUpdateLogShipperStatusV2(bulkUpdateLogShipperStatusRequest)
6if err != nil {
7  fmt.Println("Bulk set LogShipper status failed: ", err)
8} else {
9  fmt.Println("Bulk set LogShipper status success.")
10}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document Bulk Set Logshipper Status

Delete logshippers

Single deletion

Use the following code snippets to delete the specified logshipper.

Go
1deleteLogShipperRequest := DeleteLogShipperRequest{
2    LogShipperID: "vxkAJtxc5hGbJIu2JwkqI5Ux",
3}
4err := BLS_CLIENT.DeleteLogShipperV2(deleteLogShipperRequest)
5if err != nil {
6  fmt.Println("Delete LogShipper failed: ", err)
7} else {
8  fmt.Println("Delete LogShipper success.")
9}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document Delete Single Logshipper

Batch delete

Using the following code, you can bulk delete logshippers.

Go
1bulkDeleteLogShipperRequest := BulkDeleteLogShipperRequest{
2    LogShipperIDs: []string{"vxkAJtxc5hGbJIu2JwkqI5Ux"},
3}
4err := BLS_CLIENT.BulkDeleteLogShipperV2(bulkDeleteLogShipperRequest)
5if err != nil {
6  fmt.Println("Bulk delete LogShipper failed: ", err)
7} else {
8  fmt.Println("Bulk delete LogShipper success.")
9}

Prompt:

  • Detailed parameter configuration and restrictions may refer to BLS API document Bulk Delete Logshipper

Previous
FastQuery Operations
Next
Index Operations