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

Google 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

GaeDetails

 public GaePlatformDetails GaeDetails { get; } 

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

Property Value
Type
Description

GceDetails

 public GcePlatformDetails GceDetails { get; } 

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

Property Value
Type
Description

GkeDetails

 public GkePlatformDetails GkeDetails { get; } 

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

Property Value
Type
Description

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

Type

 public PlatformType Type { get; } 

The current execution platform.

Property Value
Type
Description

Methods

Instance()

 public static Platform Instance() 

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

Returns
Type
Description

Execution platform information.

InstanceAsync()

 public static Task<Platform> InstanceAsync() 

Asyncrhonously get execution platform information.

Returns
Type
Description

A task containing the execution platform information.

ToString()

 public override string ToString() 
Returns
Type
Description
Overrides
Create a Mobile Website
View Site in Mobile | Classic
Share by: