Show / Hide Table of Contents

Class BucketsResource

The "buckets" collection of methods.

Inheritance
object
BucketsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Storage.v1
Assembly: Google.Apis.Storage.v1.dll
Syntax
public class BucketsResource

Constructors

BucketsResource(IClientService)

Constructs a new resource.

Declaration
public BucketsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Delete(string)

Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket.

Declaration
public virtual BucketsResource.DeleteRequest Delete(string bucket)
Parameters
Type Name Description
string bucket

Name of a bucket.

Returns
Type Description
BucketsResource.DeleteRequest

Get(string)

Returns metadata for the specified bucket.

Declaration
public virtual BucketsResource.GetRequest Get(string bucket)
Parameters
Type Name Description
string bucket

Name of a bucket.

Returns
Type Description
BucketsResource.GetRequest

GetIamPolicy(string)

Returns an IAM policy for the specified bucket.

Declaration
public virtual BucketsResource.GetIamPolicyRequest GetIamPolicy(string bucket)
Parameters
Type Name Description
string bucket

Name of a bucket.

Returns
Type Description
BucketsResource.GetIamPolicyRequest

GetStorageLayout(string)

Returns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission.

Declaration
public virtual BucketsResource.GetStorageLayoutRequest GetStorageLayout(string bucket)
Parameters
Type Name Description
string bucket

Name of a bucket.

Returns
Type Description
BucketsResource.GetStorageLayoutRequest

Insert(Bucket, string)

Creates a new bucket.

Declaration
public virtual BucketsResource.InsertRequest Insert(Bucket body, string project)
Parameters
Type Name Description
Bucket body

The body of the request.

string project

A valid API project identifier.

Returns
Type Description
BucketsResource.InsertRequest

List(string)

Retrieves a list of buckets for a given project.

Declaration
public virtual BucketsResource.ListRequest List(string project)
Parameters
Type Name Description
string project

A valid API project identifier.

Returns
Type Description
BucketsResource.ListRequest

LockRetentionPolicy(string, long)

Locks retention policy on a bucket.

Declaration
public virtual BucketsResource.LockRetentionPolicyRequest LockRetentionPolicy(string bucket, long ifMetagenerationMatch)
Parameters
Type Name Description
string bucket

Name of a bucket.

long ifMetagenerationMatch

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

Returns
Type Description
BucketsResource.LockRetentionPolicyRequest

Patch(Bucket, string)

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

Declaration
public virtual BucketsResource.PatchRequest Patch(Bucket body, string bucket)
Parameters
Type Name Description
Bucket body

The body of the request.

string bucket

Name of a bucket.

Returns
Type Description
BucketsResource.PatchRequest

Relocate(RelocateBucketRequest, string)

Initiates a long-running Relocate Bucket operation on the specified bucket.

Declaration
public virtual BucketsResource.RelocateRequest Relocate(RelocateBucketRequest body, string bucket)
Parameters
Type Name Description
RelocateBucketRequest body

The body of the request.

string bucket

Name of the bucket to be moved.

Returns
Type Description
BucketsResource.RelocateRequest

Restore(string, long)

Restores a soft-deleted bucket.

Declaration
public virtual BucketsResource.RestoreRequest Restore(string bucket, long generation)
Parameters
Type Name Description
string bucket

Name of a bucket.

long generation

Generation of a bucket.

Returns
Type Description
BucketsResource.RestoreRequest

SetIamPolicy(Policy, string)

Updates an IAM policy for the specified bucket.

Declaration
public virtual BucketsResource.SetIamPolicyRequest SetIamPolicy(Policy body, string bucket)
Parameters
Type Name Description
Policy body

The body of the request.

string bucket

Name of a bucket.

Returns
Type Description
BucketsResource.SetIamPolicyRequest

TestIamPermissions(string, Repeatable<string>)

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

Declaration
public virtual BucketsResource.TestIamPermissionsRequest TestIamPermissions(string bucket, Repeatable<string> permissions)
Parameters
Type Name Description
string bucket

Name of a bucket.

Repeatable<string> permissions

Permissions to test.

Returns
Type Description
BucketsResource.TestIamPermissionsRequest

Update(Bucket, string)

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

Declaration
public virtual BucketsResource.UpdateRequest Update(Bucket body, string bucket)
Parameters
Type Name Description
Bucket body

The body of the request.

string bucket

Name of a bucket.

Returns
Type Description
BucketsResource.UpdateRequest
In this article
Back to top Generated by DocFX