List security group rules

Lists a summary of all OpenStack Networking security group rules that the specified project can access.

URI

/v2.0/security-group-rules

HTTP method

GET

Response status

Status code Description
200 Normal response codes
unauthorized (401) Error response codes

Response body (normal status)


{
    "security_group_rules": [
        {
            "direction": "egress",
            "ethertype": "IPv6",
            "id": "3c0e45ff-adaf-4124-b083-bf390e5482ff",
            "port_range_max": null,
            "port_range_min": null,
            "protocol": null,
            "remote_group_id": null,
            "remote_ip_prefix": null,
            "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        },
        {
            "direction": "egress",
            "ethertype": "IPv4",
            "id": "93aa42e5-80db-4581-9391-3a608bd0e448",
            "port_range_max": null,
            "port_range_min": null,
            "protocol": null,
            "remote_group_id": null,
            "remote_ip_prefix": null,
            "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        },
        {
            "direction": "ingress",
            "ethertype": "IPv6",
            "id": "c0b09f00-1d49-4e64-a0a7-8a186d928138",
            "port_range_max": null,
            "port_range_min": null,
            "protocol": null,
            "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "remote_ip_prefix": null,
            "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        },
        {
            "direction": "ingress",
            "ethertype": "IPv4",
            "id": "f7d45c89-008e-4bab-88ad-d6811724c51c",
            "port_range_max": null,
            "port_range_min": null,
            "protocol": null,
            "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "remote_ip_prefix": null,
            "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        }
    ]
}
     

Description of response body (normal status)

Item Description
direction Ingress or egress: The direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.
ethertype Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
security_group_id The security group ID to associate with this security group rule.
port_range_min The minimum port number in the range that is matched by the security group rule.

When the protocol is TCP or UDP, If this value is not specified, the security group rule matches all numbers of port.

If port_range_min is 0, all port numbers are allowed regardless of port_range_max.

When the protocol is ICMP, this value must be an ICMP type. If this value is null, the security group rule matches all ICMP types.

port_range_max The maximum port number in the range that is matched by the security group rule.

When the protocol is ICMP, If this value is not specified, the security group rule matches all ICMP codes.

protocol The protocol that is matched by the security group rule. Valid values are null, tcp, udp, icmp, and digits between 0 and 255.
remote_group_id The remote group ID to be associated with this security group rule.
remote_ip_prefix The remote IP prefix to be associated with this security group rule. This attribute matches the specified IP prefix as the source or destination IP address of the IP packet. if direction is ingress matches source, otherwise matches destination.