Network Load Balancer API, REST: NetworkLoadBalancer.update
Updates the specified network load balancer.
HTTP request
PATCH https://load-balancer.api.cloud.yandex.net/load-balancer/v1/networkLoadBalancers/{networkLoadBalancerId}
Path parameters
Parameter | Description |
---|---|
networkLoadBalancerId | Required. ID of the network load balancer to update. To get the network load balancer ID, use a list request. The maximum string length in characters is 50. |
Body parameters
{
"updateMask": "string",
"name": "string",
"description": "string",
"labels": "object",
"listenerSpecs": [
{
"name": "string",
"port": "string",
"protocol": "string",
"targetPort": "string",
// `listenerSpecs[]` includes only one of the fields `externalAddressSpec`, `internalAddressSpec`
"externalAddressSpec": {
"address": "string",
"ipVersion": "string"
},
"internalAddressSpec": {
"address": "string",
"subnetId": "string",
"ipVersion": "string"
},
// end of the list of possible fields`listenerSpecs[]`
}
],
"attachedTargetGroups": [
{
"targetGroupId": "string",
"healthChecks": [
{
"name": "string",
"interval": "string",
"timeout": "string",
"unhealthyThreshold": "string",
"healthyThreshold": "string",
// `attachedTargetGroups[].healthChecks[]` includes only one of the fields `tcpOptions`, `httpOptions`
"tcpOptions": {
"port": "string"
},
"httpOptions": {
"port": "string",
"path": "string"
},
// end of the list of possible fields`attachedTargetGroups[].healthChecks[]`
}
]
}
],
"deletionProtection": true
}
Field | Description |
---|---|
updateMask | string Field mask that specifies which fields of the NetworkLoadBalancer resource are going to be updated. A comma-separated names off ALL fields to be updated. Only the specified fields will be changed. The others will be left untouched. If the field is specified in If |
name | string Name of the network load balancer. The name must be unique within the folder. Value must match the regular expression |
description | string Description of the network load balancer. The maximum string length in characters is 256. |
labels | object Resource labels as The existing set of No more than 64 per resource. The string length in characters for each key must be 1-63. Each key must match the regular expression |
listenerSpecs[] | object A list of listeners and their specs for the network load balancer. The maximum number of elements is 1000. |
listenerSpecs[]. name |
string Required. Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long. Value must match the regular expression |
listenerSpecs[]. port |
string (int64) Port for incoming traffic. Acceptable values are 1 to 65535, inclusive. |
listenerSpecs[]. protocol |
string Required. Protocol for incoming traffic. |
listenerSpecs[]. targetPort |
string (int64) Port of a target. Acceptable values are 1 to 65535, inclusive. |
listenerSpecs[]. externalAddressSpec |
object External IP address specification. listenerSpecs[] includes only one of the fields externalAddressSpec , internalAddressSpec |
listenerSpecs[]. externalAddressSpec. address |
string Public IP address for a listener. If you provide a static public IP address for the update method, it will replace the existing listener address. |
listenerSpecs[]. externalAddressSpec. ipVersion |
string IP version. IP version of the addresses that the load balancer works with. Only IPv4 is currently available.
|
listenerSpecs[]. internalAddressSpec |
object Internal IP address specification. listenerSpecs[] includes only one of the fields externalAddressSpec , internalAddressSpec |
listenerSpecs[]. internalAddressSpec. address |
string Internal IP address for a listener. |
listenerSpecs[]. internalAddressSpec. subnetId |
string ID of the subnet. |
listenerSpecs[]. internalAddressSpec. ipVersion |
string IP version. IP version of the addresses that the load balancer works with. Only IPv4 is currently available.
|
attachedTargetGroups[] | object A list of attached target groups for the network load balancer. The maximum number of elements is 1000. |
attachedTargetGroups[]. targetGroupId |
string Required. ID of the target group. The maximum string length in characters is 50. |
attachedTargetGroups[]. healthChecks[] |
object Required. A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. Must contain exactly 1 element. |
attachedTargetGroups[]. healthChecks[]. name |
string Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |
attachedTargetGroups[]. healthChecks[]. interval |
string The interval between health checks. The default is 2 seconds. |
attachedTargetGroups[]. healthChecks[]. timeout |
string Timeout for a target to return a response for the health check. The default is 1 second. |
attachedTargetGroups[]. healthChecks[]. unhealthyThreshold |
string (int64) Number of failed health checks before changing the status to Acceptable values are 2 to 10, inclusive. |
attachedTargetGroups[]. healthChecks[]. healthyThreshold |
string (int64) Number of successful health checks required in order to set the Acceptable values are 2 to 10, inclusive. |
attachedTargetGroups[]. healthChecks[]. tcpOptions |
object Options for TCP health check. attachedTargetGroups[].healthChecks[] includes only one of the fields tcpOptions , httpOptions |
attachedTargetGroups[]. healthChecks[]. tcpOptions. port |
string (int64) Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive. |
attachedTargetGroups[]. healthChecks[]. httpOptions |
object Options for HTTP health check. attachedTargetGroups[].healthChecks[] includes only one of the fields tcpOptions , httpOptions |
attachedTargetGroups[]. healthChecks[]. httpOptions. port |
string (int64) Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive. |
attachedTargetGroups[]. healthChecks[]. httpOptions. path |
string URL path to set for health checking requests for every target in the target group. For example |
deletionProtection | boolean (boolean) Specifies if network load balancer protected from deletion. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": true,
"metadata": "object",
// includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object",
// 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 | string (date-time) Creation timestamp. 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). |
createdBy | string ID of the user or service account who initiated the operation. |
modifiedAt | string (date-time) The time when the Operation resource was last modified. 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). |
done | boolean (boolean) If the value is |
metadata | object 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. |
error | object The error result of the operation in case of failure or cancellation. includes only one of the fields error , response |
error. code |
integer (int32) Error code. An enum value of google.rpc.Code. |
error. message |
string An error message. |
error. details[] |
object A list of messages that carry the error details. |
response | object includes only one of the fields error , response 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. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any. |