public sealed class BinaryAuthorization : IMessage<BinaryAuthorization>, IEquatable<BinaryAuthorization>, IDeepCloneable<BinaryAuthorization>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Run Admin v2 API class BinaryAuthorization.
[[["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."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eBinaryAuthorization\u003c/code\u003e class within the Google Cloud Run Admin v2 API for .NET.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBinaryAuthorization\u003c/code\u003e class allows configuration of settings for the Binary Authorization feature, enabling the use of a project's default policy or a specified policy.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eBinaryAuthorization\u003c/code\u003e is 2.13.0, with previous versions back to 1.0.0-beta02 also documented and available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBinaryAuthorization\u003c/code\u003e class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, for enhanced functionality.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of \u003ccode\u003eBinaryAuthorization\u003c/code\u003e include the ability to set a custom policy, indicate the use of a default policy, or to use a breakglass justification.\u003c/p\u003e\n"]]],[],null,["# Cloud Run Admin v2 API - Class BinaryAuthorization (2.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.16.0 (latest)](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.15.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.14.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.13.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.12.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.11.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.10.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.9.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.8.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.7.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.6.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.5.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.4.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.3.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.2.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.1.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Run.V2/2.0.0/Google.Cloud.Run.V2.BinaryAuthorization)\n- [1.0.0-beta02](/dotnet/docs/reference/Google.Cloud.Run.V2/1.0.0-beta02/Google.Cloud.Run.V2.BinaryAuthorization) \n\n public sealed class BinaryAuthorization : IMessage\u003cBinaryAuthorization\u003e, IEquatable\u003cBinaryAuthorization\u003e, IDeepCloneable\u003cBinaryAuthorization\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Run Admin v2 API class BinaryAuthorization.\n\nSettings for Binary Authorization feature. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e BinaryAuthorization \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BinaryAuthorization](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.BinaryAuthorization), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BinaryAuthorization](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.BinaryAuthorization), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BinaryAuthorization](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.BinaryAuthorization), [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.Run.V2](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Run.V2.dll\n\nConstructors\n------------\n\n### BinaryAuthorization()\n\n public BinaryAuthorization()\n\n### BinaryAuthorization(BinaryAuthorization)\n\n public BinaryAuthorization(BinaryAuthorization other)\n\nProperties\n----------\n\n### BinauthzMethodCase\n\n public BinaryAuthorization.BinauthzMethodOneofCase BinauthzMethodCase { get; }\n\n### BreakglassJustification\n\n public string BreakglassJustification { get; set; }\n\nOptional. If present, indicates to use Breakglass using this justification.\nIf use_default is False, then it must be empty.\nFor more information on breakglass, see\n\u003chttps://cloud.google.com/binary-authorization/docs/using-breakglass\u003e\n\n### HasPolicy\n\n public bool HasPolicy { get; }\n\nGets whether the \"policy\" field is set\n\n### HasUseDefault\n\n public bool HasUseDefault { get; }\n\nGets whether the \"use_default\" field is set\n\n### Policy\n\n public string Policy { get; set; }\n\nOptional. The path to a binary authorization policy.\nFormat: `projects/{project}/platforms/cloudRun/{policy-name}`\n\n### PolicyAsPolicyName\n\n public PolicyName PolicyAsPolicyName { get; set; }\n\n[PolicyName](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.PolicyName)-typed view over the [Policy](/dotnet/docs/reference/Google.Cloud.Run.V2/latest/Google.Cloud.Run.V2.BinaryAuthorization#Google_Cloud_Run_V2_BinaryAuthorization_Policy) resource name property.\n\n### UseDefault\n\n public bool UseDefault { get; set; }\n\nOptional. If True, indicates to use the default project's binary\nauthorization policy. If False, binary authorization will be disabled."]]