REST Resource: projects

Resource: Project

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

JSON representation
{
  "projectNumber": string,
  "projectId": string,
  "lifecycleState": enum (LifecycleState),
  "name": string,
  "createTime": string,
  "labels": {
    string: string,
    ...
  },
  "parent": {
    object (ResourceId)
  }
}
Fields
projectNumber

string (int64 format)

The number uniquely identifying the project.

Example: 415104041262

Read-only.

projectId

string

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

Example: tokyo-rain-123

Read-only after creation.

lifecycleState

enum (LifecycleState)

The Project lifecycle state.

Read-only.

name

string

The optional 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

Read-write.

createTime

string (Timestamp format)

Creation time.

Read-only.

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".

labels

map (key: string, value: string)

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_-]{0,62}.

Label values must be between 0 and 63 characters long and must conform to the regular expression [a-z0-9_-]{0,63}. A label value can be empty.

No more than 256 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: "environment" : "dev"

Read-write.

parent

object (ResourceId)

An optional reference to a parent Resource.

Supported parent types include "organization" and "folder". Once set, the parent cannot be cleared. The parent can be set on creation or using the projects.update method; the end user must have the resourcemanager.projects.create permission on the parent.

Read-write.

LifecycleState

Project lifecycle states.

Enums
LIFECYCLE_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.
DELETE_IN_PROGRESS This lifecycle state is no longer used and is not returned by the API.

ResourceId

A container to reference an id for any resource type. A resource in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an App Engine app, a Compute Engine instance, a Cloud SQL database, and so on.

JSON representation
{
  "type": string,
  "id": string
}
Fields
type

string

Required field representing the resource type this id is for. At present, the valid types are "project", "folder", and "organization".

id

string

Required field for the type-specific id. This should correspond to the id used in the type-specific API's.

Methods

create

Creates a Project resource.

delete

Marks the Project identified by the specified project_id (for example, my-project-123) for deletion.

get

Retrieves the Project identified by the specified project_id (for example, my-project-123).

getAncestry

Gets a list of ancestors in the resource hierarchy for the Project identified by the specified project_id (for example, my-project-123).

getIamPolicy

Returns the IAM access control policy for the specified Project.

list

Lists Projects that the caller has the resourcemanager.projects.get permission on and satisfy the specified filter.

setIamPolicy

Sets the IAM access control policy for the specified Project.

testIamPermissions

Returns permissions that a caller has on the specified Project.

undelete

Restores the Project identified by the specified project_id (for example, my-project-123).

update

Updates the attributes of the Project identified by the specified project_id (for example, my-project-123).