Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Projects

Represents a Project resource. See the Projects documentation for more information.

For a list of methods for this resource, see the end of this page.

Resource representations

A project resource. Projects can be created only in the APIs Console. Unless marked otherwise, values can only be modified in the console .

{
  "kind": "compute#project",
  "selfLink": string,
  "id": unsigned long,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "commonInstanceMetadata": {
    "kind": "compute#metadata",
    "fingerprint": bytes,
    "items": [
      {
        "key": string,
        "value": string
      }
    ]
  },
  "quotas": [
    {
      "metric": string,
      "limit": double,
      "usage": double
    }
  ],
  "usageExportLocation": {
    "bucketName": string,
    "reportNamePrefix": string
  }
}
Property name Value Description Notes
commonInstanceMetadata nested object Metadata key/value pairs available to all instances contained in this project. See custom project metadata for more information.
commonInstanceMetadata. fingerprint bytes Fingerprint of this resource; a hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata. An up-to-date metadata fingerprint must be provided in order to modify metadata.
commonInstanceMetadata. items[] list Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
commonInstanceMetadata.items[]. key string Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
commonInstanceMetadata.items[]. value string Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
commonInstanceMetadata. kind string The type of the resource. Always compute#metadata for metadata pairs.
creationTimestamp string [Output Only] Creation timestamp in RFC3339 text format.
description string An optional textual description of the resource. This is defined by the client when the resource is created.
id unsigned long Output Only] Unique identifier for the resource. This is generated by the server.
kind string [Output Only] The type of resource. Always compute#project .
name string Project ID of the project, defined by the user when the project is first created.
quotas[] list [Output Only] Quotas assigned to this project.
quotas[]. limit double Quota limit for this metric.
quotas[]. metric string [Output Only] Name of the quota metric.

Acceptable values are:
  • " CPUS ": The number of CPUs for this project.
  • " DISKS ": The number of persistent disks for this project.
  • " DISKS_TOTAL_GB ": The total aggregate disk space for this project.
  • " EPHEMERAL_ADDRESSES ": The number of ephemeral IP addresses for this project.
  • " FIREWALLS ": The number of firewalls.
  • " FORWARDING_RULES ": The number of forwarding rules.
  • " HEALTH_CHECKS ": The number of health checks.
  • " IMAGES ": The number of custom images.
  • " IMAGES_TOTAL_GB ": The total aggregate space for custom images.
  • " INSTANCES ": The number of instances.
  • " IN_USE_ADDRESSES ": The total number of in-use addresses.
  • " KERNELS ": The number of kernels.
  • " KERNELS_TOTAL_GB ": The total aggregate size of kernels.
  • " NETWORKS ": The number of networks.
  • " OPERATIONS ": The number of operations.
  • " ROUTES ": The number of routes.
  • " SNAPSHOTS ": The number of persistent disk snapshots.
  • " STATIC_ADDRESSES ": The total number of reserved IP addresses.
  • " TARGET_INSTANCES ": The number of target instances.
  • " TARGET_POOLS ": The number of target pools.
quotas[]. usage double Current usage of this metric.
usageExportLocation nested object The location in Cloud Storage and naming method of the daily and monthly rollup usage reports.
usageExportLocation. bucketName string The name of an existing bucket in Cloud Storage where the usage reports are stored. The Google Service Account is granted write access to this bucket. This is just the bucket name, with no gs:/ / or https://storage.googleapis.com/ in front of it.
usageExportLocation. reportNamePrefix string An optional prefix for the file name of the usage reports stored in the Cloud Storage bucket. If not supplied, defaults to the prefix usage_gce . The report is stored as a CSV file named <report_prefix> _ <numeric_project_id> _ <YYYYMMDD> .csv where <YYYYMMDD> is the day of the usage according to Pacific Time.

If you supply a prefix, it should conform to Cloud Storage object naming conventions .

Methods

The following are valid methods for Project resources.

get
Returns the specified project resource.
setCommonInstanceMetadata
Sets metadata common to all instances within the specified project using the data included in the request.
setUsageExportBucket
Enables the usage export feature and sets the usage export bucket where reports are sent. You can disable the usage export feature by calling this method with an empty request body.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.