功能介紹
更新安全組。
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
PUT /v2.0/security-groups/{security_group_id}
請求參數(shù)
|
參數(shù)名稱 |
類型 |
是否必選 |
說明 |
|---|---|---|---|
|
security_group |
是 |
更新操作時(shí)至少指定一項(xiàng)屬性。 |
請求示例
更新id為d29ae17d-f355-4992-8747-1fb66cc9afd2的安全組,名稱更新為sg-test02。
PUT https://{Endpoint}/v2.0/security-groups/d29ae17d-f355-4992-8747-1fb66cc9afd2
{
"security_group": {
"name": "sg-test02"
}
}
響應(yīng)參數(shù)
|
參數(shù)名稱 |
類型 |
說明 |
|---|---|---|
|
security_group |
|
屬性 |
類型 |
說明 |
|---|---|---|
|
id |
String |
安全組的id 使用說明:查詢安全組列表非必選 |
|
tenant_id |
String |
項(xiàng)目ID |
|
name |
String |
安全組名稱 |
|
description |
String |
安全組描述 |
|
security_group_rules |
||
|
project_id |
String |
項(xiàng)目ID,請參見獲取項(xiàng)目ID。 |
|
created_at |
String |
資源創(chuàng)建時(shí)間,UTC時(shí)間 格式:yyyy-MM-ddTHH:mm:ss |
|
updated_at |
String |
資源更新時(shí)間,UTC時(shí)間 格式:yyyy-MM-ddTHH:mm:ss |
|
屬性 |
類型 |
說明 |
|---|---|---|
|
id |
String |
安全組規(guī)則id 使用說明:查詢安全組規(guī)則非必選 |
|
description |
String |
安全組規(guī)則描述 |
|
security_group_id |
String |
所屬安全組id |
|
remote_group_id |
String |
所屬安全組的對(duì)端id |
|
direction |
String |
規(guī)則方向 |
|
remote_ip_prefix |
String |
對(duì)端ip網(wǎng)段 |
|
protocol |
String |
協(xié)議類型或直接指定IP協(xié)議號(hào) |
|
port_range_max |
Integer |
最大端口,當(dāng)協(xié)議類型為ICMP時(shí),該值表示ICMP的code |
|
port_range_min |
Integer |
最小端口,當(dāng)協(xié)議類型為ICMP時(shí),該值表示ICMP的type。 protocol為tcp和udp時(shí),port_range_max和port_range_min必須同時(shí)輸入,且port_range_max應(yīng)大于等于port_range_min。 protocol為icmp時(shí),指定ICMP code(port_range_max)時(shí),必須同時(shí)指定ICMP type(port_range_min)。 |
|
ethertype |
String |
網(wǎng)絡(luò)類型 支持IPv4,IPv6 |
|
tenant_id |
String |
項(xiàng)目ID |
|
remote_address_group_id |
String |
|
|
project_id |
String |
項(xiàng)目ID,請參見獲取項(xiàng)目ID。 |
|
created_at |
String |
資源創(chuàng)建時(shí)間,UTC時(shí)間 格式:yyyy-MM-ddTHH:mm:ss |
|
updated_at |
String |
資源更新時(shí)間,UTC時(shí)間 格式:yyyy-MM-ddTHH:mm:ss |
響應(yīng)示例
{
"security_group": {
"id": "d29ae17d-f355-4992-8747-1fb66cc9afd2",
"name": "sg-test02",
"description": "",
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"security_group_rules": [
{
"id": "6332de3e-98fb-4f8c-b44a-fcb8ff09881e",
"direction": "egress",
"protocol": null,
"ethertype": "IPv6",
"description": null,
"remote_group_id": null,
"remote_ip_prefix": null,
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"port_range_max": null,
"port_range_min": null,
"security_group_id": "d29ae17d-f355-4992-8747-1fb66cc9afd2",
"remote_address_group_id": "0150a3a7-82ca-4569-865c-04e46e5e9249"
},
{
"id": "3f51e52c-0e85-40f7-a137-85927392e436",
"direction": "egress",
"protocol": null,
"ethertype": "IPv4",
"description": null,
"remote_group_id": null,
"remote_ip_prefix": null,
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"port_range_max": null,
"port_range_min": null,
"security_group_id": "d29ae17d-f355-4992-8747-1fb66cc9afd2",
"remote_address_group_id": null
}
],
"created_at": "2018-09-20T02:15:34",
"updated_at": "2018-09-20T02:16:31"
}
}
狀態(tài)碼
請參見狀態(tài)碼。
錯(cuò)誤碼
請參見錯(cuò)誤碼。
最新文章
- 函數(shù)工作流自動(dòng)更新ECS證書_ECS證書自動(dòng)更新_彈性云服務(wù)器
- VPC安全組_如何保護(hù)云上服務(wù)器安全_訪問保護(hù)策略-華為云
- 如何購買GaussDB_GaussDB 定價(jià)與計(jì)費(fèi)_如何購買高斯數(shù)據(jù)庫-華為云
- 華為云數(shù)據(jù)庫 RDS for MySQL常見故障排除_華為云
- 數(shù)據(jù)庫安全服務(wù)添加數(shù)據(jù)庫_數(shù)據(jù)庫安全服務(wù)添加Agent_數(shù)據(jù)庫安全服務(wù)添加安全組規(guī)則
- 連接TaurusDB數(shù)據(jù)庫_華為云數(shù)據(jù)庫TaurusDB_數(shù)據(jù)庫連接
