Information about the current execution platform.
Supported execution platforms are Google App Engine (GAE), Google Container Engine (GKE), and Google Compute Engine (GCE).
[[["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 page details the \u003ccode\u003ePlatform\u003c/code\u003e class within the \u003ccode\u003eGoogle.Api.Gax\u003c/code\u003e namespace, which provides information about the current execution environment.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePlatform\u003c/code\u003e class can identify if the code is running on Google App Engine (GAE), Google Container Engine (GKE), Google Compute Engine (GCE), or Google Cloud Run, with the ability to return null if it does not match any of these.\u003c/p\u003e\n"],["\u003cp\u003eIt provides different constructors to include specific platform details, with one constructor to simply have an Unknown type.\u003c/p\u003e\n"],["\u003cp\u003eThe class also includes methods like \u003ccode\u003eInstance()\u003c/code\u003e and \u003ccode\u003eInstanceAsync()\u003c/code\u003e to retrieve execution platform details, with an asynchronous option for retrieving the platform information.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePlatform\u003c/code\u003e class offers properties for the Project ID and the Type of the current environment, as well as properties that provide the details of the specific platform if applicable.\u003c/p\u003e\n"]]],[],null,["# Class Platform (4.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.10.0 (latest)](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Platform)\n- [4.8.0](/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.Platform)\n- [4.4.0](/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.Platform)\n- [4.3.1](/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.Platform)\n- [4.2.0](/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.Platform)\n- [4.0.0](/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.Platform)\n- [3.2.0](/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.Platform) \n\n public sealed class Platform\n\nInformation about the current execution platform.\nSupported execution platforms are Google App Engine (GAE), Google Container Engine (GKE), and Google Compute Engine (GCE). \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Platform \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### Platform()\n\n public Platform()\n\nConstruct with no details.\nThis leads to a platform [Type](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Platform#Google_Api_Gax_Platform_Type) of [Unknown](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PlatformType#Google_Api_Gax_PlatformType_Unknown).\n\n### Platform(CloudRunPlatformDetails)\n\n public Platform(CloudRunPlatformDetails cloudRunDetails)\n\nConstruct with details of Google Cloud Run.\n\n### Platform(GaePlatformDetails)\n\n public Platform(GaePlatformDetails gaeDetails)\n\nConstruct with details of Google App Engine.\n\n### Platform(GcePlatformDetails)\n\n public Platform(GcePlatformDetails gceDetails)\n\nConstruct with details of Google Compute Engine.\n\n### Platform(GkePlatformDetails)\n\n public Platform(GkePlatformDetails gkeDetails)\n\nConstruct with details of Google Container (Kubernetes) Engine.\n\nProperties\n----------\n\n### CloudRunDetails\n\n public CloudRunPlatformDetails CloudRunDetails { get; }\n\nGoogle Cloud Run platform details.\n`null` if not executing on Google Cloud Run.\n\n### GaeDetails\n\n public GaePlatformDetails GaeDetails { get; }\n\nGoogle App Engine (GAE) platform details.\n`null` if not executing on GAE.\n\n### GceDetails\n\n public GcePlatformDetails GceDetails { get; }\n\nGoogle Compute Engine (GCE) platform details.\n`null` if not executing on GCE.\n\n### GkeDetails\n\n public GkePlatformDetails GkeDetails { get; }\n\nGoogle Container (Kubernetes) Engine (GKE) platform details.\n`null` if not executing on GKE.\n\n### ProjectId\n\n public string ProjectId { get; }\n\nThe current Project ID.\n`null` if the Project ID cannot be determined on the current execution platform.\n\n### Type\n\n public PlatformType Type { get; }\n\nThe current execution platform.\n\nMethods\n-------\n\n### Instance()\n\n public static Platform Instance()\n\nGet execution platform information. This may block briefly while network operations are in progress.\n\n### InstanceAsync()\n\n public static Task\u003cPlatform\u003e InstanceAsync()\n\nAsyncrhonously get execution platform information.\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)"]]