Virtual Private Cloud API, gRPC: SecurityGroupService
A set of methods for managing SecurityGroup resources.
Call | Description |
---|---|
Get | Returns the specified SecurityGroup resource. |
List | Retrieves the list of SecurityGroup resources in the specified folder. |
Create | Creates a security group in the specified folder and network. |
Update | Updates the specified security group. |
UpdateRules | Updates the rules of the specified security group. |
UpdateRule | Updates the specified rule. |
Delete | Deletes the specified security group. |
Move | Moves security groups to another folder. |
ListOperations | Lists operations for the specified security groups. |
Calls SecurityGroupService
Get
Returns the specified SecurityGroup resource.
To get the list of all available SecurityGroup resources, make a List request.
rpc Get (GetSecurityGroupRequest) returns (SecurityGroup)
GetSecurityGroupRequest
Field | Description |
---|---|
security_group_id | string Required. ID of the Security Group resource to return. To get the security group ID, use a SecurityGroup.List request. |
SecurityGroup
Field | Description |
---|---|
id | string ID of the security group. |
folder_id | string ID of the folder that the security group belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the security group. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the security group. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
network_id | string ID of the network that the security group belongs to. |
status | enum Status Security group status.
|
rules[] | SecurityGroupRule List of the security group rules. |
default_for_network | bool Flag that indicates that the security group is the default for the network. |
SecurityGroupRule
Field | Description |
---|---|
id | string ID of the rule. |
description | string Description of the rule. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
direction | enum Direction Required. The direction of network traffic allowed by this rule.
|
ports | PortRange The range of ports that allow traffic to pass through. Null value means any. |
protocol_name | string Protocol name. Null value means any protocol. Values from IANA |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
PortRange
Field | Description |
---|---|
from_port | int64 The lowest port in the range. Acceptable values are 0 to 65535, inclusive. |
to_port | int64 The highest port in the range. Acceptable values are 0 to 65535, inclusive. |
CidrBlocks
Field | Description |
---|---|
v4_cidr_blocks[] | string IPv4 CIDR blocks to allow traffic to. |
v6_cidr_blocks[] | string IPv6 CIDR blocks to allow traffic to. |
List
Retrieves the list of SecurityGroup resources in the specified folder.
rpc List (ListSecurityGroupsRequest) returns (ListSecurityGroupsResponse)
ListSecurityGroupsRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list security groups in. To get the folder ID, use a yandex.cloud.resourcemanager.v1.FolderService.List request. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListSecurityGroupsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. |
page_token | string Page token. To get the next page of results, set page_token to the ListSecurityGroupsResponse.next_page_token returned by a previous list request. |
filter | string A filter expression that filters resources listed in the response. The expression must specify:
|
ListSecurityGroupsResponse
Field | Description |
---|---|
security_groups[] | SecurityGroup List of SecurityGroup resources. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListNetworksRequest.page_size, use the next_page_token as the value for the ListNetworksRequest.page_token query parameter in the next list request. Subsequent list requests will have their own next_page_token to continue paging through the results. |
SecurityGroup
Field | Description |
---|---|
id | string ID of the security group. |
folder_id | string ID of the folder that the security group belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the security group. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the security group. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
network_id | string ID of the network that the security group belongs to. |
status | enum Status Security group status.
|
rules[] | SecurityGroupRule List of the security group rules. |
default_for_network | bool Flag that indicates that the security group is the default for the network. |
SecurityGroupRule
Field | Description |
---|---|
id | string ID of the rule. |
description | string Description of the rule. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
direction | enum Direction Required. The direction of network traffic allowed by this rule.
|
ports | PortRange The range of ports that allow traffic to pass through. Null value means any. |
protocol_name | string Protocol name. Null value means any protocol. Values from IANA |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
PortRange
Field | Description |
---|---|
from_port | int64 The lowest port in the range. Acceptable values are 0 to 65535, inclusive. |
to_port | int64 The highest port in the range. Acceptable values are 0 to 65535, inclusive. |
CidrBlocks
Field | Description |
---|---|
v4_cidr_blocks[] | string IPv4 CIDR blocks to allow traffic to. |
v6_cidr_blocks[] | string IPv6 CIDR blocks to allow traffic to. |
Create
Creates a security group in the specified folder and network.
rpc Create (CreateSecurityGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateSecurityGroupMetadata
Operation.response:SecurityGroup
CreateSecurityGroupRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder for this request to create a security group in. To get the folder ID, use a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50. |
name | string Name of the security group. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the security group. The maximum string length in characters is 256. |
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
network_id | string Required. ID of the Network to create security group for. |
rule_specs[] | SecurityGroupRuleSpec Security rules specifications. |
SecurityGroupRuleSpec
Field | Description |
---|---|
description | string Description of the security rule. The maximum string length in characters is 256. |
labels | map<string,string> Rule labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
direction | SecurityGroupRule.Direction Required. The direction of network traffic allowed by this rule. |
ports | PortRange The range of ports that allow traffic to pass through. Null value means any port. |
protocol | oneof: protocol_name or protocol_number Values from IANA protocol numbers |
protocol_name | string Protocol name. |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
PortRange
Field | Description |
---|---|
from_port | int64 The lowest port in the range. Acceptable values are 0 to 65535, inclusive. |
to_port | int64 The highest port in the range. Acceptable values are 0 to 65535, inclusive. |
CidrBlocks
Field | Description |
---|---|
v4_cidr_blocks[] | string IPv4 CIDR blocks to allow traffic to. |
v6_cidr_blocks[] | string IPv6 CIDR blocks to allow traffic to. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateSecurityGroupMetadata
Field | Description |
---|---|
security_group_id | string ID of the security group that is being created. |
SecurityGroup
Field | Description |
---|---|
id | string ID of the security group. |
folder_id | string ID of the folder that the security group belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the security group. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the security group. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
network_id | string ID of the network that the security group belongs to. |
status | enum Status Security group status.
|
rules[] | SecurityGroupRule List of the security group rules. |
default_for_network | bool Flag that indicates that the security group is the default for the network. |
SecurityGroupRule
Field | Description |
---|---|
id | string ID of the rule. |
description | string Description of the rule. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
direction | enum Direction Required. The direction of network traffic allowed by this rule.
|
ports | PortRange The range of ports that allow traffic to pass through. Null value means any. |
protocol_name | string Protocol name. Null value means any protocol. Values from IANA |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
Update
Updates the specified security group. Method starts an asynchronous operation that can be cancelled while it is in progress.
rpc Update (UpdateSecurityGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateSecurityGroupMetadata
Operation.response:SecurityGroup
UpdateSecurityGroupRequest
Field | Description |
---|---|
security_group_id | string Required. ID of the security group to update. To get the security group ID make a SecurityGroupService.List request. The maximum string length in characters is 50. |
update_mask | google.protobuf.FieldMask Field mask that specifies which attributes of the Address should be updated. |
name | string New name for the security group. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string New description of the security group. The maximum string length in characters is 256. |
labels | map<string,string> Security group labels as key:value pairs. Existing set of labels is completely replaced by the provided set, so if you just want to add or remove a label:
[-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
rule_specs[] | SecurityGroupRuleSpec Updated rule list. All existing rules will be replaced with given list. |
SecurityGroupRuleSpec
Field | Description |
---|---|
description | string Description of the security rule. The maximum string length in characters is 256. |
labels | map<string,string> Rule labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
direction | SecurityGroupRule.Direction Required. The direction of network traffic allowed by this rule. |
ports | PortRange The range of ports that allow traffic to pass through. Null value means any port. |
protocol | oneof: protocol_name or protocol_number Values from IANA protocol numbers |
protocol_name | string Protocol name. |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
PortRange
Field | Description |
---|---|
from_port | int64 The lowest port in the range. Acceptable values are 0 to 65535, inclusive. |
to_port | int64 The highest port in the range. Acceptable values are 0 to 65535, inclusive. |
CidrBlocks
Field | Description |
---|---|
v4_cidr_blocks[] | string IPv4 CIDR blocks to allow traffic to. |
v6_cidr_blocks[] | string IPv6 CIDR blocks to allow traffic to. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateSecurityGroupMetadata
Field | Description |
---|---|
security_group_id | string ID of the SecurityGroup that is being updated. |
added_rule_ids[] | string List of added security rules IDs. |
SecurityGroup
Field | Description |
---|---|
id | string ID of the security group. |
folder_id | string ID of the folder that the security group belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the security group. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the security group. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
network_id | string ID of the network that the security group belongs to. |
status | enum Status Security group status.
|
rules[] | SecurityGroupRule List of the security group rules. |
default_for_network | bool Flag that indicates that the security group is the default for the network. |
SecurityGroupRule
Field | Description |
---|---|
id | string ID of the rule. |
description | string Description of the rule. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
direction | enum Direction Required. The direction of network traffic allowed by this rule.
|
ports | PortRange The range of ports that allow traffic to pass through. Null value means any. |
protocol_name | string Protocol name. Null value means any protocol. Values from IANA |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
UpdateRules
Updates the rules of the specified security group.
rpc UpdateRules (UpdateSecurityGroupRulesRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateSecurityGroupMetadata
Operation.response:SecurityGroup
UpdateSecurityGroupRulesRequest
Field | Description |
---|---|
security_group_id | string Required. ID of the SecurityGroup that is being updated with new rules. |
deletion_rule_ids[] | string List of rules IDs to delete. |
addition_rule_specs[] | SecurityGroupRuleSpec Security rules specifications. |
SecurityGroupRuleSpec
Field | Description |
---|---|
description | string Description of the security rule. The maximum string length in characters is 256. |
labels | map<string,string> Rule labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
direction | SecurityGroupRule.Direction Required. The direction of network traffic allowed by this rule. |
ports | PortRange The range of ports that allow traffic to pass through. Null value means any port. |
protocol | oneof: protocol_name or protocol_number Values from IANA protocol numbers |
protocol_name | string Protocol name. |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
PortRange
Field | Description |
---|---|
from_port | int64 The lowest port in the range. Acceptable values are 0 to 65535, inclusive. |
to_port | int64 The highest port in the range. Acceptable values are 0 to 65535, inclusive. |
CidrBlocks
Field | Description |
---|---|
v4_cidr_blocks[] | string IPv4 CIDR blocks to allow traffic to. |
v6_cidr_blocks[] | string IPv6 CIDR blocks to allow traffic to. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateSecurityGroupMetadata
Field | Description |
---|---|
security_group_id | string ID of the SecurityGroup that is being updated. |
added_rule_ids[] | string List of added security rules IDs. |
SecurityGroup
Field | Description |
---|---|
id | string ID of the security group. |
folder_id | string ID of the folder that the security group belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the security group. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the security group. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
network_id | string ID of the network that the security group belongs to. |
status | enum Status Security group status.
|
rules[] | SecurityGroupRule List of the security group rules. |
default_for_network | bool Flag that indicates that the security group is the default for the network. |
SecurityGroupRule
Field | Description |
---|---|
id | string ID of the rule. |
description | string Description of the rule. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
direction | enum Direction Required. The direction of network traffic allowed by this rule.
|
ports | PortRange The range of ports that allow traffic to pass through. Null value means any. |
protocol_name | string Protocol name. Null value means any protocol. Values from IANA |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
UpdateRule
Updates the specified rule.
rpc UpdateRule (UpdateSecurityGroupRuleRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateSecurityGroupRuleMetadata
Operation.response:SecurityGroupRule
UpdateSecurityGroupRuleRequest
Field | Description |
---|---|
security_group_id | string Required. ID of the SecurityGroup to update rule in. |
rule_id | string Required. ID of the rule to update. |
update_mask | google.protobuf.FieldMask Field mask that specifies which attributes of the Address should be updated. |
description | string New description of the rule. |
labels | map<string,string> Rule labels as key:value pairs. Existing set of labels is completely replaced by the provided set, so if you just want to add or remove a label:
|
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateSecurityGroupRuleMetadata
Field | Description |
---|---|
security_group_id | string ID of the SecurityGroup that is being updated with new rules. |
rule_id | string ID of the rule that is being updated. |
SecurityGroupRule
Field | Description |
---|---|
id | string ID of the rule. |
description | string Description of the rule. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
direction | enum Direction Required. The direction of network traffic allowed by this rule.
|
ports | PortRange The range of ports that allow traffic to pass through. Null value means any. |
protocol_name | string Protocol name. Null value means any protocol. Values from IANA |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
PortRange
Field | Description |
---|---|
from_port | int64 The lowest port in the range. Acceptable values are 0 to 65535, inclusive. |
to_port | int64 The highest port in the range. Acceptable values are 0 to 65535, inclusive. |
CidrBlocks
Field | Description |
---|---|
v4_cidr_blocks[] | string IPv4 CIDR blocks to allow traffic to. |
v6_cidr_blocks[] | string IPv6 CIDR blocks to allow traffic to. |
Delete
Deletes the specified security group.
rpc Delete (DeleteSecurityGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteSecurityGroupMetadata
Operation.response:google.protobuf.Empty
DeleteSecurityGroupRequest
Field | Description |
---|---|
security_group_id | string Required. ID of the security group to delete. To get a address ID make a SecurityGroup.List request. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteSecurityGroupMetadata
Field | Description |
---|---|
security_group_id | string ID of the SecurityGroup that is being deleted. |
Move
Moves security groups to another folder.
rpc Move (MoveSecurityGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:MoveSecurityGroupMetadata
Operation.response:SecurityGroup
MoveSecurityGroupRequest
Field | Description |
---|---|
security_group_id | string Required. ID of the security group to move. |
destination_folder_id | string Required. ID of the folder to move security group to. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
MoveSecurityGroupMetadata
Field | Description |
---|---|
security_group_id | string ID of the security group that is being moved. |
SecurityGroup
Field | Description |
---|---|
id | string ID of the security group. |
folder_id | string ID of the folder that the security group belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp in RFC3339 |
name | string Name of the security group. The name must be unique within the folder. Value must match the regular expression |[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])? . |
description | string Description of the security group. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
network_id | string ID of the network that the security group belongs to. |
status | enum Status Security group status.
|
rules[] | SecurityGroupRule List of the security group rules. |
default_for_network | bool Flag that indicates that the security group is the default for the network. |
SecurityGroupRule
Field | Description |
---|---|
id | string ID of the rule. |
description | string Description of the rule. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
direction | enum Direction Required. The direction of network traffic allowed by this rule.
|
ports | PortRange The range of ports that allow traffic to pass through. Null value means any. |
protocol_name | string Protocol name. Null value means any protocol. Values from IANA |
protocol_number | int64 Protocol number from IANA protocol numbers |
target | oneof: cidr_blocks , security_group_id or predefined_target |
cidr_blocks | CidrBlocks CIDR blocks to allow to recieve or send traffic. |
security_group_id | string ID of the security group to add rule to. |
predefined_target | string Predefined target. See security groups rules for more information. |
PortRange
Field | Description |
---|---|
from_port | int64 The lowest port in the range. Acceptable values are 0 to 65535, inclusive. |
to_port | int64 The highest port in the range. Acceptable values are 0 to 65535, inclusive. |
CidrBlocks
Field | Description |
---|---|
v4_cidr_blocks[] | string IPv4 CIDR blocks to allow traffic to. |
v6_cidr_blocks[] | string IPv6 CIDR blocks to allow traffic to. |
ListOperations
Lists operations for the specified security groups.
rpc ListOperations (ListSecurityGroupOperationsRequest) returns (ListSecurityGroupOperationsResponse)
ListSecurityGroupOperationsRequest
Field | Description |
---|---|
security_group_id | string Required. ID of the address to list operations for. To get a address ID make a SecurityGroup.List request. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListSecurityGroupOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. |
page_token | string Page token. To get the next page of results, set page_token to the ListSecurityGroupOperationsResponse.next_page_token returned by a previous list request. |
ListSecurityGroupOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified security group. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListSecurityGroupOperationsRequest.page_size, use next_page_token as the value for the ListSecurityGroupOperationsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty |