Package @google-cloud/storage (5.17.0)

Classes

Bucket

Create a Bucket object to interact with a Cloud Storage bucket.

Channel

Create a channel object to interact with a Cloud Storage channel.

See Object Change Notification

File

A File object is created from your Bucket object using .

HmacKey

An HmacKey object contains metadata of an HMAC key created from a service account through the Storage client using .

See HMAC keys documentation

Iam

Get and set IAM policies for your Cloud Storage bucket.

See Cloud Storage IAM Management See Granting, Changing, and Revoking Access See IAM Roles

Iam

Notification

A Notification object is created from your Bucket object using . Use it to interact with Cloud Pub/Sub notifications.

See Cloud Pub/Sub Notifications for Google Cloud Storage

Storage

ACLs

Cloud Storage uses access control lists (ACLs) to manage object and bucket access. ACLs are the mechanism you use to share files with other users and allow other users to access your buckets and files.

To learn more about ACLs, read this overview on Access Control.

See Cloud Storage overview See Access Control

Interfaces

AccessControlObject

AclOptions

AddAclCallback

AddAclOptions

BucketCallback

BucketExistsOptions

BucketLockCallback

BucketOptions

CombineCallback

CombineOptions

CopyCallback

CopyOptions

CreateBucketQuery

CreateBucketRequest

CreateChannelCallback

CreateChannelConfig

CreateChannelOptions

CreateHmacKeyCallback

CreateHmacKeyOptions

CreateNotificationCallback

CreateNotificationOptions

CreateReadStreamOptions

CreateResumableUploadCallback

CreateResumableUploadOptions

CreateWriteStreamOptions

DeleteBucketCallback

DeleteBucketOptions

DeleteFileCallback

DeleteFileOptions

DeleteFilesCallback

DeleteFilesOptions

DeleteNotificationCallback

DeleteNotificationCallback

DeleteNotificationOptions

DisableRequesterPaysCallback

DownloadOptions

EnableRequesterPaysCallback

EncryptionKeyOptions

FileExistsCallback

FileExistsOptions

FileOptions

GenerateSignedPostPolicyV4Callback

GenerateSignedPostPolicyV4Options

GetAclCallback

GetAclOptions

GetBucketCallback

GetBucketMetadataCallback

GetBucketMetadataOptions

GetBucketOptions

GetBucketsCallback

GetBucketSignedUrlConfig

GetBucketsRequest

GetExpirationDateCallback

GetFileCallback

GetFileMetadataCallback

GetFileMetadataOptions

GetFileOptions

GetFilesCallback

GetFilesOptions

GetHmacKeysCallback

GetHmacKeysOptions

GetLabelsCallback

GetLabelsOptions

GetNotificationCallback

GetNotificationCallback

GetNotificationMetadataCallback

GetNotificationMetadataCallback

GetNotificationMetadataOptions

GetNotificationOptions

GetNotificationsCallback

GetNotificationsOptions

GetPolicyCallback

GetPolicyCallback

GetPolicyOptions

GetServiceAccountCallback

GetServiceAccountOptions

GetSignedPolicyCallback

GetSignedPolicyOptions

GetSignedUrlCallback

GetSignedUrlConfig

HmacKeyMetadata

HmacKeyMetadataCallback

HmacKeyResourceResponse

Labels

MakeBucketPrivateCallback

MakeBucketPrivateOptions

MakeBucketPublicCallback

MakeBucketPublicOptions

MakeFilePrivateOptions

MakeFilePublicCallback

MoveCallback

MoveOptions

Policy

PolicyDocument

PolicyFields

RemoveAclCallback

RemoveAclOptions

SaveCallback

SaveOptions

ServiceAccount

SetBucketMetadataCallback

SetBucketMetadataOptions

SetBucketStorageClassCallback

SetBucketStorageClassOptions

SetFileMetadataCallback

SetFileMetadataOptions

SetHmacKeyMetadata

SetHmacKeyMetadataOptions

SetLabelsCallback

SetLabelsOptions

SetPolicyCallback

SetPolicyCallback

SetPolicyOptions

{object} SetPolicyOptions

SetStorageClassCallback

SetStorageClassOptions

SignedPostPolicyV4Output

StopCallback

StorageOptions

TestIamPermissionsCallback

TestIamPermissionsCallback

TestIamPermissionsOptions

{object} TestIamPermissionsOptions Configuration options for Iam#testPermissions().

UpdateAclCallback

UpdateAclOptions

UploadCallback

UploadOptions

Type Aliases

AddAclResponse

export declare type AddAclResponse = [AccessControlObject, Metadata];

BucketExistsCallback

export declare type BucketExistsCallback = ExistsCallback;

BucketExistsResponse

export declare type BucketExistsResponse = [boolean];

BucketLockResponse

export declare type BucketLockResponse = [Metadata];

CombineResponse

export declare type CombineResponse = [File, Metadata];

CopyResponse

export declare type CopyResponse = [File, Metadata];

CreateBucketResponse

export declare type CreateBucketResponse = [Bucket, Metadata];

CreateChannelResponse

export declare type CreateChannelResponse = [Channel, Metadata];

CreateHmacKeyResponse

export declare type CreateHmacKeyResponse = [HmacKey, string, HmacKeyResourceResponse];

CreateNotificationResponse

export declare type CreateNotificationResponse = [Notification, Metadata];

CreateResumableUploadResponse

export declare type CreateResumableUploadResponse = [string];

DeleteBucketResponse

export declare type DeleteBucketResponse = [Metadata];

DeleteFileResponse

export declare type DeleteFileResponse = [Metadata];

DeleteLabelsCallback

export declare type DeleteLabelsCallback = SetLabelsCallback;

DeleteLabelsResponse

export declare type DeleteLabelsResponse = [Metadata];

DisableRequesterPaysResponse

export declare type DisableRequesterPaysResponse = [Metadata];

DownloadCallback

export declare type DownloadCallback = (err: RequestError | null, contents: Buffer) => void;

DownloadResponse

export declare type DownloadResponse = [Buffer];

EnableRequesterPaysResponse

export declare type EnableRequesterPaysResponse = [Metadata];

FileExistsResponse

export declare type FileExistsResponse = [boolean];

GenerateSignedPostPolicyV2Callback

export declare type GenerateSignedPostPolicyV2Callback = GetSignedPolicyCallback;

GenerateSignedPostPolicyV2Options

export declare type GenerateSignedPostPolicyV2Options = GetSignedPolicyOptions;

GenerateSignedPostPolicyV2Response

export declare type GenerateSignedPostPolicyV2Response = GetSignedPolicyResponse;

GenerateSignedPostPolicyV4Response

export declare type GenerateSignedPostPolicyV4Response = [SignedPostPolicyV4Output];

GetAclResponse

export declare type GetAclResponse = [AccessControlObject | AccessControlObject[], Metadata];

GetBucketMetadataResponse

export declare type GetBucketMetadataResponse = [Metadata, Metadata];

GetBucketResponse

export declare type GetBucketResponse = [Bucket, Metadata];

GetBucketsResponse

export declare type GetBucketsResponse = [Bucket[], {}, Metadata];

GetExpirationDateResponse

export declare type GetExpirationDateResponse = [Date];

GetFileMetadataResponse

export declare type GetFileMetadataResponse = [Metadata, Metadata];

GetFileResponse

export declare type GetFileResponse = [File, Metadata];

GetFilesResponse

export declare type GetFilesResponse = [File[], {}, Metadata];

GetHmacKeysResponse

export declare type GetHmacKeysResponse = [HmacKey[]];

GetLabelsResponse

export declare type GetLabelsResponse = [Metadata];

GetNotificationMetadataResponse

export declare type GetNotificationMetadataResponse = [ResponseBody, Metadata];

{array} GetNotificationMetadataResponse {object} 0 The notification metadata. {object} 1 The full API response.

GetNotificationResponse

export declare type GetNotificationResponse = [Notification, Metadata];

{array} GetNotificationResponse {Notification} 0 The Notification {object} 1 The full API response.

GetNotificationsResponse

export declare type GetNotificationsResponse = [Notification[], Metadata];

GetPolicyResponse

export declare type GetPolicyResponse = [Policy, Metadata];

GetServiceAccountResponse

export declare type GetServiceAccountResponse = [ServiceAccount, Metadata];

GetSignedPolicyResponse

export declare type GetSignedPolicyResponse = [PolicyDocument];

GetSignedUrlResponse

export declare type GetSignedUrlResponse = [SignerGetSignedUrlResponse];

HmacKeyMetadataResponse

export declare type HmacKeyMetadataResponse = [HmacKeyMetadata, Metadata];

MakeBucketPrivateResponse

export declare type MakeBucketPrivateResponse = [File[]];

MakeBucketPublicResponse

export declare type MakeBucketPublicResponse = [File[]];

MakeFilePrivateCallback

export declare type MakeFilePrivateCallback = SetFileMetadataCallback;

MakeFilePrivateResponse

export declare type MakeFilePrivateResponse = [Metadata];

MakeFilePublicResponse

export declare type MakeFilePublicResponse = [Metadata];

MoveResponse

export declare type MoveResponse = [Metadata];

PredefinedAcl

export declare type PredefinedAcl = 'authenticatedRead' | 'bucketOwnerFullControl' | 'bucketOwnerRead' | 'private' | 'projectPrivate' | 'publicRead';

RemoveAclResponse

export declare type RemoveAclResponse = [Metadata];

RotateEncryptionKeyCallback

export declare type RotateEncryptionKeyCallback = CopyCallback;

RotateEncryptionKeyOptions

export declare type RotateEncryptionKeyOptions = string | Buffer | EncryptionKeyOptions;

RotateEncryptionKeyResponse

export declare type RotateEncryptionKeyResponse = CopyResponse;

SetBucketMetadataResponse

export declare type SetBucketMetadataResponse = [Metadata];

SetFileMetadataResponse

export declare type SetFileMetadataResponse = [Metadata];

SetLabelsResponse

export declare type SetLabelsResponse = [Metadata];

SetPolicyResponse

export declare type SetPolicyResponse = [Policy, Metadata];

{array} SetPolicyResponse {object} 0 The policy. {object} 1 The full API response.

SetStorageClassResponse

export declare type SetStorageClassResponse = [Metadata];

TestIamPermissionsResponse

export declare type TestIamPermissionsResponse = [{
    [key: string]: boolean;
}, Metadata];

{array} TestIamPermissionsResponse {object} 0 A subset of permissions that the caller is allowed. {object} 1 The full API response.

UpdateAclResponse

export declare type UpdateAclResponse = [AccessControlObject, Metadata];

UploadResponse

export declare type UploadResponse = [File, Metadata];