public sealed class UsageResourceAllowanceSpec : IMessage<UsageResourceAllowanceSpec>, IEquatable<UsageResourceAllowanceSpec>, IDeepCloneable<UsageResourceAllowanceSpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Batch v1alpha API class UsageResourceAllowanceSpec.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation is for the \u003ccode\u003eUsageResourceAllowanceSpec\u003c/code\u003e class within the Google Cloud Batch v1alpha API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUsageResourceAllowanceSpec\u003c/code\u003e class is designed to specify a resource allowance for usage, inheriting from \u003ccode\u003eobject\u003c/code\u003e and implementing interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains properties for setting the \u003ccode\u003eLimit\u003c/code\u003e of resource consumption and specifying the \u003ccode\u003eType\u003c/code\u003e of resource, which is currently restricted to "cpu-core-hours" for CPU usage.\u003c/p\u003e\n"],["\u003cp\u003eThe class has 2 constructors, one for instantiation and another for cloning.\u003c/p\u003e\n"],["\u003cp\u003eThe current latest version of the documentation is 1.0.0-alpha31, but it also contains info for 1.0.0-alpha30.\u003c/p\u003e\n"]]],[],null,["# Batch v1alpha API - Class UsageResourceAllowanceSpec (1.0.0-alpha31)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-alpha31 (latest)](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec)\n- [1.0.0-alpha30](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/1.0.0-alpha30/Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec) \n\n public sealed class UsageResourceAllowanceSpec : IMessage\u003cUsageResourceAllowanceSpec\u003e, IEquatable\u003cUsageResourceAllowanceSpec\u003e, IDeepCloneable\u003cUsageResourceAllowanceSpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Batch v1alpha API class UsageResourceAllowanceSpec.\n\nSpec of a usage ResourceAllowance. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e UsageResourceAllowanceSpec \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[UsageResourceAllowanceSpec](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UsageResourceAllowanceSpec](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[UsageResourceAllowanceSpec](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.UsageResourceAllowanceSpec), [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.Batch.V1Alpha](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha)\n\nAssembly\n--------\n\nGoogle.Cloud.Batch.V1Alpha.dll\n\nConstructors\n------------\n\n### UsageResourceAllowanceSpec()\n\n public UsageResourceAllowanceSpec()\n\n### UsageResourceAllowanceSpec(UsageResourceAllowanceSpec)\n\n public UsageResourceAllowanceSpec(UsageResourceAllowanceSpec other)\n\nProperties\n----------\n\n### Limit\n\n public UsageResourceAllowanceSpec.Types.Limit Limit { get; set; }\n\nRequired. Threshold of a UsageResourceAllowance limiting how many resources\ncan be consumed for each type.\n\n### Type\n\n public string Type { get; set; }\n\nRequired. Spec type is unique for each usage ResourceAllowance.\nBatch now only supports type as \"cpu-core-hours\" for CPU usage consumption\ntracking."]]