本介面主要用於查詢一個指定安全性群組的詳細資訊,並關聯查詢安全性群組規則詳細資訊列表。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:DescribeSecurityGroupAttribute |
get |
*SecurityGroup
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| SecurityGroupId |
string |
是 |
安全性群組 ID。 |
sg-bp1gxw6bznjjvhu3**** |
| RegionId |
string |
是 |
安全性群組所屬地域 ID。您可以呼叫 DescribeRegions 查看最新的阿里雲地域列表。 |
cn-hangzhou |
| NicType |
string |
否 |
安全性群組規則的網卡類型。
|
intranet |
| Direction |
string |
否 |
安全性群組規則授權方向。取值範圍:
預設值:all。 |
all |
| NextToken |
string |
否 |
查詢憑證(Token)。取值為上一次呼叫該介面返回的 NextToken 參數值,初次呼叫介面時無需設置該參數。 |
AAAAAdDWBF2**** |
| MaxResults |
integer |
否 |
分頁查詢時每頁的最大條目數。
預設值為 500。 |
500 |
| Attribute |
string |
否 |
安全性群組屬性,取值範圍:
|
snapshotPolicyIds |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| VpcId |
string |
VPC ID。返回 VPC ID,表示該安全性群組網路類型為 VPC。否則,表示是經典網路類型安全性群組。 說明
經典網路功能已下線,詳情請參見下線公告。 |
vpc-bp1opxu1zkhn00gzv**** |
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| InnerAccessPolicy |
string |
安全性群組內網路連通策略。可能值:
|
Accept |
| Description |
string |
安全性群組描述資訊。 |
This is description. |
| SecurityGroupId |
string |
安全性群組 ID。 |
sg-bp1gxw6bznjjvhu3**** |
| SecurityGroupName |
string |
安全性群組名稱。 |
SecurityGroupName Sample |
| RegionId |
string |
地域 ID。 |
cn-hangzhou |
| Permissions |
object |
||
| Permission |
array<object> |
安全性群組權限規則集合。 |
|
|
object |
|||
| SecurityGroupRuleId |
string |
安全性群組規則 ID。 |
sgr-bp12kewq32dfwrdi**** |
| Direction |
string |
授權方向。 |
ingress |
| SourceGroupId |
string |
源端安全性群組,用於入方向授權。 |
sg-bp12kc4rqohaf2js**** |
| DestGroupOwnerAccount |
string |
目的端安全性群組所屬阿里雲賬戶 ID。 |
1234567890 |
| DestPrefixListId |
string |
目的端首碼列表 ID,用於出方向授權。 |
pl-x1j1k5ykzqlixabc**** |
| DestPrefixListName |
string |
目的端首碼列表的名稱。 |
DestPrefixListName Sample |
| SourceCidrIp |
string |
源端 IP 位址段,用於入方向授權。 |
0.0.0.0/0 |
| Ipv6DestCidrIp |
string |
目的端 IPv6 位址區段。 |
2001:db8:1233:1a00::*** |
| CreateTime |
string |
建立時間,UTC 時間。 |
2018-12-12T07:28:38Z |
| Ipv6SourceCidrIp |
string |
源端 IPv6 位址區段。 |
2001:db8:1234:1a00::*** |
| DestGroupId |
string |
目的端安全性群組,用於出方向授權。 |
sg-bp1czdx84jd88i7v**** |
| DestCidrIp |
string |
目的端 IP 位址段,用於出方向授權。 |
0.0.0.0/0 |
| IpProtocol |
string |
IP 協議。 |
TCP |
| Priority |
string |
規則優先順序。 |
1 |
| DestGroupName |
string |
目的端安全性群組名稱。 |
testDestGroupName |
| NicType |
string |
網路類型。 |
intranet |
| Policy |
string |
授權策略。 |
Accept |
| Description |
string |
安全性群組描述資訊。 |
Description Sample 01 |
| PortRange |
string |
連接埠範圍。 |
80/80 |
| SourcePrefixListName |
string |
源端首碼列表的名稱。 |
SourcePrefixListName Sample |
| SourcePrefixListId |
string |
源端首碼列表 ID,用於入方向授權。 |
pl-x1j1k5ykzqlixdcy**** |
| SourceGroupOwnerAccount |
string |
源端安全性群組所屬阿里雲賬戶 ID。 |
1234567890 |
| SourceGroupName |
string |
源端安全性群組名稱。 |
testSourceGroupName1 |
| SourcePortRange |
string |
源端連接埠範圍。 |
80/80 |
| PortRangeListId |
string |
連接埠列表 ID。 |
prl-2ze9743**** |
| PortRangeListName |
string |
連接埠列表的名稱。 |
PortRangeListNameSample |
| NextToken |
string |
本次呼叫返回的查詢憑證(Token)。當使用 |
AAAAAdDWBF2**** |
| SnapshotPolicyIds |
object |
||
| SnapshotPolicyId |
array |
安全性群組關聯的快照策略 ID 列表。 |
|
|
string |
安全性群組關聯的快照策略 ID。 |
sgsp-mj74**** |
樣本
正常返回樣本
JSON格式
{
"VpcId": "vpc-bp1opxu1zkhn00gzv****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"InnerAccessPolicy": "Accept",
"Description": "This is description.",
"SecurityGroupId": "sg-bp1gxw6bznjjvhu3****",
"SecurityGroupName": "SecurityGroupName Sample",
"RegionId": "cn-hangzhou",
"Permissions": {
"Permission": [
{
"SecurityGroupRuleId": "sgr-bp12kewq32dfwrdi****",
"Direction": "ingress",
"SourceGroupId": "sg-bp12kc4rqohaf2js****",
"DestGroupOwnerAccount": "1234567890",
"DestPrefixListId": "pl-x1j1k5ykzqlixabc****",
"DestPrefixListName": "DestPrefixListName Sample",
"SourceCidrIp": "0.0.0.0/0",
"Ipv6DestCidrIp": "2001:db8:1233:1a00::***",
"CreateTime": "2018-12-12T07:28:38Z",
"Ipv6SourceCidrIp": "2001:db8:1234:1a00::***",
"DestGroupId": "sg-bp1czdx84jd88i7v****",
"DestCidrIp": "0.0.0.0/0",
"IpProtocol": "TCP",
"Priority": "1",
"DestGroupName": "testDestGroupName",
"NicType": "intranet",
"Policy": "Accept",
"Description": "Description Sample 01",
"PortRange": "80/80",
"SourcePrefixListName": "SourcePrefixListName Sample",
"SourcePrefixListId": "pl-x1j1k5ykzqlixdcy****",
"SourceGroupOwnerAccount": "1234567890",
"SourceGroupName": "testSourceGroupName1",
"SourcePortRange": "80/80",
"PortRangeListId": "prl-2ze9743****",
"PortRangeListName": "PortRangeListNameSample"
}
]
},
"NextToken": "AAAAAdDWBF2****",
"SnapshotPolicyIds": {
"SnapshotPolicyId": [
"sgsp-mj74****"
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidNicType.ValueNotSupported | The specified NicType does not exist. | |
| 400 | InvalidParamter | Invalid Parameter. | |
| 400 | InvalidSecurityGroupId.Malformed | The specified parameter "SecurityGroupId" is not valid. | |
| 400 | MissingParameter.RegionId | The parameter RegionId is missing. | |
| 400 | InvalidParameter.AttributeNotSupported | The specified value for parameter Attribute is not supported. Valid values: snapshotPolicyIds. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 500 | ServiceUnavailable | The service is unavailable, please try again later. | |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | |
| 404 | InvalidSecurityGroupId.NotFound | The specified SecurityGroupId does not exist. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。