Class CloudRunPlatformDetails (4.2.0)

public sealed class CloudRunPlatformDetails

Google Cloud Run details.

Inheritance

Object > CloudRunPlatformDetails

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

Constructors

CloudRunPlatformDetails(String, String, String, String, String, String)

public CloudRunPlatformDetails(string metadataJson, string projectId, string zone, string serviceName, string revisionName, string configurationName)

Constructs details of a Google Cloud Run service revision.

Parameters
NameDescription
metadataJsonString

JSON metadata, normally retrieved from the GCE metadata server. Must not be null.

projectIdString

The project ID. Must not be null.

zoneString

The zone in which the service code is running. Must not be null.

serviceNameString

The name of the service. Must not be null.

revisionNameString

The name of the revision. Must not be null.

configurationNameString

The name of the configuration. Must not be null.

Properties

ConfigurationName

public string ConfigurationName { get; }

The name of the Cloud Run configuration being run. This is never null.

Property Value
TypeDescription
String

MetadataJson

public string MetadataJson { get; }

The full JSON string retrieved from the metadata server. This is never null.

Property Value
TypeDescription
String

ProjectId

public string ProjectId { get; }

The Project ID under which this service is running. This is never null.

Property Value
TypeDescription
String

Region

public string Region { get; }

The region part of the zone. For example, a zone of "us-central1-1" has a region of "us-central1".

Property Value
TypeDescription
String

RevisionName

public string RevisionName { get; }

The name of the Cloud Run revision being run. This is never null.

Property Value
TypeDescription
String

ServiceName

public string ServiceName { get; }

The name of the Cloud Run service being run. This is never null.

Property Value
TypeDescription
String

Zone

public string Zone { get; }

The zone of the service, e.g. "us-central1-1". This is never null.

Property Value
TypeDescription
String

Methods

ToString()

public override string ToString()
Returns
TypeDescription
String
Overrides

TryLoad(String)

public static CloudRunPlatformDetails TryLoad(string metadataJson)

Builds a CloudRunPlatformDetails from the given metadata and Cloud Run environment variables. The metadata is normally retrieved from the GCE metadata server.

Parameter
NameDescription
metadataJsonString

JSON metadata, normally retrieved from the GCE metadata server. Must not be null.

Returns
TypeDescription
CloudRunPlatformDetails

A populated CloudRunPlatformDetails if the metadata represents and GCE instance; null otherwise.