Class CloudRunPlatformDetails (4.3.1)

public sealed class CloudRunPlatformDetails

Google Cloud Run details.

Inheritance

object > CloudRunPlatformDetails

Namespace

GoogleGoogle.ApiGax

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.