Memanggil DescribeSecurityGroupAttribute untuk mengkueri aturan grup keamanan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:DescribeSecurityGroupAttribute |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| SecurityGroupId |
string |
Yes |
ID grup keamanan. |
sg-bp67acfmxazb4ph*** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| Description |
string |
Deskripsi grup keamanan. |
testDescription1 |
| SecurityGroupId |
string |
ID grup keamanan target. |
sg-bp1gxw6bznjjvhu3**** |
| SecurityGroupName |
string |
Nama grup keamanan target. |
testSecurityGroupName2 |
| Permissions |
object |
||
| Permission |
array<object> |
Aturan. |
|
|
object |
Aturan grup keamanan. |
||
| CreationTime |
string |
The time at which the security group rule was created. The time is displayed in UTC. |
2018-12-12T07:28:38Z |
| Direction |
string |
The direction in which the security group rule is applied. |
ingress |
| Policy |
string |
The policy. |
Accept |
| PortRange |
string |
The source port range. |
80/80 |
| SourceCidrIp |
string |
The range of source IP addresses for inbound access control. |
0.0.0.0/0 |
| IpProtocol |
string |
The transport layer protocol. |
TCP |
| DestCidrIp |
string |
The range of destination IP addresses for outbound access control. |
0.0.0.0/0 |
| Priority |
integer |
The priority of the rule. |
1 |
| SourcePortRange |
string |
The source port number range for the security group. |
22/22 |
| Description |
string |
The description. |
testDescription1 |
| Ipv6SourceCidrIp |
string |
The source IPv6 CIDR block. |
::/0 |
| Ipv6DestCidrIp |
string |
The destination IPv6 CIDR block. |
::/0 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"Description": "testDescription1",
"SecurityGroupId": "sg-bp1gxw6bznjjvhu3****",
"SecurityGroupName": "testSecurityGroupName2",
"Permissions": {
"Permission": [
{
"CreationTime": "2018-12-12T07:28:38Z",
"Direction": "ingress",
"Policy": "Accept",
"PortRange": "80/80",
"SourceCidrIp": "0.0.0.0/0",
"IpProtocol": "TCP",
"DestCidrIp": "0.0.0.0/0",
"Priority": 1,
"SourcePortRange": "22/22",
"Description": "testDescription1",
"Ipv6SourceCidrIp": "::/0",
"Ipv6DestCidrIp": "::/0"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidSecurityGroupId.NotFound | The specified SecurityGroupId does not exist. | |
| 400 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 400 | CallInterface | Call Interface Happen Error. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.