public sealed class CloudRunPlatformDetails
Google Cloud Run details.
Namespace
Google.Api.GaxAssembly
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 |
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 |
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 |
Returns | |
---|---|
Type | Description |
CloudRunPlatformDetails | A populated CloudRunPlatformDetails if the metadata represents and GCE instance;
|