Skip to main content
Resource Center/Network Service/Network Service Operations/Security Group Operations
GETSecurity Group OperationsSince 0.6SynchronousAuth Required

QuerySecurityGroupRule

QuerySecurityGroupRule

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

This API requires no request parameters.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoriesListRequired

    See inventories.

    • uuidStringRequired

      The resource UUID.

    • securityGroupUuidStringRequired

      The security group UUID.

    • typeStringRequired

      The traffic type.

    • ipVersionIntegerRequired

      The IP version.

    • startPortIntegerRequired

      If the protocol is TCP or UDP, this parameter is the start port of the port range. If the protocol is ICMP, this parameter is the ICMP type.

    • endPortIntegerRequired

      If the protocol is TCP or UDP, this parameter is the end port of the port range. If the protocol is ICMP, this parameter is the ICMP type.

    • protocolStringRequired

      The traffic protocol type.

    • stateStringRequired

      The rule state, which is not implemented in the current version.

    • allowedCidrStringRequired

      The allowed CIDR, which has different meanings according to different traffic types. If the traffic type is Ingress, the allowed CIDR is a source CIDR that is allowed to access VM NICs. If the traffic type is Egress, the allowed CIDR is a destination CIDR that is allowed to leave from VM NICs.

    • remoteSecurityGroupUuidStringRequired

      远程安全组UUID。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

Endpoint

GET/zstack/v1/security-groups/rules

/zstack/v1/security-groups/rules

Operation ID

QuerySecurityGroupRule

Permalink

Request Example

curl -X GET 'http://{host}/zstack/v1/security-groups/rules' -H 'Authorization: OAuth {sessionUuid}'

Response Example

200
{ "inventories": [ { "uuid": "b3a99fc1548b41778258153cfd70f4b7", "securityGroupUuid": "629d55f78c9f4b0e8e3504b9834ca1bb", "type": "Ingress", "startPort": 22.0, "endPort": 22.0, "protocol": "TCP", "state": "Enabled", "allowedCidr": "0.0.0.0/0", "createDate": "Jun 7, 2017 9:20:25 PM", "lastOpDate": "Jun 7, 2017 9:20:25 PM" } ] }

Change History

This API has no change history records yet.

View all change history