Skip to main content
Network Management/Network Services/Security Group
GETSecurity GroupSince 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

    Error code. If not null, the operation failed. If null, the operation succeeded. See error

    • codeStringRequired

      Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001

    • descriptionStringRequired

      Brief description of the error

    • detailsStringRequired

      Detailed error information

    • elaborationStringRequired

      Reserved field, defaults to null

    • opaqueLinkedHashMapRequired

      Reserved field, defaults to null

    • causeErrorCodeRequired

      Root error: the source error that caused the current error. If there is no original error, this field is null

  • inventoriesListRequired

    See inventories

    • uuidStringRequired

      The UUID of the resource, uniquely identifying the resource

    • securityGroupUuidStringRequired

      The security group UUID

    • typeStringRequired

      The traffic type

    • ipVersionIntegerRequired

      The IP version number

    • startPortIntegerRequired

      For TCP/UDP, it is the start port number of the port range; for ICMP, it is the ICMP type

    • endPortIntegerRequired

      For TCP/UDP, it is the end port number of the port range; for ICMP, it is the ICMP type

    • protocolStringRequired

      The traffic protocol type

    • stateStringRequired

      The availability state of the rule, not implemented in the current version

    • allowedCidrStringRequired

      The allowed CIDR. The meaning of the allowed CIDR varies depending on the traffic type. For Ingress traffic, the allowed CIDR is the source CIDR that is permitted to access the VM NIC. For Egress traffic, the allowed CIDR is the destination CIDR that traffic from the VM NIC is permitted to reach

    • remoteSecurityGroupUuidStringRequired

      远程安全组UUID。

    • createDateTimestampRequired

      The creation time

    • lastOpDateTimestampRequired

      The last modification time

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