Show / Hide Table of Contents

Class CloudRunPlatformDetails

Google Cloud Run details.

Inheritance
System.Object
CloudRunPlatformDetails
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax
Assembly: Google.Api.Gax.dll
Syntax
public sealed class CloudRunPlatformDetails

Constructors

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

Constructs details of a Google Cloud Run service revision.

Declaration
public CloudRunPlatformDetails(string metadataJson, string projectId, string zone, string serviceName, string revisionName, string configurationName)
Parameters
Type Name Description
System.String metadataJson

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

System.String projectId

The project ID. Must not be null.

System.String zone

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

System.String serviceName

The name of the service. Must not be null.

System.String revisionName

The name of the revision. Must not be null.

System.String configurationName

The name of the configuration. Must not be null.

Properties

ConfigurationName

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

Declaration
public string ConfigurationName { get; }
Property Value
Type Description
System.String

MetadataJson

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

Declaration
public string MetadataJson { get; }
Property Value
Type Description
System.String

ProjectId

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

Declaration
public string ProjectId { get; }
Property Value
Type Description
System.String

Region

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

Declaration
public string Region { get; }
Property Value
Type Description
System.String

RevisionName

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

Declaration
public string RevisionName { get; }
Property Value
Type Description
System.String

ServiceName

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

Declaration
public string ServiceName { get; }
Property Value
Type Description
System.String

Zone

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

Declaration
public string Zone { get; }
Property Value
Type Description
System.String

Methods

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

TryLoad(String)

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

Declaration
public static CloudRunPlatformDetails TryLoad(string metadataJson)
Parameters
Type Name Description
System.String metadataJson

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.

Back to top