CLI使用
更新时间 2025-07-07 18:25:42
最近更新时间: 2025-07-07 18:25:42
可执行的命令
日志项目管理
Usage:
ctlts project [command]
Available Commands:
checkProjectExist Check log project exist by project name and project code
countProject Count the number of log projects
createProject Create a new log project
deleteProject Delete log project
getCodeByName Get project code by project name
getProject Get log project details by project code
getProjectByCode Get log project introduction by project code
getProjectDescription Get a log project's description by project code
listProject List log project all or by project name
pageProject Search log project by page
queryAliasName Query project alias names by original project names
queryNameByCode Query original project names by project codes
renameProject Rename a log project by project code
updateProject Update log project description
updateProjectDescription Update a log project's description by project code
Flags:
-a, --ak string access_id
-c, --config string use config.yaml ,such as: --config=huadong1
-e, --endpoint string endpoint
-h, --help help for project
-i, --region_id string region_id
-s, --sk string access_key
日志单元管理
Usage:
ctlts logUnit [command]
Available Commands:
checkLogUnitExist Check if a specified log unit exists
countUnit Get the count of log units
createIndex Create index information for a specified log unit
createLogUnit Create a new log unit
deleteIndex Delete index for a specified log unit
deleteLogUnit Delete a new log unit
getIndex Query index information for a specified log unit
getIndexCount Get index count for a specified log unit by unit code
getLogUnitAliasName Get the alias name of a specified log unit by unit code
getLogUnitNote Get the note (description) of a specified log unit by unit code
getLogUnitOriginName Get the original name of a specified log unit by unit code
getLogUnitTags Get tags for a specified log unit by unit code
getLogUnitTtlDays Get the TTL days of a specified log unit
getUnitByCode Get log unit information by unit code
listLogUnit List log unit all or by unitName
pageLogUnit Search log unit by page
queryLogUnitAliasNames Query alias names of log units in a specified project
queryLogUnitOriginNames Query origin names of log units in a specified project
renameLogUnit Rename the alias of a specified log unit
updateIndex Update index information for a specified log unit
updateLogUnit update a new log unit
updateLogUnitNote Update the description of a specified log unit
updateTtl Update TTL for a specified log unit
日志检索查询
Usage:
ctlts log [command]
Available Commands:
getLogs Get logs from log service
日志下载管理
Usage:
ctlts dataDownload [command]
Available Commands:
create Create download task
delete Delete download task
getSignUrl Get the download link for the specified download task
list List download task
query Get the download message for the specified download task.
服务开通管理
Usage:
ctlts instance [command]
Available Commands:
checkLicense Check order instance status
getInstanceInfo Get instance information under tenant resource pool
getInstanceStatus Get instance status
orderLogInstance Order cloud log service instance
CLI命令执行示例
createProject :创建日志项目
Usage:
ctlts project createProject [flags]
Examples:
ctlts project createProject --project_name=<string> [--description=<string>] [--ak=<string> --sk=<string> --endpoint=<string> --region_id=<string> or -
-config=<string>]
Flags:
-d, --description string log project description
-h, --help help for createProject
-n, --project_name string name of the project to create
Global Flags:
-a, --ak string access_id
-c, --config string use config.yaml ,such as: --config=huadong1
-e, --endpoint string endpoint
-i, --region_id string region_id
-s, --sk string access_key
说明
Flages 中的 -n, --project_name string
代表可以使用--project 或缩写-n 来添加string 类型的字符串。
[--description=<string>]
这类方括号的代表是该参数不是openApi 的必须值,是可选的。
[--ak=<string> --sk=<string> --endpoint=<string> --region_id=<string> or --config=<string>]
代表可以使用命令注入四个参数,可以使用config配置文件注入,详情见全局配置。