Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 克隆安全组接口文档 #1239

Open
wants to merge 2 commits into
base: feat-sg-mgmt
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
### 描述
KooKouse marked this conversation as resolved.
Show resolved Hide resolved

- 该接口提供版本:v9.9.9+。
- 该接口所需权限:业务-IaaS资源创建。
- 该接口功能描述:克隆安全组(仅支持腾讯云)。

### URL

POST /api/v1/cloud/bizs/{bk_biz_id}/security_groups/{id}/clone

Comment on lines +9 to +10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充一个资源下的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

资源下的应该没有这种操作?平台管理的安全组需要支持克隆吗?

之前和松哥的沟通只需要实现业务下的操作就可以了

### 输入参数

| 参数名称 | 参数类型 | 必选 | 描述 |
|-------------|--------|----|----------|
| bk_biz_id | int64 | 是 | 业务ID |
| id | string | 是 | 被克隆安全组ID |
| manager | string | 是 | 主负责人 |
| bak_manager | string | 是 | 备份负责人 |

### 业务逻辑说明

- 被克隆安全组必须为当前业务下可见的安全组
- 新创建的安全组的tags 使用业务和管理业务 都为当前业务
KooKouse marked this conversation as resolved.
Show resolved Hide resolved
- 新创建的安全组的管理类型为业务管理

### 调用示例

#### 克隆安全组

```json
{
"manager": "jim",
"bak_manager": "tom"
}
```

### 响应示例

```json
{
"code": 0,
"message": "ok",
"data": {
"id": "00000001"
}
}
```

### 响应参数说明

| 参数名称 | 参数类型 | 描述 |
|---------|--------|------|
| code | int32 | 状态码 |
| message | string | 请求信息 |
| data | object | 响应数据 |

#### data

| 参数名称 | 参数类型 | 描述 |
|------|--------|------------|
| id | string | 创建出的新安全组ID |