public sealed class BackendServiceCustomMetric : IMessage<BackendServiceCustomMetric>, IEquatable<BackendServiceCustomMetric>, IDeepCloneable<BackendServiceCustomMetric>, IBufferMessage, IMessage
Reference documentation and code samples for the Compute Engine v1 API class BackendServiceCustomMetric.
Custom Metrics are used for WEIGHTED_ROUND_ROBIN locality_lb_policy.
Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression a-z? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.
[[["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-03 UTC."],[[["\u003cp\u003eThe latest version available for \u003ccode\u003eBackendServiceCustomMetric\u003c/code\u003e is 3.6.0, but versions ranging from 1.0.0 to 3.5.0 are also accessible.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBackendServiceCustomMetric\u003c/code\u003e class is part of the Google.Cloud.Compute.V1 namespace within the Google.Cloud.Compute.V1.dll assembly, used within Compute Engine v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThis class includes properties like \u003ccode\u003eDryRun\u003c/code\u003e, \u003ccode\u003eHasDryRun\u003c/code\u003e, \u003ccode\u003eHasName\u003c/code\u003e, and \u003ccode\u003eName\u003c/code\u003e, providing functionality to check and set metric properties.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBackendServiceCustomMetric\u003c/code\u003e is designed for use with \u003ccode\u003eWEIGHTED_ROUND_ROBIN\u003c/code\u003e locality_lb_policy, supporting custom metrics for load balancing.\u003c/p\u003e\n"],["\u003cp\u003eThe name property is a string that must follow the regex [a-z][-_.a-z0-9]*[a-z0-9]? which must be 1-64 characters long.\u003c/p\u003e\n"]]],[],null,["# Compute Engine v1 API - Class BackendServiceCustomMetric (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.12.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.11.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.10.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.9.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.8.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.7.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.6.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.5.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.4.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.3.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.2.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.1.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.0.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.17.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.17.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.16.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.15.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.14.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.13.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.12.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.11.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.10.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.9.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.8.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.7.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.6.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.5.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.4.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.3.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.2.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.1.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.0.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.4.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.3.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.2.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.1.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.0.0/Google.Cloud.Compute.V1.BackendServiceCustomMetric) \n\n public sealed class BackendServiceCustomMetric : IMessage\u003cBackendServiceCustomMetric\u003e, IEquatable\u003cBackendServiceCustomMetric\u003e, IDeepCloneable\u003cBackendServiceCustomMetric\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Compute Engine v1 API class BackendServiceCustomMetric.\n\nCustom Metrics are used for WEIGHTED_ROUND_ROBIN locality_lb_policy. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e BackendServiceCustomMetric \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BackendServiceCustomMetric](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.BackendServiceCustomMetric), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BackendServiceCustomMetric](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.BackendServiceCustomMetric), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BackendServiceCustomMetric](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.BackendServiceCustomMetric), [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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Compute.V1](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Compute.V1.dll\n\nConstructors\n------------\n\n### BackendServiceCustomMetric()\n\n public BackendServiceCustomMetric()\n\n### BackendServiceCustomMetric(BackendServiceCustomMetric)\n\n public BackendServiceCustomMetric(BackendServiceCustomMetric other)\n\nProperties\n----------\n\n### DryRun\n\n public bool DryRun { get; set; }\n\nIf true, the metric data is not used for load balancing.\n\n### HasDryRun\n\n public bool HasDryRun { get; }\n\nGets whether the \"dry_run\" field is set\n\n### HasName\n\n public bool HasName { get; }\n\nGets whether the \"name\" field is set\n\n### Name\n\n public string Name { get; set; }\n\nName of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/[-_.a-z0-9]*[a-z0-9])? which means that the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED."]]