Virtual Private Cloud API, REST: SecurityGroup methods
A set of methods for managing SecurityGroup resources.
JSON Representation
{
"id": "string",
"folderId": "string",
"createdAt": "string",
"name": "string",
"description": "string",
"labels": "object",
"networkId": "string",
"status": "string",
"rules": [
{
"id": "string",
"description": "string",
"labels": "object",
"direction": "string",
"ports": {
"fromPort": "string",
"toPort": "string"
},
"protocolName": "string",
"protocolNumber": "string",
// `rules[]` includes only one of the fields `cidrBlocks`, `securityGroupId`, `predefinedTarget`
"cidrBlocks": {
"v4CidrBlocks": [
"string"
],
"v6CidrBlocks": [
"string"
]
},
"securityGroupId": "string",
"predefinedTarget": "string",
// end of the list of possible fields`rules[]`
}
],
"defaultForNetwork": true
}
Field | Description |
---|---|
id | string ID of the security group. |
folderId | string ID of the folder that the security group belongs to. |
createdAt | string (date-time) Creation timestamp in RFC3339 text format. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
name | string Name of the security group. The name must be unique within the folder. Value must match the regular expression |
description | string Description of the security group. 0-256 characters long. |
labels | object Resource labels as |
networkId | string ID of the network that the security group belongs to. |
status | string Security group status.
|
rules[] | object List of the security group rules. |
rules[]. id |
string ID of the rule. |
rules[]. description |
string Description of the rule. 0-256 characters long. |
rules[]. labels |
object Resource labels as |
rules[]. direction |
string Required. The direction of network traffic allowed by this rule.
|
rules[]. ports |
object The range of ports that allow traffic to pass through. Null value means any. |
rules[]. ports. fromPort |
string (int64) The lowest port in the range. Acceptable values are 0 to 65535, inclusive. |
rules[]. ports. toPort |
string (int64) The highest port in the range. Acceptable values are 0 to 65535, inclusive. |
rules[]. protocolName |
string Protocol name. Null value means any protocol. Values from IANA. |
rules[]. protocolNumber |
string (int64) Protocol number from IANA protocol numbers. |
rules[]. cidrBlocks |
object CIDR blocks to allow to recieve or send traffic. rules[] includes only one of the fields cidrBlocks , securityGroupId , predefinedTarget |
rules[]. cidrBlocks. v4CidrBlocks[] |
string IPv4 CIDR blocks to allow traffic to. |
rules[]. cidrBlocks. v6CidrBlocks[] |
string IPv6 CIDR blocks to allow traffic to. |
rules[]. securityGroupId |
string rules[] includes only one of the fields cidrBlocks , securityGroupId , predefinedTarget ID of the security group to add rule to. |
rules[]. predefinedTarget |
string rules[] includes only one of the fields cidrBlocks , securityGroupId , predefinedTarget Predefined target. See security groups rules for more information. |
defaultForNetwork | boolean (boolean) Flag that indicates that the security group is the default for the network. |
Methods
Method | Description |
---|---|
create | Creates a security group in the specified folder and network. |
delete | Deletes the specified security group. |
get | Returns the specified SecurityGroup resource. |
list | Retrieves the list of SecurityGroup resources in the specified folder. |
listOperations | Lists operations for the specified security groups. |
move | Moves security groups to another folder. |
update | Updates the specified security group. Method starts an asynchronous operation that can be cancelled while it is in progress. |
updateRule | Updates the specified rule. |
updateRules | Updates the rules of the specified security group. |