Security Group Rule

This page describes operations you can perform on security-group-rules. List, create, get details for, and delete.

List Security Group Rule

List all visible security-group-rules.

Synchronous / Asynchronous

  • Synchronous

Request

HTTP Request Method

  • GET

HTTP Request Path

{endpoint}/v2.0/security-group-rules

HTTP Request Parameters

Parameter Style Type Format Enumeration Description Required
description query string - - Security group rule description. no
direction query string - ['ingress', 'egress'] Direction in which the security group rule is applied. no
ethertype query string - ['IPv4', 'IPv6', None] It should be IPv4 or IPv6. If specified, addresses represented in CIDR must match this value. no
id query string hyph-uuid - Security group rule unique id. no
port_range_max query integer - - The maximum port number in the range that is matched by the security group rule. no
port_range_min query integer - - The minimum port number in the range that is matched by the security group rule. no
protocol query string - - Protocol name or number in string format. e.g. "ICMP" or "1" no
remote_group_id query string hyph-uuid - The remote group UUID to associate with this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified. no
remote_ip_prefix query string - - The remote IP prefix that is matched by this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified. no
security_group_id query string hyph-uuid - Security group id. no
tenant_id query string non-hyph-uuid-or-empty - The owner name of security group rule. no

Response

HTTP Response Code List

Response Code Description
200 OK
400 Bad Request
401 UnAuthorized
404 Not Found
500 Internal Server Error

HTTP Response Parameters

Parameter Type Format Description
security-group-rules array<object> Security Group Rule -
description string - Security group rule description.
direction string - Direction in which the security group rule is applied.
ethertype string - It should be IPv4 or IPv6. If specified, addresses represented in CIDR must match this value.
id string hyph-uuid Security group rule unique id.
port_range_max integer - The maximum port number in the range that is matched by the security group rule.
port_range_min integer - The minimum port number in the range that is matched by the security group rule.
protocol string - Protocol name or number in string format. e.g. "ICMP" or "1"
remote_group_id string hyph-uuid The remote group UUID to associate with this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified.
remote_ip_prefix string - The remote IP prefix that is matched by this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified.
security_group_id string hyph-uuid Security group id.
tenant_id string non-hyph-uuid-or-empty The owner name of security group rule.

Examples

Sample Request Body

This operation does not send a request body.

Sample Response Body

Only when you customize, return value includes entry like below.

{
  "security_group_rules": [
    {
      "description": "Example security group rule 1 description.",
      "direction": "ingress",
      "ethertype": "IPv4",
      "id": "830b1b3a-d159-4e4b-b43b-4ba62bf46bb8",
      "port_range_max": 65535,
      "port_range_min": 0,
      "protocol": "ip",
      "remote_group_id": null,
      "remote_ip_prefix": "192.168.100.0/24",
      "security_group_id": "5a79909b-2bf3-4e26-8a9c-0bf6bb175457",
      "tenant_id": "6a156ddf2ecd497ca786ff2da6df5aa8"
    },
    {
      "description": "Example security group rule 2 description.",
      "direction": "egress",
      "ethertype": "IPv4",
      "id": "cbfb59f0-30ba-4714-829b-373f13cf8962",
      "port_range_max": 65535,
      "port_range_min": 0,
      "protocol": "1",
      "remote_group_id": "5a79909b-2bf3-4e26-8a9c-0bf6bb175457",
      "remote_ip_prefix": null,
      "security_group_id": "f80a5f90-7c5d-472b-9eb4-c2160cfa29e3",
      "tenant_id": "6a156ddf2ecd497ca786ff2da6df5aa8"
    }
  ]
}

Create Security Group Rule

Create security-group-rule.

Synchronous / Asynchronous

  • Asynchronous

Request

HTTP Request Method

  • POST

HTTP Request Path

{endpoint}/v2.0/security-group-rules

HTTP Request Parameters

Parameter Style Type Format Enumeration Default Description Required
security_group_rule plain object Security Group Rule - - - yes
description plain string - - "" Security group rule description. no
direction plain string - ['ingress', 'egress'] - Direction in which the security group rule is applied. yes
ethertype plain string - ['IPv4', 'IPv6', None] null It should be IPv4 or IPv6. If specified, addresses represented in CIDR must match this value. no
port_range_max plain integer - - 65535 The maximum port number in the range that is matched by the security group rule. no
port_range_min plain integer - - 0 The minimum port number in the range that is matched by the security group rule. no
protocol plain string - - "any" Protocol name or number in string format. e.g. "ICMP" or "1" no
remote_group_id plain string hyph-uuid - null The remote group UUID to associate with this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified. no
remote_ip_prefix plain string - - null The remote IP prefix that is matched by this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified. no
security_group_id plain string hyph-uuid - - Security group id. yes
tenant_id plain string non-hyph-uuid-or-empty - See notes. The owner name of security group rule. no

注釈

tenant_id: The ID of default tenant to which user belongs.

Response

HTTP Response Code List

Response Code Description
201 OK
400 Bad Request
401 UnAuthorized
404 Not Found
409 Conflict
500 Internal Server Error

HTTP Response Parameters

Parameter Type Format Description
security_group_rule object Security Group Rule -
description string - Security group rule description.
direction string - Direction in which the security group rule is applied.
ethertype string - It should be IPv4 or IPv6. If specified, addresses represented in CIDR must match this value.
id string hyph-uuid Security group rule unique id.
port_range_max integer - The maximum port number in the range that is matched by the security group rule.
port_range_min integer - The minimum port number in the range that is matched by the security group rule.
protocol string - Protocol name or number in string format. e.g. "ICMP" or "1"
remote_group_id string hyph-uuid The remote group UUID to associate with this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified.
remote_ip_prefix string - The remote IP prefix that is matched by this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified.
security_group_id string hyph-uuid Security group id.
tenant_id string non-hyph-uuid-or-empty The owner name of security group rule.

Examples

Sample Request Body

{
  "security_group_rule": {
    "description": "Example security group rule 1 description.",
    "direction": "ingress",
    "ethertype": "IPv4",
    "port_range_max": 65535,
    "port_range_min": 0,
    "protocol": "ip",
    "remote_ip_prefix": "192.168.100.0/24",
    "security_group_id": "5a79909b-2bf3-4e26-8a9c-0bf6bb175457",
    "tenant_id": "6a156ddf2ecd497ca786ff2da6df5aa8"
  }
}

Sample Response Body

{
  "security_group_rule": {
    "description": "Example security group rule 1 description.",
    "direction": "ingress",
    "ethertype": "IPv4",
    "id": "830b1b3a-d159-4e4b-b43b-4ba62bf46bb8",
    "port_range_max": 65535,
    "port_range_min": 0,
    "protocol": "ip",
    "remote_group_id": null,
    "remote_ip_prefix": "192.168.100.0/24",
    "security_group_id": "5a79909b-2bf3-4e26-8a9c-0bf6bb175457",
    "tenant_id": "6a156ddf2ecd497ca786ff2da6df5aa8"
  }
}

Show Security Group Rule

Show details for security-group-rule.

Synchronous / Asynchronous

  • Synchronous

Request

HTTP Request Method

  • GET

HTTP Request Path

{endpoint}/v2.0/security-group-rules/{security_group_rule_id}

HTTP Request Parameters

Parameter Style Type Format Enumeration Description Required
security_group_rule_id URI string hyph-uuid - Security group rule unique id. yes

Response

HTTP Response Code List

Response Code Description
200 OK
400 Bad Request
401 UnAuthorized
404 Not Found
500 Internal Server Error

HTTP Response Parameters

Parameter Type Format Description
security_group_rule object Security Group Rule -
description string - Security group rule description.
direction string - Direction in which the security group rule is applied.
ethertype string - It should be IPv4 or IPv6. If specified, addresses represented in CIDR must match this value.
id string hyph-uuid Security group rule unique id.
port_range_max integer - The maximum port number in the range that is matched by the security group rule.
port_range_min integer - The minimum port number in the range that is matched by the security group rule.
protocol string - Protocol name or number in string format. e.g. "ICMP" or "1"
remote_group_id string hyph-uuid The remote group UUID to associate with this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified.
remote_ip_prefix string - The remote IP prefix that is matched by this security group rule. Only either one of remote_group_id and remote_ip_prefix have to be specified.
security_group_id string hyph-uuid Security group id.
tenant_id string non-hyph-uuid-or-empty The owner name of security group rule.

Examples

Sample Request Body

This operation does not send a request body.

Sample Response Body

{
  "security_group_rule": {
    "description": "Example security group rule 1 description.",
    "direction": "ingress",
    "ethertype": "IPv4",
    "id": "830b1b3a-d159-4e4b-b43b-4ba62bf46bb8",
    "port_range_max": 65535,
    "port_range_min": 0,
    "protocol": "ip",
    "remote_group_id": null,
    "remote_ip_prefix": "192.168.100.0/24",
    "security_group_id": "5a79909b-2bf3-4e26-8a9c-0bf6bb175457",
    "tenant_id": "6a156ddf2ecd497ca786ff2da6df5aa8"
  }
}

Delete Security Group Rule

Delete security-group-rule.

Synchronous / Asynchronous

  • Asynchronous

Request

HTTP Request Method

  • DELETE

HTTP Request Path

{endpoint}/v2.0/security-group-rules/{security_group_rule_id}

HTTP Request Parameters

Parameter Style Type Format Enumeration Description Required
security_group_rule_id URI string hyph-uuid - Security group rule unique id. yes

Response

HTTP Response Code List

Response Code Description
204 No Content
400 Bad Request
401 UnAuthorized
404 Not Found
409 Conflict
500 Internal Server Error

HTTP Response Parameters

This operation does not receive a response body.

Examples

Sample Request Body

This operation does not send a request body.

Sample Response Body

This operation does not receive a response body.