Reference documentation and code samples for the Stackdriver Logging V2 Client class UpdateLogMetricRequest.
The parameters to UpdateLogMetric.
Generated from protobuf messagegoogle.logging.v2.UpdateLogMetricRequest
Namespace
Google \ Cloud \ Logging \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ metric_name
string
Required. The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it'snamefield must be the same as[METRIC_ID]If the metric does not exist in[PROJECT_ID], then a new metric is created.
Required. The resource name of the metric to update:
"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
The updated metric must be provided in the request and it'snamefield must be the same as[METRIC_ID]If the metric
does not exist in[PROJECT_ID], then a new metric is created.
Returns
Type
Description
string
setMetricName
Required. The resource name of the metric to update:
"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
The updated metric must be provided in the request and it'snamefield must be the same as[METRIC_ID]If the metric
does not exist in[PROJECT_ID], then a new metric is created.
Required. The resource name of the metric to update:
"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
The updated metric must be provided in the request and it'snamefield must be the same as[METRIC_ID]If the metric
does not exist in[PROJECT_ID], then a new metric is created. Please seeMetricsServiceV2Client::logMetricName()for help formatting this field.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Stackdriver Logging V2 Client - Class UpdateLogMetricRequest (1.32.3)\n\nVersion latestkeyboard_arrow_down\n\n- [1.32.3 (latest)](/php/docs/reference/cloud-logging/latest/V2.UpdateLogMetricRequest)\n- [1.32.2](/php/docs/reference/cloud-logging/1.32.2/V2.UpdateLogMetricRequest)\n- [1.31.3](/php/docs/reference/cloud-logging/1.31.3/V2.UpdateLogMetricRequest)\n- [1.30.3](/php/docs/reference/cloud-logging/1.30.3/V2.UpdateLogMetricRequest)\n- [1.29.0](/php/docs/reference/cloud-logging/1.29.0/V2.UpdateLogMetricRequest)\n- [1.28.5](/php/docs/reference/cloud-logging/1.28.5/V2.UpdateLogMetricRequest)\n- [1.27.1](/php/docs/reference/cloud-logging/1.27.1/V2.UpdateLogMetricRequest)\n- [1.26.0](/php/docs/reference/cloud-logging/1.26.0/V2.UpdateLogMetricRequest)\n- [1.25.5](/php/docs/reference/cloud-logging/1.25.5/V2.UpdateLogMetricRequest)\n- [1.24.10](/php/docs/reference/cloud-logging/1.24.10/V2.UpdateLogMetricRequest) \nReference documentation and code samples for the Stackdriver Logging V2 Client class UpdateLogMetricRequest.\n\nThe parameters to UpdateLogMetric.\n\nGenerated from protobuf message `google.logging.v2.UpdateLogMetricRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Logging \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMetricName\n\nRequired. The resource name of the metric to update:\n\"projects/\\[PROJECT_ID\\]/metrics/\\[METRIC_ID\\]\"\nThe updated metric must be provided in the request and it's\n`name` field must be the same as `[METRIC_ID]` If the metric\ndoes not exist in `[PROJECT_ID]`, then a new metric is created.\n\n### setMetricName\n\nRequired. The resource name of the metric to update:\n\"projects/\\[PROJECT_ID\\]/metrics/\\[METRIC_ID\\]\"\nThe updated metric must be provided in the request and it's\n`name` field must be the same as `[METRIC_ID]` If the metric\ndoes not exist in `[PROJECT_ID]`, then a new metric is created.\n\n### getMetric\n\nRequired. The updated metric.\n\n### hasMetric\n\n### clearMetric\n\n### setMetric\n\nRequired. The updated metric.\n\n### static::build"]]