# Google Cloud Logging v2 API - Class UpdateLogMetricRequest (4.5.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [4.5.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [4.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.4.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [4.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.3.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [4.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.2.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [4.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.1.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [4.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/4.0.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [3.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/3.6.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [3.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/3.5.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/3.4.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/3.3.0/Google.Cloud.Logging.V2.UpdateLogMetricRequest)

    public sealed class UpdateLogMetricRequest : IMessage<UpdateLogMetricRequest>, IEquatable<UpdateLogMetricRequest>, IDeepCloneable<UpdateLogMetricRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Logging v2 API class UpdateLogMetricRequest.

The parameters to UpdateLogMetric.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> UpdateLogMetricRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[UpdateLogMetricRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.UpdateLogMetricRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UpdateLogMetricRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.UpdateLogMetricRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[UpdateLogMetricRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.UpdateLogMetricRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Logging.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2)

## Assembly

Google.Cloud.Logging.V2.dll

## Constructors

### UpdateLogMetricRequest()

    public UpdateLogMetricRequest()

### UpdateLogMetricRequest(UpdateLogMetricRequest)

    public UpdateLogMetricRequest(UpdateLogMetricRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.UpdateLogMetricRequest` |

## Properties

### Metric

    public LogMetric Metric { get; set; }

Required. The updated metric.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.LogMetric` |   |

### MetricName

    public string MetricName { get; set; }

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's
`name` field must be the same as `[METRIC_ID]` If the metric
does not exist in `[PROJECT_ID]`, then a new metric is created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### MetricNameAsLogMetricName

    public LogMetricName MetricNameAsLogMetricName { get; set; }

[LogMetricName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.LogMetricName)-typed view over the [MetricName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.UpdateLogMetricRequest#Google_Cloud_Logging_V2_UpdateLogMetricRequest_MetricName) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.LogMetricName` |   |