百度智能云

All Product Document

          Log Service

          Update Log Shipper

          Description

          Update logshipper configurations, except for logStoreName, startTime, and destType.

          Request

          • Request syntax
          PUT /v1/logshipper/{logShipperID} HTTP/1.1
          Host: bls-log.{region}.baidubce.com
          Authorization: authorization string
          • Request headers

          No additional headers are required beyond the standard request headers.

          • Request parameters
          Parameter name Types Required or not Parameter location Description
          logShipperID string yes path Task ID
          logShipperName string no body Task name
          destConfig DestConfig no body Target configuration details

          DestConfig structure:

          Parameter name
          Types
          Description
          BOSPath string BOSPath consists of a bucket plus a user-defined path, at most 256 characters
          partitionFormatTS string Disk partition format, such as %Y/%m/%d/%H/%M/, support minute-level precision only, can be customized or empty; default: %Y/%m/%d/%H/%M/
          partitionFormatLogStream bool Whether to use logstream as a partition level; default: false
          maxObjectSize int64 Maximum object size, in MB, range: 1~ 5*1024*1024 (5TB); default: 64.
          compressType string Compression type, optional parameters: snappy/gzip/bzip2/lzop and none; default: none
          deliverInterval int Delivery interval, in minute, limit range: integers between 5 and 60; default: 5
          storageFormat string Storage format, optional parameters: parquet, json, csv; default: json
          csvHeadline bool Whether to deliver the field name in case of CSV; default: false (not deliver)
          csvDelimiter string Separator in case of CSV, options: comma (,), space ( ), pipe (|), or tab (\t); default: comma
          csvQuote string Quote character in case of CSV, options: single quote ('), double quote ("), none, or custom; default: none
          nullIdentifier string In case of CSV, when column is empty, the filled specified content is empty by default
          selectedColumnName string In case of CSV and parquet, the selected column name, the column name parameters separated by comma
          selectedColumnType string In case of parquet, the selected column type, the column type parameters separated by comma

          Response

          • Response headers

          No additional headers are required beyond the standard response headers.

          • Response parameters

          None

          Error code

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

          Error code Error message Description HTTP status code
          LogStoreNotFound LogStore [logStoreName] not exists Logstore not exist 404

          Note: [logStoreName] in error message may be replaced with a specific name.

          Example

          • Request example
          PUT /v1/logshipper/2323-xxxxx HTTP/1.1
          Host: bls-log.bj.baidubce.com
          Authorization:bce-auth-v1/18717522d39411e9b721df098b0b908c/2019-09-10T07:00:20Z/1800/content-type;host;x-bce-date;x-bce-request-id/6a7cb6c9ac7ec156c805e55e7d0bcfc443b47feee97cf099c1c0d93a0b4c8304
          Content-Type: application/json; charset=utf-8
          {
              "logShipperName":"newShipper",
              "destConfig":{
                  "BOSPath":"bucket1/",
                  "partitionFormatTS":"%Y/%m/%d/%H/%M/",
                  "partitionFormatLogStream":true,
                  "maxObjectSize":50,
                  "compressType":"snappy",
                  "deliverInterval":30,
                  "storageFormat":"json"
              }
          }
          • Response example
          HTTP/1.1 200
          Previous
          Create Log Shipper
          Next
          Delete Single Log Shipper