NAME

Google::RestApi::DriveApi3::Drive - Shared Drive object for Google Drive.

SYNOPSIS

# List shared drives
my @drives = $drive_api->list_drives();

# Create a new shared drive
my $sd = $drive_api->create_drive(
  name       => 'Team Drive',
  request_id => 'unique-request-id',
);

# Get a shared drive
my $sd = $drive_api->shared_drive(id => 'drive_id');
my $info = $sd->get();

# Update shared drive
$sd->update(
  name         => 'New Name',
  restrictions => { adminManagedRestrictions => \1 },
);

# Hide/unhide from default view
$sd->hide();
$sd->unhide();

# Delete shared drive
$sd->delete();

DESCRIPTION

Represents a Google Shared Drive (formerly Team Drive). Supports getting, updating, deleting, and hiding shared drives.

METHODS

get(fields => $fields, use_domain_admin_access => $bool)

Gets shared drive metadata. Requires drive ID.

update(name => $name, ...)

Updates shared drive settings. Requires drive ID.

Options: - name: New name for the drive - color_rgb: Color as hex RGB (e.g., '#FF0000') - theme_id: Theme ID - background_image_file: Background image settings - restrictions: Access restrictions hashref - use_domain_admin_access: Use admin access

delete(use_domain_admin_access => $bool, allow_item_deletion => $bool)

Deletes the shared drive. Requires drive ID.

hide()

Hides the shared drive from the default view. Requires drive ID.

unhide()

Restores the shared drive to the default view. Requires drive ID.

drive_id()

Returns the shared drive ID.

drive_api()

Returns the parent DriveApi3 object.

AUTHORS

  • Robin Murray mvsjes@cpan.org

COPYRIGHT

Copyright (c) 2019-2026 Robin Murray. All rights reserved.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.