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:
|
|
quotas[].
usage
|
double
|
Current usage of this metric. | |
selfLink
|
string
|
[Output Only] Server-defined fully-qualified URL for this resource. | |
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.