Consulta as regras de um grupo de segurança.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
ens:DescribeSecurityGroupAttribute |
get |
*All Resource
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| SecurityGroupId |
string |
Sim |
O ID do grupo de segurança. |
sg-bp67acfmxazb4ph*** |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| RequestId |
string |
O ID da solicitação. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| Description |
string |
A descrição do grupo de segurança. |
testDescription1 |
| SecurityGroupId |
string |
O ID do grupo de segurança de destino. |
sg-bp1gxw6bznjjvhu3**** |
| SecurityGroupName |
string |
O nome do grupo de segurança de destino. |
testSecurityGroupName2 |
| Permissions |
object |
||
| Permission |
array<object> |
Detalhes sobre as regras. |
|
|
object |
Esquema da resposta. |
||
| 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 |
Exemplos
Resposta de sucesso
JSON formato
{
"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"
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidSecurityGroupId.NotFound | The specified SecurityGroupId does not exist. | The specified security group ID does not exist. |
| 400 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | The current operation is not supported. The disk is being reset. |
| 400 | CallInterface | Call Interface Happen Error. | An error occurred when you call the operation. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.