Skip to main content

projects

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

Overview

Nameprojects
TypeResource
Idgoogle.compute.projects

Fields

NameDatatypeDescription
idstring[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.
namestringThe project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
descriptionstringAn optional textual description of the resource.
cloudArmorTierstring[Output Only] The Cloud Armor tier for this project. It can be one of the following values: CA_STANDARD, CA_ENTERPRISE_PAYGO. If this field is not specified, it is assumed to be CA_STANDARD.
commonInstanceMetadataobjectA metadata key/value entry.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
defaultNetworkTierstringThis signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
defaultServiceAccountstring[Output Only] Default service account used by VMs running in this project.
enabledFeaturesarrayRestricted features enabled for use on this project.
kindstring[Output Only] Type of the resource. Always compute#project for projects.
quotasarray[Output Only] Quotas assigned to this project.
selfLinkstring[Output Only] Server-defined URL for the resource.
usageExportLocationobjectThe location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.
vmDnsSettingstring[Output Only] Default internal DNS setting used by VMs running in this project.
xpnProjectStatusstring[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTprojectReturns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.
disable_xpn_hostEXECprojectDisable this project as a shared VPC host project.
disable_xpn_resourceEXECprojectDisable a service resource (also known as service project) associated with this host project.
enable_xpn_hostEXECprojectEnable this project as a shared VPC host project.
enable_xpn_resourceEXECprojectEnable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
move_diskEXECprojectMoves a persistent disk from one zone to another.
move_instanceEXECprojectMoves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead.
set_cloud_armor_tierEXECprojectSets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information.
set_common_instance_metadataEXECprojectSets metadata common to all instances within the specified project using the data included in the request.
set_default_network_tierEXECprojectSets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
set_usage_export_bucketEXECprojectEnables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.

SELECT examples

Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

SELECT
id,
name,
description,
cloudArmorTier,
commonInstanceMetadata,
creationTimestamp,
defaultNetworkTier,
defaultServiceAccount,
enabledFeatures,
kind,
quotas,
selfLink,
usageExportLocation,
vmDnsSetting,
xpnProjectStatus
FROM google.compute.projects
WHERE project = '{{ project }}';