Documentation

Google_Service_Storage_Resource_Buckets extends Google_Service_Resource
in package

The "buckets" collection of methods.

Typical usage is: $storageService = new Google_Service_Storage(...); $buckets = $storageService->buckets;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : mixed
Permanently deletes an empty bucket. (buckets.delete)
get()  : Google_Service_Storage_Bucket
Returns metadata for the specified bucket. (buckets.get)
getIamPolicy()  : Google_Service_Storage_Policy
Returns an IAM policy for the specified bucket. (buckets.getIamPolicy)
insert()  : Google_Service_Storage_Bucket
Creates a new bucket. (buckets.insert)
listBuckets()  : Google_Service_Storage_Buckets
Retrieves a list of buckets for a given project. (buckets.listBuckets)
lockRetentionPolicy()  : Google_Service_Storage_Bucket
Locks retention policy on a bucket. (buckets.lockRetentionPolicy)
patch()  : Google_Service_Storage_Bucket
Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.
setIamPolicy()  : Google_Service_Storage_Policy
Updates an IAM policy for the specified bucket. (buckets.setIamPolicy)
testIamPermissions()  : Google_Service_Storage_TestIamPermissionsResponse
Tests a set of permissions on the given bucket to see which, if any, are held by the caller. (buckets.testIamPermissions)
update()  : Google_Service_Storage_Bucket
Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

Permanently deletes an empty bucket. (buckets.delete)

public delete(string $bucket[, array<string|int, mixed> $optParams = array() ]) : mixed
Parameters
$bucket : string

Name of a bucket.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string ifMetagenerationMatch If set, only deletes the bucket if its metageneration matches this value.

opt_param

string ifMetagenerationNotMatch If set, only deletes the bucket if its metageneration does not match this value.

opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request. Required for Requester Pays buckets.

Return values
mixed

get()

Returns metadata for the specified bucket. (buckets.get)

public get(string $bucket[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_Bucket
Parameters
$bucket : string

Name of a bucket.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string ifMetagenerationMatch Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

opt_param

string ifMetagenerationNotMatch Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

opt_param

string projection Set of properties to return. Defaults to noAcl.

opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request. Required for Requester Pays buckets.

Return values
Google_Service_Storage_Bucket

getIamPolicy()

Returns an IAM policy for the specified bucket. (buckets.getIamPolicy)

public getIamPolicy(string $bucket[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_Policy
Parameters
$bucket : string

Name of a bucket.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

int optionsRequestedPolicyVersion The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.

opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request. Required for Requester Pays buckets.

Return values
Google_Service_Storage_Policy

insert()

Creates a new bucket. (buckets.insert)

public insert(string $project, Google_Service_Storage_Bucket $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_Bucket
Parameters
$project : string

A valid API project identifier.

$postBody : Google_Service_Storage_Bucket
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string predefinedAcl Apply a predefined set of access controls to this bucket.

opt_param

string predefinedDefaultObjectAcl Apply a predefined set of default object access controls to this bucket.

opt_param

string projection Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.

opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request.

Return values
Google_Service_Storage_Bucket

listBuckets()

Retrieves a list of buckets for a given project. (buckets.listBuckets)

public listBuckets(string $project[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_Buckets
Parameters
$project : string

A valid API project identifier.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string maxResults Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.

opt_param

string pageToken A previously-returned page token representing part of the larger set of results to view.

opt_param

string prefix Filter results to buckets whose names begin with this prefix.

opt_param

string projection Set of properties to return. Defaults to noAcl.

opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request.

Return values
Google_Service_Storage_Buckets

lockRetentionPolicy()

Locks retention policy on a bucket. (buckets.lockRetentionPolicy)

public lockRetentionPolicy(string $bucket, string $ifMetagenerationMatch[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_Bucket
Parameters
$bucket : string

Name of a bucket.

$ifMetagenerationMatch : string

Makes the operation conditional on whether bucket's current metageneration matches the given value.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request. Required for Requester Pays buckets.

Return values
Google_Service_Storage_Bucket

patch()

Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

public patch(string $bucket, Google_Service_Storage_Bucket $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_Bucket

(buckets.patch)

Parameters
$bucket : string

Name of a bucket.

$postBody : Google_Service_Storage_Bucket
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string ifMetagenerationMatch Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

opt_param

string ifMetagenerationNotMatch Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

opt_param

string predefinedAcl Apply a predefined set of access controls to this bucket.

opt_param

string predefinedDefaultObjectAcl Apply a predefined set of default object access controls to this bucket.

opt_param

string projection Set of properties to return. Defaults to full.

opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request. Required for Requester Pays buckets.

Return values
Google_Service_Storage_Bucket

setIamPolicy()

Updates an IAM policy for the specified bucket. (buckets.setIamPolicy)

public setIamPolicy(string $bucket, Google_Service_Storage_Policy $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_Policy
Parameters
$bucket : string

Name of a bucket.

$postBody : Google_Service_Storage_Policy
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request. Required for Requester Pays buckets.

Return values
Google_Service_Storage_Policy

testIamPermissions()

Tests a set of permissions on the given bucket to see which, if any, are held by the caller. (buckets.testIamPermissions)

public testIamPermissions(string $bucket, string|array<string|int, mixed> $permissions[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_TestIamPermissionsResponse
Parameters
$bucket : string

Name of a bucket.

$permissions : string|array<string|int, mixed>

Permissions to test.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request. Required for Requester Pays buckets.

Return values
Google_Service_Storage_TestIamPermissionsResponse

update()

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

public update(string $bucket, Google_Service_Storage_Bucket $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Storage_Bucket

(buckets.update)

Parameters
$bucket : string

Name of a bucket.

$postBody : Google_Service_Storage_Bucket
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string ifMetagenerationMatch Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

opt_param

string ifMetagenerationNotMatch Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

opt_param

string predefinedAcl Apply a predefined set of access controls to this bucket.

opt_param

string predefinedDefaultObjectAcl Apply a predefined set of default object access controls to this bucket.

opt_param

string projection Set of properties to return. Defaults to full.

opt_param

string provisionalUserProject The project to be billed for this request if the target bucket is requester-pays bucket.

opt_param

string userProject The project to be billed for this request. Required for Requester Pays buckets.

Return values
Google_Service_Storage_Bucket

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results