public static CloudRunPlatformDetails TryLoad(string metadataJson)
Builds a CloudRunPlatformDetails from the given metadata
and Cloud Run environment variables.
The metadata is normally retrieved from the GCE metadata server.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCloudRunPlatformDetails\u003c/code\u003e class provides details about a Google Cloud Run service, including its project ID, zone, service name, revision name, and configuration name.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers a constructor, \u003ccode\u003eCloudRunPlatformDetails(string, string, string, string, string, string)\u003c/code\u003e, to create an instance with metadata and Cloud Run service revision details.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTryLoad(string)\u003c/code\u003e is a static method that attempts to construct a \u003ccode\u003eCloudRunPlatformDetails\u003c/code\u003e object from metadata, returning a populated object if successful or null if the metadata does not represent a GCE instance.\u003c/p\u003e\n"],["\u003cp\u003eProperties such as \u003ccode\u003eMetadataJson\u003c/code\u003e, \u003ccode\u003eProjectId\u003c/code\u003e, \u003ccode\u003eRegion\u003c/code\u003e, \u003ccode\u003eRevisionName\u003c/code\u003e, \u003ccode\u003eServiceName\u003c/code\u003e, and \u003ccode\u003eZone\u003c/code\u003e are available to access specific details of the Cloud Run environment, and none of them can be null.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits members from \u003ccode\u003eobject\u003c/code\u003e, such as \u003ccode\u003eEquals\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, and \u003ccode\u003eReferenceEquals\u003c/code\u003e, and overrides the \u003ccode\u003eToString()\u003c/code\u003e method to provide a string representation of the object.\u003c/p\u003e\n"]]],[],null,["# Class CloudRunPlatformDetails (4.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.10.0 (latest)](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.CloudRunPlatformDetails)\n- [4.8.0](/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.CloudRunPlatformDetails)\n- [4.4.0](/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.CloudRunPlatformDetails)\n- [4.3.1](/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.CloudRunPlatformDetails)\n- [4.2.0](/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.CloudRunPlatformDetails)\n- [4.0.0](/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.CloudRunPlatformDetails)\n- [3.2.0](/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.CloudRunPlatformDetails) \n\n public sealed class CloudRunPlatformDetails\n\nGoogle Cloud Run details. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CloudRunPlatformDetails \n\nInherited Members\n-----------------\n\n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \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.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Api.Gax](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax)\n\nAssembly\n--------\n\nGoogle.Api.Gax.dll\n\nConstructors\n------------\n\n### CloudRunPlatformDetails(string, string, string, string, string, string)\n\n public CloudRunPlatformDetails(string metadataJson, string projectId, string zone, string serviceName, string revisionName, string configurationName)\n\nConstructs details of a Google Cloud Run service revision.\n\nProperties\n----------\n\n### ConfigurationName\n\n public string ConfigurationName { get; }\n\nThe name of the Cloud Run configuration being run. This is never null.\n\n### MetadataJson\n\n public string MetadataJson { get; }\n\nThe full JSON string retrieved from the metadata server. This is never null.\n\n### ProjectId\n\n public string ProjectId { get; }\n\nThe Project ID under which this service is running. This is never null.\n\n### Region\n\n public string Region { get; }\n\nThe region part of the zone. For example, a zone of \"us-central1-1\" has a region\nof \"us-central1\".\n\n### RevisionName\n\n public string RevisionName { get; }\n\nThe name of the Cloud Run revision being run. This is never null.\n\n### ServiceName\n\n public string ServiceName { get; }\n\nThe name of the Cloud Run service being run. This is never null.\n\n### Zone\n\n public string Zone { get; }\n\nThe zone of the service, e.g. \"us-central1-1\". This is never null.\n\nMethods\n-------\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### TryLoad(string)\n\n public static CloudRunPlatformDetails TryLoad(string metadataJson)\n\nBuilds a [CloudRunPlatformDetails](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.CloudRunPlatformDetails) from the given metadata\nand Cloud Run environment variables.\nThe metadata is normally retrieved from the GCE metadata server."]]