Virtual Private Cloud API, gRPC: SecurityGroupService.UpdateRule
Updates the specified rule.
gRPC request
rpc UpdateRule (UpdateSecurityGroupRuleRequest) returns (operation.Operation)
UpdateSecurityGroupRuleRequest
{
"securityGroupId": "string",
"ruleId": "string",
"updateMask": "google.protobuf.FieldMask",
"description": "string",
"labels": "string"
}
Field |
Description |
securityGroupId |
string Required field. ID of the SecurityGroup to update rule in. |
ruleId |
string Required field. ID of the rule to update. |
updateMask |
Field mask that specifies which attributes of the Address should be updated. |
description |
string New description of the rule. |
labels |
string Rule labels as Existing set of labels is completely replaced by the provided set, so if you just want
|
operation.Operation
{
"id": "string",
"description": "string",
"createdAt": "google.protobuf.Timestamp",
"createdBy": "string",
"modifiedAt": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"securityGroupId": "string",
"ruleId": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"id": "string",
"description": "string",
"labels": "string",
"direction": "Direction",
"ports": {
"fromPort": "int64",
"toPort": "int64"
},
"protocolName": "string",
"protocolNumber": "int64",
// 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
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
Creation timestamp. |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
UpdateSecurityGroupRuleMetadata Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
UpdateSecurityGroupRuleMetadata
Field |
Description |
securityGroupId |
string ID of the SecurityGroup that is being updated with new rules. |
ruleId |
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 |
string Resource labels as |
direction |
enum Direction Required field. The direction of network traffic allowed by this rule.
|
ports |
The range of ports that allow traffic to pass through. Null value means any. |
protocolName |
string Protocol name. Null value means any protocol. |
protocolNumber |
int64 Protocol number from IANA protocol numbers |
cidrBlocks |
CIDR blocks to allow to recieve or send traffic. Includes only one of the fields |
securityGroupId |
string ID of the security group to add rule to. Includes only one of the fields |
predefinedTarget |
string Predefined target. See security groups rules for more information. Includes only one of the fields |
PortRange
Field |
Description |
fromPort |
int64 The lowest port in the range. |
toPort |
int64 The highest port in the range. |
CidrBlocks
Field |
Description |
v4CidrBlocks[] |
string IPv4 CIDR blocks to allow traffic to. |
v6CidrBlocks[] |
string IPv6 CIDR blocks to allow traffic to. |