REST Resource: projects

Resource: Project

A project is a high-level Google Cloud entity. It is a container for ACLs, APIs, App Engine Apps, VMs, and other Google Cloud Platform resources.

JSON representation
{
  "name": string,
  "parent": string,
  "projectId": string,
  "state": enum (State),
  "displayName": string,
  "createTime": string,
  "updateTime": string,
  "deleteTime": string,
  "etag": string,
  "labels": {
    string: string,
    ...
  },
  "tags": {
    string: string,
    ...
  }
}
Fields
name

string

Output only. The unique resource name of the project. It is an int64 generated number prefixed by "projects/".

Example: projects/415104041262

parent

string

Optional. A reference to a parent Resource. eg., organizations/123 or folders/876.

projectId

string

Immutable. The unique, user-assigned id of the project. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited.

Example: tokyo-rain-123

state

enum (State)

Output only. The project lifecycle state.

displayName

string

Optional. A user-assigned display name of the project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point.

Example: My Project

createTime

string (Timestamp format)

Output only. Creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The most recent time this resource was modified.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

deleteTime

string (Timestamp format)

Output only. The time at which this resource was requested for deletion.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

etag

string

Output only. A checksum computed by the server based on the current value of the Project resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

labels

map (key: string, value: string)

Optional. The labels associated with this project.

Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])?.

Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?.

No more than 64 labels can be associated with a given resource.

Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed.

Example: "myBusinessDimension" : "businessValue"

tags

map (key: string, value: string)

Optional. Input only. Immutable. Tag keys/values directly bound to this project. Each item in the map must be expressed as " : ". For example: "123/environment" : "production", "123/costCenter" : "marketing"

Note: Currently this field is in Preview.

State

Project lifecycle states.

Enums
STATE_UNSPECIFIED Unspecified state. This is only used/useful for distinguishing unset values.
ACTIVE The normal and active state.
DELETE_REQUESTED The project has been marked for deletion by the user (by invoking projects.delete) or by the system (Google Cloud Platform). This can generally be reversed by invoking projects.undelete.

Methods

create

Request that a new project be created.

delete

Marks the project identified by the specified name (for example, projects/415104041262) for deletion.

get

Retrieves the project identified by the specified name (for example, projects/415104041262).

getIamPolicy

Returns the IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g.

list

Lists projects that are direct children of the specified folder or organization resource.

move

Move a project to another place in your resource hierarchy, under a new resource parent.

patch

Updates the display_name and labels of the project identified by the specified name (for example, projects/415104041262).
Search for projects that the caller has the resourcemanager.projects.get permission on, and also satisfy the specified query.

setIamPolicy

Sets the IAM access control policy for the specified project, in the format projects/{ProjectIdOrNumber} e.g.

testIamPermissions

Returns permissions that a caller has on the specified project, in the format projects/{ProjectIdOrNumber} e.g.

undelete

Restores the project identified by the specified name (for example, projects/415104041262).