Skip to main content

xpn_hosts

Creates, updates, deletes, gets or lists a xpn_hosts resource.

Overview

Namexpn_hosts
TypeResource
Idgoogle.compute.xpn_hosts

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstring[Output Only] Unique identifier for the resource; defined by the server.
itemsarray[Output Only] A list of shared VPC host project URLs.
kindstring[Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts. (default: compute#xpnHostList)
nextPageTokenstring[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
selfLinkstring[Output Only] Server-defined URL for this resource.
warningobject[Output Only] Informational warning message.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_xpn_hostsselectprojectfilter, maxResults, orderBy, pageToken, returnPartialSuccessLists all shared VPC host projects visible to the user in an organization.
get_xpn_hostselectprojectGets the shared VPC host project that this project links to. May be empty if no link exists.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
projectstring
filterstring
maxResultsinteger (uint32)
orderBystring
pageTokenstring
returnPartialSuccessboolean

SELECT examples

Lists all shared VPC host projects visible to the user in an organization.

SELECT
id,
items,
kind,
nextPageToken,
selfLink,
warning
FROM google.compute.xpn_hosts
WHERE project = '{{ project }}' -- required
AND filter = '{{ filter }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}';