public sealed class Platform
Information about the current execution platform. Supported execution platforms are Google App Engine (GAE), Google Container Engine (GKE), and Google Compute Engine (GCE).
Namespace
Google.Api.GaxAssembly
Google.Api.Gax.dll
Constructors
Platform()
public Platform()
Platform(CloudRunPlatformDetails)
public Platform(CloudRunPlatformDetails cloudRunDetails)
Construct with details of Google Cloud Run.
Platform(GaePlatformDetails)
public Platform(GaePlatformDetails gaeDetails)
Construct with details of Google App Engine.
Platform(GcePlatformDetails)
public Platform(GcePlatformDetails gceDetails)
Construct with details of Google Compute Engine.
Platform(GkePlatformDetails)
public Platform(GkePlatformDetails gkeDetails)
Construct with details of Google Container (Kubernetes) Engine.
gkeDetails
Properties
CloudRunDetails
public CloudRunPlatformDetails CloudRunDetails { get; }
Google Cloud Run platform details. null
if not executing on Google Cloud Run.
GaeDetails
public GaePlatformDetails GaeDetails { get; }
Google App Engine (GAE) platform details. null
if not executing on GAE.
GceDetails
public GcePlatformDetails GceDetails { get; }
Google Compute Engine (GCE) platform details. null
if not executing on GCE.
GkeDetails
public GkePlatformDetails GkeDetails { get; }
Google Container (Kubernetes) Engine (GKE) platform details. null
if not executing on GKE.
ProjectId
public string ProjectId { get; }
The current Project ID. null
if the Project ID cannot be determined on the current execution platform.
Type
public PlatformType Type { get; }
The current execution platform.
Methods
Instance()
public static Platform Instance()
Get execution platform information. This may block briefly while network operations are in progress.
InstanceAsync()
public static Task<Platform> InstanceAsync()
Asyncrhonously get execution platform information.
ToString()
public override string ToString()