Method: hosts.get

Retrieves information about the specified host.

HTTP request


GET https://compute.googleapis.com/compute/beta/projects/{project}/zones/{zone}/{association}/hosts/{host}

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
project

string

The project ID for this request.

zone

string

The name of the zone for this request, formatted as RFC1035.

association

string

The parent resource association for the Host. This field specifies the hierarchical context (e.g., reservation, block, sub-block) when accessing the host. For example, reservations/reservationName, reservations/reservationName/reservationBlocks/reservation_block_name or reservations/reservationName/reservationBlocks/reservation_block_name/reservationSubBlocks/reservation_sub_block_name.

host

string

The name of the host, formatted as RFC1035 or a resource ID number.

Request body

The request body must be empty.

Response body

Represents a host resource.

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "zone": string,
  "selfLink": string,
  "selfLinkWithId": string,
  "aliasLinks": [
    string
  ],
  "description": string,
  "state": enum,
  "status": {
    "physicalTopology": {
      "cluster": string,
      "block": string,
      "subBlock": string,
      "host": string
    },
    "runningInstances": [
      string
    ]
  }
}
Fields
kind

string

Output only. The type of resource. Always compute#host for hosts.

id

string (uint64 format)

Output only. The unique identifier for this resource. This identifier is defined by the server.

creationTimestamp

string

Output only. The creation timestamp, formatted as RFC3339 text.

name

string

Output only. The name of the host.

zone

string

Output only. The zone in which the host resides.

description

string

An optional description of this resource.

state

enum

Output only. The state of the host.

status

object

Output only. The status of the host

status.physicalTopology

object

Output only. The physical topology of the reservation sub-block, if present

status.physicalTopology.cluster

string

The cluster name of the reservation sub-block.

status.physicalTopology.block

string

The unique identifier of the capacity block within the cluster.

status.physicalTopology.subBlock

string

The unique identifier of the capacity sub-block within the capacity block.

status.physicalTopology.host

string

The unique identifier of the capacity host within the capacity sub-block.

status.runningInstances[]

string

Output only. The URIs of the instances currently running on this host.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/compute.readonly
  • https://www.googleapis.com/auth/compute
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.