Skip to content

Commit

Permalink
fix formatting info
Browse files Browse the repository at this point in the history
  • Loading branch information
wjo1212 committed Nov 22, 2017
1 parent bc76835 commit 4fd2b13
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 38 deletions.
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,20 @@ endpoint=cn-hangzhou.log.aliyun.com
```

2. Use specific account:
Any subcommand could use global opton `--client-name=<value>` to use specific configured account. e.g:

Any subcommand could use global opton `--client-name=<value>` to use specific configured account. e.g:
```shell
> aliyun log create_project ..... --client-name=test
```
It will use `test` to create the project.
It will use `test` to create the project.

In some case, we need to operate cross regions, e.g.
In some case, we need to operate cross regions, e.g.

```shell
> aliyun log copy_project --from_project="p1" --to_project="p1" --to_client=test
```

It will use account `main` to copy project `p1` in its region to another region under account `test`
It will use account `main` to copy project `p1` in its region to another region under account `test`


### Inputs
Expand Down Expand Up @@ -149,6 +150,7 @@ You could store the content of one parameter into a file and pass it via the com

### Filter output
It's supported to filter output via [JMES](http://jmespath.org/):

Examples:

```shell
Expand Down Expand Up @@ -201,12 +203,13 @@ Mapped to CLI:

##### Global options:
All the commands support below optional global options:
```
[--access-id=<value>]
[--access-key=<value>]
[--region-endpoint=<value>]
[--client-name=<value>]
[--jmes-filter=<value>]

```

#### Full command list:

Expand All @@ -219,7 +222,7 @@ All the commands support below optional global options:
- 复制所有源project的logstore, logtail, machine group和index配置等到目标project中.

```shell
> aliyun log --from_project="p1" --to_project="p1" --to_client="account2"
> aliyun log copy_project --from_project="p1" --to_project="p1" --to_client="account2"
```

- 注意: `to_client`是通过aliyun configure配置的其他账户, 也可以不传或传`main`同域复制.
Expand All @@ -230,6 +233,7 @@ All the commands support below optional global options:
- get_logstore
- update_logstore
- list_logstore
- list_topics


**shard**
Expand All @@ -238,10 +242,6 @@ All the commands support below optional global options:
- merge_shard


**topic**
- list_topics


**machine group**
- create_machine_group
- Format of partial parameter:
Expand All @@ -267,12 +267,8 @@ All the commands support below optional global options:
- get_machine_group
- list_machine_group
- list_machines
- apply_config_to_machine_group
- remove_config_to_machine_group
- get_machine_group_applied_configs
- get_config_applied_machine_groups

**logtail**
**logtail config**
- create_logtail_config
- Format of partial parameter:

Expand Down Expand Up @@ -308,6 +304,15 @@ All the commands support below optional global options:
- get_logtail_config
- list_logtail_config


**Machine group and Logtail Config Mapping**

- apply_config_to_machine_group
- remove_config_to_machine_group
- get_machine_group_applied_configs
- get_config_applied_machine_groups


**index**
- create_index
- Format of partial parameter:
Expand Down Expand Up @@ -498,4 +503,5 @@ All the commands support below optional global options:

1. Alicloud Log Service homepage:https://www.alibabacloud.com/product/log-service
2. Alicloud Log Service doc:https://www.alibabacloud.com/help/product/28958.htm
3. for any issues, please submit support tickets
3. Alicloud Log Python SDK doc: http://aliyun-log-python-sdk.readthedocs.io/
4. for any issues, please submit support tickets
51 changes: 29 additions & 22 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ endpoint=cn-hangzhou.log.aliyun.com
```

2. 文件输入
也可以将上面参数放到一个文件里面, 简化命令行, 需要义file://开头+文件路径即可:
也可以将上面参数放到一个文件里面, 简化命令行, 需要义`file://`开头+文件路径即可:

```shell
> aliyun log get_logs --request="file://./get_logs.json"
Expand Down Expand Up @@ -155,6 +155,7 @@ endpoint=cn-hangzhou.log.aliyun.com

### 输出过滤
支持通过[JMES](http://jmespath.org/)过滤输出的结果.

例如:

```shell
Expand Down Expand Up @@ -208,49 +209,49 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):

##### 全局选项
所有命令都支持如下的全局选项:

```
[--access-id=<value>]
[--access-key=<value>]
[--region-endpoint=<value>]
[--client-name=<value>]
[--jmes-filter=<value>]

```


#### 完整命令列表:

**project**
**项目组**
- list_project
- create_project
- get_project
- delete_project
- **copy_project**
- 复制所有源project的logstore, logtail, machine group和index配置等到目标project中.
-

```shell
> aliyun log --from_project="p1" --to_project="p1" --to_client="account2"
> aliyun log copy_project --from_project="p1" --to_project="p1" --to_client="account2"
```

- 注意: `to_client`是通过aliyun configure配置的其他账户, 也可以不传或传`main`同域复制.

**logstore**
**日志库**
- create_logstore
- delete_logstore
- get_logstore
- update_logstore
- list_logstore
- list_topics


**shard**
**分区**
- list_shards
- split_shard
- merge_shard


**topic**
- list_topics


**machine group**
**机器组**
- create_machine_group
- 部分参数格式:

Expand All @@ -275,12 +276,8 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):
- get_machine_group
- list_machine_group
- list_machines
- apply_config_to_machine_group
- remove_config_to_machine_group
- get_machine_group_applied_configs
- get_config_applied_machine_groups

**logtail**
**Logtail配置**
- create_logtail_config
- 部分参数格式:

Expand Down Expand Up @@ -316,7 +313,16 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):
- get_logtail_config
- list_logtail_config

**index**

**机器组与Logtail配置关联**

- apply_config_to_machine_group
- remove_config_to_machine_group
- get_machine_group_applied_configs
- get_config_applied_machine_groups


**索引**
- create_index
- 部分参数格式:

Expand Down Expand Up @@ -392,14 +398,14 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):
- delete_index
- get_index_config

**cursor**
**游标**
- get_cursor
- get_cursor_time
- get_previous_cursor_time
- get_begin_cursor
- get_end_cursor

**logs**
**日志**
- put_logs
- 参数格式:

Expand Down Expand Up @@ -471,7 +477,7 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):
- get_histograms
- pull_logs

**shipper**
**投递**
- create_shipper
- 部分参数格式:

Expand All @@ -493,7 +499,7 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):
- get_shipper_tasks
- retry_shipper_tasks

**consumer group**
**消费组**
- create_consumer_group
- update_consumer_group
- delete_consumer_group
Expand All @@ -506,4 +512,5 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):

1. 日志服务产品介绍:http://www.aliyun.com/product/sls/
2. 日志服务产品文档:https://help.aliyun.com/product/28958.html
3. 其他问题请提工单
3. 日志服务Python SDK文档: http://aliyun-log-python-sdk.readthedocs.io/
4. 其他问题请提工单

0 comments on commit 4fd2b13

Please sign in to comment.