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
Inherited Members
Namespace: Google.Api.Gax
Assembly: Google.Api.Gax.dll
Syntax
public sealed class Platform
Constructors
Platform()
Declaration
public Platform()
Platform(CloudRunPlatformDetails)
Construct with details of Google Cloud Run.
Declaration
public Platform(CloudRunPlatformDetails cloudRunDetails)
Parameters
Type | Name | Description |
---|---|---|
CloudRunPlatformDetails | cloudRunDetails | Details of Google Cloud Run. |
Platform(GaePlatformDetails)
Construct with details of Google App Engine.
Declaration
public Platform(GaePlatformDetails gaeDetails)
Parameters
Type | Name | Description |
---|---|---|
GaePlatformDetails | gaeDetails | Details of Google App Engine. |
Platform(GcePlatformDetails)
Construct with details of Google Compute Engine.
Declaration
public Platform(GcePlatformDetails gceDetails)
Parameters
Type | Name | Description |
---|---|---|
GcePlatformDetails | gceDetails | Details of Google Compute Engine. |
Platform(GkePlatformDetails)
Construct with details of Google Container (Kubernetes) Engine.
Declaration
public Platform(GkePlatformDetails gkeDetails)
Parameters
Type | Name | Description |
---|---|---|
GkePlatformDetails | gkeDetails | Details of Google Container (Kubernetes) Engine. |
Properties
CloudRunDetails
Google Cloud Run platform details.
null
if not executing on Google Cloud Run.
Declaration
public CloudRunPlatformDetails CloudRunDetails { get; }
Property Value
Type | Description |
---|---|
CloudRunPlatformDetails |
GaeDetails
Google App Engine (GAE) platform details.
null
if not executing on GAE.
Declaration
public GaePlatformDetails GaeDetails { get; }
Property Value
Type | Description |
---|---|
GaePlatformDetails |
GceDetails
Google Compute Engine (GCE) platform details.
null
if not executing on GCE.
Declaration
public GcePlatformDetails GceDetails { get; }
Property Value
Type | Description |
---|---|
GcePlatformDetails |
GkeDetails
Google Container (Kubernetes) Engine (GKE) platform details.
null
if not executing on GKE.
Declaration
public GkePlatformDetails GkeDetails { get; }
Property Value
Type | Description |
---|---|
GkePlatformDetails |
ProjectId
The current Project ID.
null
if the Project ID cannot be determined on the current execution platform.
Declaration
public string ProjectId { get; }
Property Value
Type | Description |
---|---|
System.String |
Type
The current execution platform.
Declaration
public PlatformType Type { get; }
Property Value
Type | Description |
---|---|
PlatformType |
Methods
Instance()
Get execution platform information. This may block briefly while network operations are in progress.
Declaration
public static Platform Instance()
Returns
Type | Description |
---|---|
Platform | Execution platform information. |
InstanceAsync()
Asyncrhonously get execution platform information.
Declaration
public static Task<Platform> InstanceAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Platform> | A task containing the execution platform information. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |