Service Client: Google::Cloud::Resourcemanager::V2::Folders::FoldersClient

Client stub representing the remote Folders gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to resourcemanager.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Resourcemanager::V2::Folders - Compiled Protocol Buffers messages for google/cloud/resourcemanager/v2/folders.proto

SYNOPSIS

use Google::Cloud::Resourcemanager::V2::Folders;

my $msg = Google::Cloud::Resourcemanager::V2::Folders::Folder->new({
    name => $name,
    parent => $parent,
    display_name => $display_name,
    lifecycle_state => $lifecycle_state,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Resourcemanager::V2::Folders::Folder->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/resourcemanager/v2/folders.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Resourcemanager::V2::Folders::Folder

A Folder in an Organization's resource hierarchy, used to organize that Organization's resources.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

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

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The Folder’s parent's resource name. Updates to the folder's parent must be performed via [MoveFolder][google.cloud.resourcemanager.v2.Folders.MoveFolder].

  • $msg->display_name() / $msg->display_name($value)

    Type: String

    The folder’s display name. A folder’s display name must be unique amongst its siblings, e.g. 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}])?.

  • $msg->lifecycle_state() / $msg->lifecycle_state($value)

    Type: Enum (Google::Cloud::Resourcemanager::V2::Folder::LifecycleState)

    Output only. The lifecycle state of the folder. Updates to the lifecycle_state must be performed via [DeleteFolder][google.cloud.resourcemanager.v2.Folders.DeleteFolder] and [UndeleteFolder][google.cloud.resourcemanager.v2.Folders.UndeleteFolder].

  • $msg->create_time() / $msg->create_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. Timestamp when the Folder was created. Assigned by the server.

  • $msg->update_time() / $msg->update_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. Timestamp when the Folder was last modified.

Enum: Folder::LifecycleState

  • LIFECYCLE_STATE_UNSPECIFIED => 0

  • ACTIVE => 1

  • DELETE_REQUESTED => 2

Google::Cloud::Resourcemanager::V2::Folders::ListFoldersRequest

The ListFolders request message.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The resource name of the Organization or Folder whose Folders are being listed. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. Access to this method is controlled by checking the `resourcemanager.folders.list` permission on the `parent`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of Folders to return in the response.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. A pagination token returned from a previous call to `ListFolders` that indicates where this listing should continue from.

  • $msg->show_deleted() / $msg->show_deleted($value)

    Type: Bool

    Optional. Controls whether Folders in the [DELETE_REQUESTED][google.cloud.resourcemanager.v2.Folder.LifecycleState.DELETE_REQUESTED] state should be returned. Defaults to false.

Google::Cloud::Resourcemanager::V2::Folders::ListFoldersResponse

The ListFolders response message.

Inherits from Protobuf::Message.

Accessors

  • $msg->folders() / $msg->folders($value)

    Type: Message (Google::Cloud::Resourcemanager::V2::Folders::Folder)

    A possibly paginated list of Folders that are direct descendants of the specified parent resource.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    A pagination token returned from a previous call to `ListFolders` that indicates from where listing should continue.

Google::Cloud::Resourcemanager::V2::Folders::SearchFoldersRequest

The request message for searching folders.

Inherits from Protobuf::Message.

Accessors

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. The maximum number of folders to return in the response.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. A pagination token returned from a previous call to `SearchFolders` that indicates from where search should continue.

  • $msg->query() / $msg->query($value)

    Type: String

    Search criteria used to select the Folders to return. If no search criteria is specified then all accessible folders will be returned.

    Query expressions can be used to restrict results based upon displayName, lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`.

    The displayName field in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior.

    Some example queries are:

    * Query `displayName=Test*` returns Folder resources whose display name starts with "Test". * Query `lifecycleState=ACTIVE` returns Folder resources with `lifecycleState` set to `ACTIVE`. * Query `parent=folders/123` returns Folder resources that have `folders/123` as a parent resource. * Query `parent=folders/123 AND lifecycleState=ACTIVE` returns active Folder resources that have `folders/123` as a parent resource. * Query `displayName=\\"Test String\\"` returns Folder resources with display names that include both "Test" and "String".

Google::Cloud::Resourcemanager::V2::Folders::SearchFoldersResponse

The response message for searching folders.

Inherits from Protobuf::Message.

Accessors

  • $msg->folders() / $msg->folders($value)

    Type: Message (Google::Cloud::Resourcemanager::V2::Folders::Folder)

    A possibly paginated folder search results. the specified parent resource.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    A pagination token returned from a previous call to `SearchFolders` that indicates from where searching should continue.

Google::Cloud::Resourcemanager::V2::Folders::GetFolderRequest

The GetFolder request message.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Folder to retrieve. Must be of the form `folders/{folder_id}`.

Google::Cloud::Resourcemanager::V2::Folders::CreateFolderRequest

The CreateFolder request message.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The resource name of the new Folder's parent. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.

  • $msg->folder() / $msg->folder($value)

    Type: Message (Google::Cloud::Resourcemanager::V2::Folders::Folder)

    Required. The Folder being created, only the display name will be consulted. All other fields will be ignored.

Google::Cloud::Resourcemanager::V2::Folders::MoveFolderRequest

The MoveFolder request message.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Folder to move. Must be of the form folders/{folder_id}

  • $msg->destination_parent() / $msg->destination_parent($value)

    Type: String

    Required. The resource name of the Folder or Organization to reparent the folder under. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.

Google::Cloud::Resourcemanager::V2::Folders::UpdateFolderRequest

The request message for updating a folder's display name.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Resourcemanager::V2::Folders::DeleteFolderRequest

The DeleteFolder request message.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Folder to be deleted. Must be of the form `folders/{folder_id}`.

  • $msg->recursive_delete() / $msg->recursive_delete($value)

    Type: Bool

    Instructs DeleteFolderAction to delete a folder even when the folder is not empty.

Google::Cloud::Resourcemanager::V2::Folders::UndeleteFolderRequest

The UndeleteFolder request message.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the Folder to undelete. Must be of the form `folders/{folder_id}`.

Google::Cloud::Resourcemanager::V2::Folders::FolderOperation

Metadata describing a long running folder operation

Inherits from Protobuf::Message.

Accessors

  • $msg->display_name() / $msg->display_name($value)

    Type: String

    The display name of the folder.

  • $msg->operation_type() / $msg->operation_type($value)

    Type: Enum (Google::Cloud::Resourcemanager::V2::FolderOperation::OperationType)

    The type of this operation.

  • $msg->source_parent() / $msg->source_parent($value)

    Type: String

    The resource name of the folder's parent. Only applicable when the operation_type is MOVE.

  • $msg->destination_parent() / $msg->destination_parent($value)

    Type: String

    The resource name of the folder or organization we are either creating the folder under or moving the folder to.

Enum: FolderOperation::OperationType

  • OPERATION_TYPE_UNSPECIFIED => 0

  • CREATE => 1

  • MOVE => 2

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Resourcemanager::V2::Folders::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.