Class CloudRunPlatformDetails (4.4.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
Name Description
metadataJson string

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

projectId string

The project ID. Must not be null.

zone string

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

serviceName string

The name of the service. Must not be null.

revisionName string

The name of the revision. Must not be null.

configurationName string

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
Type Description
string

MetadataJson

public string MetadataJson { get; }

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

Property Value
Type Description
string

ProjectId

public string ProjectId { get; }

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

Property Value
Type Description
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
Type Description
string

RevisionName

public string RevisionName { get; }

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

Property Value
Type Description
string

ServiceName

public string ServiceName { get; }

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

Property Value
Type Description
string

Zone

public string Zone { get; }

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

Property Value
Type Description
string

Methods

ToString()

public override string ToString()
Returns
Type Description
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
Name Description
metadataJson string

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

Returns
Type Description
CloudRunPlatformDetails

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