REST Resource: folders

Resource: Folder

A folder in an organization's resource hierarchy, used to organize that organization's resources.

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

string

Output only. The resource name of the folder. Its format is folders/{folder_id}, for example: "folders/1234".

parent

string

Required. The folder's parent's resource name. Updates to the folder's parent must be performed using folders.move.

displayName

string

The folder's display name. A folder's display name must be unique amongst its siblings. For example, no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: [\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.

state

enum (State)

Output only. The lifecycle state of the folder. Updates to the state must be performed using folders.delete and folders.undelete.

createTime

string (Timestamp format)

Output only. Timestamp when the folder was created.

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. Timestamp when the folder was last 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. Timestamp when the folder was requested to be deleted.

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 folder resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

tags

map (key: string, value: string)

Optional. Input only. Immutable. Tag keys/values directly bound to this folder. 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

Folder lifecycle states.

Enums
STATE_UNSPECIFIED Unspecified state.
ACTIVE The normal and active state.
DELETE_REQUESTED The folder has been marked for deletion by the user.

Methods

create

Creates a folder in the resource hierarchy.

delete

Requests deletion of a folder.

get

Retrieves a folder identified by the supplied resource name.

getIamPolicy

Gets the access control policy for a folder.

list

Lists the folders that are direct descendants of supplied parent resource.

move

Moves a folder under a new resource parent.

patch

Updates a folder, changing its display_name.
Search for folders that match specific filter criteria.

setIamPolicy

Sets the access control policy on a folder, replacing any existing policy.

testIamPermissions

Returns permissions that a caller has on the specified folder.

undelete

Cancels the deletion request for a folder.