Class Platform (4.3.1)

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

GoogleGoogle.ApiGax

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
NameDescription
cloudRunDetailsCloudRunPlatformDetails

Details of Google Cloud Run.

Platform(GaePlatformDetails)

public Platform(GaePlatformDetails gaeDetails)

Construct with details of Google App Engine.

Parameter
NameDescription
gaeDetailsGaePlatformDetails

Details of Google App Engine.

Platform(GcePlatformDetails)

public Platform(GcePlatformDetails gceDetails)

Construct with details of Google Compute Engine.

Parameter
NameDescription
gceDetailsGcePlatformDetails

Details of Google Compute Engine.

Platform(GkePlatformDetails)

public Platform(GkePlatformDetails gkeDetails)

Construct with details of Google Container (Kubernetes) Engine.

Parameter
NameDescription
gkeDetailsGkePlatformDetails

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
TypeDescription
CloudRunPlatformDetails

GaeDetails

public GaePlatformDetails GaeDetails { get; }

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

Property Value
TypeDescription
GaePlatformDetails

GceDetails

public GcePlatformDetails GceDetails { get; }

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

Property Value
TypeDescription
GcePlatformDetails

GkeDetails

public GkePlatformDetails GkeDetails { get; }

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

Property Value
TypeDescription
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
TypeDescription
string

Type

public PlatformType Type { get; }

The current execution platform.

Property Value
TypeDescription
PlatformType

Methods

Instance()

public static Platform Instance()

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

Returns
TypeDescription
Platform

Execution platform information.

InstanceAsync()

public static Task<Platform> InstanceAsync()

Asyncrhonously get execution platform information.

Returns
TypeDescription
TaskPlatform

A task containing the execution platform information.

ToString()

public override string ToString()
Returns
TypeDescription
string
Overrides