Skip to content

Commit

Permalink
Merge pull request #355 from alex-smile/fix_esb_rate_limit
Browse files Browse the repository at this point in the history
更新 ESB 组件及频率限制
  • Loading branch information
MrLYC authored Jun 3, 2021
2 parents a73dd2b + 0ddf9f6 commit 7a5fc83
Show file tree
Hide file tree
Showing 35 changed files with 911 additions and 1,140 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
### Functional description

count instance associations num (v3.10.1+)

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| Field | Type | Required | Description |
|------------|--------|----------|----------------------------------------------------------------------------------------------|
| bk_obj_id | string | Yes | object id |
| conditions | object | Yes | conditions, support AND/OR types,max conditions deep 3, max OR conditions rules count is 20 |

#### conditions

| Field | Type | Required | Description |
|----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------|
| field | string | Yes | condition field |
| operator | string | Yes | condition operator, support equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
| value | - | No | condition value, max slice(array) elements count is 500 |

condition rules: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md

### Request Parameters Example

```json
{
"bk_app_code":"code",
"bk_app_secret":"secret",
"bk_token":"xxxx",
"bk_obj_id":"bk_switch",
"conditions":{
"condition": "AND",
"rules": [
{
"field": "bk_inst_name",
"operator": "begins_with",
"value": "switch"
},
{
"condition": "OR",
"rules": [
{
"field": "bk_inst_id",
"operator": "not_in",
"value": [2,4,6]
},
{
"field": "bk_obj_name",
"operator": "equal",
"value": "switch"
}
]
}
]
}
}
```

### Return Result Example

```json
{
"result": true,
"code": 0,
"message": "",
"data": {
"count": 1
}
}
```

### Return Result Parameters Description

#### data

| Field | Type | Description |
|--------|---------|-------------------|
| count | integer | the num of record |
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
### Functional description

count object instances num (v3.10.1+)

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| Field | Type | Required | Description |
|------------|--------|----------|----------------------------------------------------------------------------------------------|
| bk_obj_id | string | Yes | object id |
| conditions | object | Yes | conditions, support AND/OR types,max conditions deep 3, max OR conditions rules count is 20 |

#### conditions

| Field | Type | Required | Description |
|----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------|
| field | string | Yes | condition field |
| operator | string | Yes | condition operator, support equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
| value | - | No | condition value, max slice(array) elements count is 500 |

condition rules: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md

### Request Parameters Example

```json
{
"bk_app_code":"code",
"bk_app_secret":"secret",
"bk_token":"xxxx",
"bk_obj_id":"bk_switch",
"conditions":{
"condition": "AND",
"rules": [
{
"field": "bk_inst_name",
"operator": "begins_with",
"value": "switch"
},
{
"condition": "OR",
"rules": [
{
"field": "bk_inst_id",
"operator": "not_in",
"value": [2,4,6]
},
{
"field": "bk_obj_name",
"operator": "equal",
"value": "switch"
}
]
}
]
}
}
```

### Return Result Example

```json
{
"result": true,
"code": 0,
"message": "",
"data": {
"count": 1
}
}
```

### Return Result Parameters Description

#### data

| Field | Type | Description |
|--------|---------|-------------------|
| count | integer | the num of record |
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ create object attribute
"ispre": false,
"isreadonly": false,
"isrequired": false,
"option": {"min":"1","max":"2"},
"option": "",
"unit": "1",
"placeholder": "test",
"bk_property_group": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ delete association between object's instance.
| Field | Type | Required | Description |
|----------------------|------------|--------|-----------------------------|
| id | int64 | Yes | the instance association's unique id |
| bk_obj_id | string | Yes | the instance association's source or destination object id(v3.10+) |

### Request Parameters Example

``` json
{
"id": 1
"id": 1,
"bk_obj_id": "abc"
}
```

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,13 @@ find association between object's instance.
|----------------------|------------|--------|-----------------------------|
| metadata | object | Yes | request meta data |
| condition | string map | Yes | query condition |


metadata params

| Field | Type | Required | Description |
|---------------------|------------|--------|-----------------------------|
| label | string map | Yes |the label data request should with, such as biz info |


label params

| Field | Type | Required | Description |
|---------------------|------------|--------|-----------------------------|
| bk_biz_id | string | Yes | business's ID |
| bk_obj_id | string | YES | the association's source object's id(v3.10+)|

condition params
| Field | Type | Required | Description |
|---------------------|------------|--------|-----------------------------|
| bk_obj_asst_id | string | Yes | object's association unique id|
| bk_asst_id | string | NO | object's association kind unique name|
| bk_obj_id | string | NO | the association's source object's id|
| bk_asst_obj_id | string | NO | the association's destination object's id|


Expand All @@ -43,9 +29,9 @@ condition params
"condition": {
"bk_obj_asst_id": "bk_switch_belong_bk_host",
"bk_asst_id": "",
"bk_object_id": "",
"bk_asst_obj_id": ""
},
"bk_object_id": "xxx",
"metadata":{
"label":{
"bk_biz_id":"3"
Expand Down
Loading

0 comments on commit 7a5fc83

Please sign in to comment.