Class Platform (4.4.0)

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).

Inheritance

object > Platform

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

Constructors

Platform()

public Platform()

Construct with no details. This leads to a platform Type of Unknown.

Platform(CloudRunPlatformDetails)

public Platform(CloudRunPlatformDetails cloudRunDetails)

Construct with details of Google Cloud Run.

Parameter
Name Description
cloudRunDetails CloudRunPlatformDetails

Details of Google Cloud Run.

Platform(GaePlatformDetails)

public Platform(GaePlatformDetails gaeDetails)

Construct with details of Google App Engine.

Parameter
Name Description
gaeDetails GaePlatformDetails

Details of Google App Engine.

Platform(GcePlatformDetails)

public Platform(GcePlatformDetails gceDetails)

Construct with details of Google Compute Engine.

Parameter
Name Description
gceDetails GcePlatformDetails

Details of Google Compute Engine.

Platform(GkePlatformDetails)

public Platform(GkePlatformDetails gkeDetails)

Construct with details of Google Container (Kubernetes) Engine.

Parameter
Name Description
gkeDetails GkePlatformDetails

Details of Google Container (Kubernetes) Engine.

Properties

CloudRunDetails

public CloudRunPlatformDetails CloudRunDetails { get; }

Google Cloud Run platform details. null if not executing on Google Cloud Run.

Property Value
Type Description
CloudRunPlatformDetails

GaeDetails

public GaePlatformDetails GaeDetails { get; }

Google App Engine (GAE) platform details. null if not executing on GAE.

Property Value
Type Description
GaePlatformDetails

GceDetails

public GcePlatformDetails GceDetails { get; }

Google Compute Engine (GCE) platform details. null if not executing on GCE.

Property Value
Type Description
GcePlatformDetails

GkeDetails

public GkePlatformDetails GkeDetails { get; }

Google Container (Kubernetes) Engine (GKE) platform details. null if not executing on GKE.

Property Value
Type Description
GkePlatformDetails

ProjectId

public string ProjectId { get; }

The current Project ID. null if the Project ID cannot be determined on the current execution platform.

Property Value
Type Description
string

Type

public PlatformType Type { get; }

The current execution platform.

Property Value
Type Description
PlatformType

Methods

Instance()

public static Platform Instance()

Get execution platform information. This may block briefly while network operations are in progress.

Returns
Type Description
Platform

Execution platform information.

InstanceAsync()

public static Task<Platform> InstanceAsync()

Asyncrhonously get execution platform information.

Returns
Type Description
TaskPlatform

A task containing the execution platform information.

ToString()

public override string ToString()
Returns
Type Description
string
Overrides