You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/userguide/Networking/USERGUIDE.md
+147Lines changed: 147 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,16 @@ these entities.
33
33
*[Get a port](#get-a-port)
34
34
*[Update a port](#update-a-port)
35
35
*[Delete a port](#delete-a-port)
36
+
*[Security Groups](#security-groups)
37
+
*[Create a security group](#create-a-security-group)
38
+
*[List security groups](#list-security-groups)
39
+
*[Get a security group](#get-a-security-group)
40
+
*[Delete a security group](#delete-a-security-group)
41
+
*[Security group rule Rules](#security-group-rules)
42
+
*[Create a security group rule](#create-a-security-group-rule)
43
+
*[List security group rules](#list-security-group-rules)
44
+
*[Get a security group rule](#get-a-security-group-rule)
45
+
*[Delete a security group rule](#delete-a-security-group-rule)
36
46
37
47
## Concepts
38
48
@@ -55,6 +65,10 @@ be assigned to the interfaces plugged into them. When IP addresses are
55
65
associated with a port, this also implies the port is associated with a subnet
56
66
because the IP address is taken from the allocation pool for a specific subnet.
57
67
68
+
***Security Group**: A named container for security group rules.
69
+
70
+
***Security Group Rule**: Provide users the ability to specify the types of traffic that are allowed to pass through to and from ports on a virtual server instance.
71
+
58
72
## Prerequisites
59
73
60
74
### Client
@@ -468,3 +482,136 @@ $port->delete();
468
482
```
469
483
470
484
[[Get the executable PHP script for this example](/samples/Networking/delete-port.php)]
485
+
486
+
## Security Groups
487
+
488
+
A security group is a named container for [security group rules](#security-group-rules).
489
+
490
+
### Create a security group
491
+
492
+
This operation takes one parameter, an associative array, with the following keys:
493
+
494
+
| Name | Description | Data type | Required? | Default value | Example value |
[[Get the executable PHP script for this example](/samples/Networking/get-security-group.php)]
536
+
537
+
### Delete a security group
538
+
539
+
You can delete a security group as shown in the following example:
540
+
541
+
```php
542
+
$securityGroup->delete();
543
+
```
544
+
545
+
[[Get the executable PHP script for this example](/samples/Networking/delete-security-group.php)]
546
+
547
+
## Security Group Rules
548
+
549
+
A security group rule provides users the ability to specify the types of traffic that are allowed to pass through to and from ports on a virtual server instance.
550
+
551
+
### Create a security group rule
552
+
553
+
This operation takes one parameter, an associative array, with the following keys:
554
+
555
+
| Name | Description | Data type | Required? | Default value | Example value |
|`securityGroupId`| The security group ID to associate with this security group rule. | String | Yes | - |`2076db17-a522-4506-91de-c6dd8e837028`|
558
+
|`direction`| 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. | String (`ingress` or `egress`) | Yes | - |`ingress`|
559
+
|`ethertype`| Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules. | String (`IPv4` or `IPv6`) | No |`IPv4`|`IPv6`|
560
+
|`portRangeMin`| The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the `portRangeMax` attribute. If the protocol is ICMP, this value must be an ICMP type. | Integer | No |`null`|`80`|
561
+
|`portRangeMax`| The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the attribute. If the protocol is ICMP, this value must be an ICMP type. | Integer | No |`null`|`80`|
562
+
|`protocol`| The protocol that is matched by the security group rule. | String (`tcp`, `udp`, `icmp`) | No |`null`|`tcp`|
563
+
|`remoteGroupId`| The remote group ID to be associated with this security group rule. You can specify either `remoteGroupId` or `remoteGroupPrefix`. | String | Optional |`null`|`85cc3048-abc3-43cc-89b3-377341426ac5`|
564
+
|`remoteIpPrefix`| The remote IP prefix to be associated with this security group rule. You can specify either `remoteGroupId` or `remoteGroupPrefix`. | String | Optional |`null`|`192.168.5.0`|
565
+
566
+
You can create a security group rule as shown in the following example:
0 commit comments