Collection: 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 user-assigned display name of the Project. It must be 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, accurate to nanoseconds. Example: "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]*[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 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.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

parent

object(ResourceId)

An optional reference to a parent Resource.

The only supported parent type is "organization". Once set, the parent cannot be modified. The parent can be set on creation or using the projects.patch 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 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: "organization"

id

string

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

Methods

clearOrgPolicy

Clears a Policy from a resource.

create

Request that a new Project be created.

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

getEffectiveOrgPolicy

Gets the effective Policy on a resource.

getIamPolicy

Returns the IAM access control policy for the specified Project.

getOrgPolicy

Gets a Policy on a resource.

list

Lists Projects that are visible to the user and satisfy the specified filter.

listAvailableOrgPolicyConstraints

Lists Constraints that could be applied on the specified resource.

listOrgPolicies

Lists all the Policies set for a particular resource.

setIamPolicy

Sets the IAM access control policy for the specified Project.

setOrgPolicy

Updates the specified Policy on the resource.

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

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Google Cloud Resource Manager
Google Cloud Resource Manager