4.10.0 (latest) 4.8.0 4.4.0 4.3.1 4.2.0 4.0.0 3.2.0

    public sealed class GkePlatformDetails

Google Container (Kubernetes) Engine details.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> GkePlatformDetails

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)

## Namespace

[Google.Api.Gax](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.md.txt)

## Assembly

Google.Api.Gax.dll

## Constructors

### GkePlatformDetails(string, string, string, string, string, string, string, string, string, string, string)

    public GkePlatformDetails(string metadataJson, string projectId, string clusterName, string location, string hostName, string instanceId, string zone, string namespaceId, string podId, string containerName, string clusterLocation)

Construct details of Google Container (Kubernetes) Engine

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `metadataJson` | `string` The full JSON string retrieved from the metadata server. Must not be `null`. |
| `projectId` | `string` The project ID. Must not be `null`. |
| `clusterName` | `string` The cluster name. Must not be `null`. |
| `location` | `string` The location. Must not be `null`. |
| `hostName` | `string` The instance host name. Must not be `null`. |
| `instanceId` | `string` The GCE instance ID. Must not be `null`. |
| `zone` | `string` The zone. Must not be `null`. |
| `namespaceId` | `string` The kubernetes namespace ID. Must not be `null`. |
| `podId` | `string` The kubernetes pod ID. Must not be `null`. |
| `containerName` | `string` The container name. Must not be `null`. |
| `clusterLocation` | `string` The location of the cluster. Must not be null. |

## Properties

### ClusterLocation

    public string ClusterLocation { get; }

The location of the cluster.
May be different from node / pod location.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### ClusterName

    public string ClusterName { get; }

The cluster name, which is visible in the Google Cloud Console.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### ContainerName

    public string ContainerName { get; }

The name of the container.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### HostName

    public string HostName { get; }

The hostname of this instance.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### InstanceId

    public string InstanceId { get; }

The GCE instance this container is running in.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Location

    public string Location { get; }

The cluster location, which is visible in the Google Cloud Console.
This is equivalent to the value of the

```csharp
<zone-name>
```
part in [Zone](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.GkePlatformDetails.md.txt#Google_Api_Gax_GkePlatformDetails_Zone)

<br />

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### MetadataJson

    public string MetadataJson { get; }

The full JSON string retrieved from the metadata server.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### NamespaceId

    public string NamespaceId { get; }

The cluster namespace the container is running in.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### PodId

    public string PodId { get; }

The pos the container is running in.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### ProjectId

    public string ProjectId { get; }

The Project ID associated with your application, which is visible in the Google Cloud Console.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Zone

    public string Zone { get; }

The GCE zone in which the instance is running.
This is in the format

```csharp
projects/<project-number>/zones/<zone-name>
```
.

<br />

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

## Methods

### ToString()

    public override string ToString()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

**Overrides** [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

### TryLoad(string, KubernetesData)

    public static GkePlatformDetails TryLoad(string metadataJson, GkePlatformDetails.KubernetesData kubernetesData)

Builds a [GkePlatformDetails](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.GkePlatformDetails.md.txt) from the given metadata and kubernetes data.
The metadata is normally retrieved from the GCE metadata server.
The kubernetes data is normally retrieved using the kubernetes API.
This method attempts to return as much information as it is present on `metadataJson`
and `kubernetesData` but will return [Empty](https://learn.microsoft.com/dotnet/api/system.string.empty) for [GkePlatformDetails](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.GkePlatformDetails.md.txt)
properties whose corresponding information is corrupt or missing in `metadataJson`
or `kubernetesData`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `metadataJson` | `string` JSON metadata, normally retrieved from the GCE metadata server. Must not be `null`. |
| `kubernetesData` | `GkePlatformDetailsKubernetesData` Kubernetes data, normally retrieved using the kubernetes API. Must not be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GkePlatformDetails` | A populated [GkePlatformDetails](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.GkePlatformDetails.md.txt) if the metadata represents and GKE instance; `null` otherwise. |