Globals

Abstract types

AddAclCallback

AddAclCallback(err, acl, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

acl

object

The Acl Objects.

apiResponse

object

The full API response.

AddAclResponse

array

Properties

Parameter

0

object

The Acl Objects.

1

object

The full API response.

BucketExistsCallback

BucketExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the Bucket exists.

BucketExistsResponse

array

Property

Parameter

0

boolean

Whether the Bucket exists.

ClientConfig

object

Properties

Parameter

projectId

Optional

string

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

keyFilename

Optional

string

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option above is not necessary. NOTE: .pem and .p12 require you to specify the email option as well.

email

Optional

string

Account email address. Required when using a .pem or .p12 keyFilename.

credentials

Optional

object

Credentials object.

autoRetry

Optional

boolean

Automatically retry requests if the response is related to rate limits or certain intermittent server errors. We will exponentially backoff subsequent requests by default.

maxRetries

Optional

number

Maximum number of automatic retries attempted before returning the error.

promise

Optional

Constructor

Custom promise module to use instead of native Promises.

CombineCallback

CombineCallback(err, newFile, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

newFile

File

The new File.

apiResponse

object

The full API response.

CombineResponse

array

Properties

Parameter

0

File

The new File.

1

object

The full API response.

CopyCallback

CopyCallback(err, copiedFile, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

copiedFile

File

The copied File.

apiResponse

object

The full API response.

CopyResponse

array

Properties

Parameter

0

File

The copied File.

1

object

The full API response.

CreateBucketCallback

CreateBucketCallback(err, bucket, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

bucket

Bucket

The new Bucket.

apiResponse

object

The full API response.

CreateBucketRequest

object

Metadata to set for the bucket.

Properties

Parameter

coldline

Optional

boolean

Specify the storage class as Coldline.

dra

Optional

boolean

Specify the storage class as Durable Reduced Availability.

multiRegional

Optional

boolean

Specify the storage class as Multi-Regional.

nearline

Optional

boolean

Specify the storage class as Nearline.

regional

Optional

boolean

Specify the storage class as Regional.

requesterPays

Optional

boolean

Early Access Testers Only Force the use of the User Project metadata field to assign operational costs when an operation is made on a Bucket and its objects.

userProject

Optional

string

The ID of the project which will be billed for the request.

CreateBucketResponse

array

Properties

Parameter

0

Bucket

The new Bucket.

1

object

The full API response.

CreateChannelCallback

CreateChannelCallback(err, channel, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

channel

Channel

The new Channel.

apiResponse

object

The full API response.

CreateChannelResponse

array

Properties

Parameter

0

object

The full API response.

1

Channel

The new Channel.

CreateNotificationCallback

CreateNotificationCallback(err, notification, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

notification

Notification

The new Notification.

apiResponse

object

The full API response.

CreateNotificationRequest

object

Metadata to set for the Notification.

Properties

Parameter

customAttributes

Optional

object

An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.

eventTypes

Optional

Array of string

If present, only send notifications about listed event types. If empty, sent notifications for all event types.

objectNamePrefix

Optional

string

If present, only apply this notification configuration to object names that begin with this prefix.

payloadFormat

Optional

string

The desired content of the Payload. Defaults to JSON_API_V1.

Acceptable values are:
- `JSON_API_V1`

- `NONE`

options.userProject

Optional

string

The ID of the project which will be billed for the request.

CreateNotificationResponse

array

Properties

Parameter

0

Notification

The new Notification.

1

object

The full API response.

CreateResumableUploadCallback

CreateResumableUploadCallback(err, uri)

Parameter

err

Error

Request error, if any.

Value may be null.

uri

string

The resumable upload's unique session URI.

CreateResumableUploadResponse

array

Property

Parameter

0

string

The resumable upload's unique session URI.

DeleteBucketCallback

DeleteBucketCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

DeleteBucketResponse

array

Property

Parameter

0

object

The full API response.

DeleteFileCallback

DeleteFileCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

DeleteFileResponse

array

Property

Parameter

0

object

The full API response.

DeleteFilesCallback

DeleteFilesCallback(err, apiResponse)

Parameter

err

(nullable Error or nullable Array of Error)

Request error, if any, or array of errors from files that were not able to be deleted.

apiResponse

object

The full API response.

DeleteLabelsCallback

DeleteLabelsCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

DeleteLabelsResponse

array

Property

Parameter

0

object

The full API response.

DeleteNotificationCallback

DeleteNotificationCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

DeleteNotificationResponse

array

Property

Parameter

0

object

The full API response.

DisableRequesterPaysCallback

DisableRequesterPaysCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

DisableRequesterPaysResponse

array

Property

Parameter

0

object

The full API response.

DownloadCallback

DownloadCallback(err, contents)

Parameter

err

Error

Request error, if any.

Value may be null.

contents

Optional

buffer

The contents of a File.

DownloadResponse

array

Property

Parameter

0

Optional

object

The contents of a File.

EnableRequesterPaysCallback

EnableRequesterPaysCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

EnableRequesterPaysResponse

array

Property

Parameter

0

object

The full API response.

FileExistsCallback

FileExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the File exists.

FileExistsResponse

array

Property

Parameter

0

boolean

Whether the File exists.

GetAclCallback

GetAclCallback(err, acl, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

acl

(object or Array of object)

Single or array of Acl Objects.

apiResponse

object

The full API response.

GetAclResponse

array

Properties

Parameter

0

(object or Array of object)

Single or array of Acl Objects.

1

object

The full API response.

GetBucketCallback

GetBucketCallback(err, bucket, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

bucket

Bucket

The Bucket.

apiResponse

object

The full API response.

GetBucketMetadataCallback

GetBucketMetadataCallback(err, files, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

files

object

The bucket metadata.

apiResponse

object

The full API response.

GetBucketMetadataResponse

array

Properties

Parameter

0

object

The bucket metadata.

1

object

The full API response.

GetBucketResponse

array

Properties

Parameter

0

Bucket

The Bucket.

1

object

The full API response.

GetBucketsCallback

GetBucketsCallback(err, buckets)

Parameter

err

Error

Request error, if any.

Value may be null.

buckets

Array of Bucket

Array of Bucket instances.

GetBucketsRequest

object

Query object for listing buckets.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically.

maxApiCalls

Optional

number

Maximum number of API calls to make.

maxResults

Optional

number

Maximum number of items plus prefixes to return.

pageToken

Optional

string

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

userProject

Optional

string

The ID of the project which will be billed for the request.

GetBucketsResponse

array

Property

Parameter

0

Array of Bucket

Array of Bucket instances.

GetFileCallback

GetFileCallback(err, file, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

file

File

The File.

apiResponse

object

The full API response.

GetFileMetadataCallback

GetFileMetadataCallback(err, metadata, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

metadata

object

The File metadata.

apiResponse

object

The full API response.

GetFileMetadataResponse

array

Properties

Parameter

0

object

The File metadata.

1

object

The full API response.

GetFileResponse

array

Properties

Parameter

0

File

The File.

1

object

The full API response.

GetFilesCallback

GetFilesCallback(err, files)

Parameter

err

Error

Request error, if any.

Value may be null.

files

Array of File

Array of File instances.

GetFilesRequest

object

Query object for listing files.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically.

delimiter

Optional

string

Results will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name truncated after the delimiter, returned in apiResponse.prefixes. Duplicate prefixes are omitted.

prefix

Optional

string

Filter results to objects whose names begin with this prefix.

maxApiCalls

Optional

number

Maximum number of API calls to make.

maxResults

Optional

number

Maximum number of items plus prefixes to return.

pageToken

Optional

string

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

userProject

Optional

string

The ID of the project which will be billed for the request.

versions

Optional

boolean

If true, returns File objects scoped to their versions.

GetFilesResponse

array

Property

Parameter

0

Array of File

Array of File instances.

GetLabelsCallback

GetLabelsCallback(err, labels)

Parameter

err

Error

Request error, if any.

Value may be null.

labels

object

Object of labels currently set on this bucket.

GetLabelsResponse

array

Property

Parameter

0

object

Object of labels currently set on this bucket.

GetNotificationCallback

GetNotificationCallback(err, notification, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

notification

Notification

The Notification.

apiResponse

object

The full API response.

GetNotificationMetadataCallback

GetNotificationMetadataCallback(err, files, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

files

object

The notification metadata.

apiResponse

object

The full API response.

GetNotificationMetadataResponse

array

Properties

Parameter

0

object

The notification metadata.

1

object

The full API response.

GetNotificationResponse

array

Properties

Parameter

0

Notification

The Notification

1

object

The full API response.

GetNotificationsCallback

GetNotificationsCallback(err, notifications, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

notifications

Array of Notification

Array of Notification instances.

apiResponse

object

The full API response.

GetNotificationsResponse

array

Properties

Parameter

0

Array of Notification

Array of Notification instances.

1

object

The full API response.

GetPolicyCallback

GetPolicyCallback(err, acl, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

acl

object

The policy.

apiResponse

object

The full API response.

GetPolicyRequest

object

Property

Parameter

userProject

string

The ID of the project which will be billed for the request.

GetPolicyResponse

array

Properties

Parameter

0

object

The policy.

1

object

The full API response.

GetSignedPolicyCallback

GetSignedPolicyCallback(err, policy)

Parameter

err

Error

Request error, if any.

Value may be null.

policy

object

The document policy.

GetSignedPolicyResponse

array

Property

Parameter

0

object

The document policy.

GetSignedUrlCallback

GetSignedUrlCallback(err, url)

Parameter

err

Error

Request error, if any.

Value may be null.

url

object

The signed URL.

GetSignedUrlResponse

array

Property

Parameter

0

object

The signed URL.

MakeBucketPrivateCallback

MakeBucketPrivateCallback(err, files)

Parameter

err

Error

Request error, if any.

Value may be null.

files

Array of File

List of files made private.

MakeBucketPrivateResponse

array

Property

Parameter

0

Array of File

List of files made private.

MakeBucketPublicCallback

MakeBucketPublicCallback(err, files)

Parameter

err

Error

Request error, if any.

Value may be null.

files

Array of File

List of files made public.

MakeBucketPublicResponse

array

Property

Parameter

0

Array of File

List of files made public.

MakeFilePrivateCallback

MakeFilePrivateCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

MakeFilePrivateResponse

array

Property

Parameter

0

object

The full API response.

MakeFilePublicCallback

MakeFilePublicCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

MakeFilePublicResponse

array

Property

Parameter

0

object

The full API response.

MoveCallback

MoveCallback(err, destinationFile, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

destinationFile

File

The destination File.

apiResponse

object

The full API response.

MoveResponse

array

Properties

Parameter

0

File

The destination File.

1

object

The full API response.

NotificationExistsCallback

NotificationExistsCallback(err, exists)

Parameter

err

Error

Request error, if any.

Value may be null.

exists

boolean

Whether the notification exists or not.

NotificationExistsResponse

array

Property

Parameter

0

boolean

Whether the notification exists or not.

RemoveAclCallback

RemoveAclCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

RemoveAclResponse

array

Property

Parameter

0

object

The full API response.

SaveCallback

SaveCallback(err)

Parameter

err

Error

Request error, if any.

Value may be null.

SetBucketMetadataCallback

SetBucketMetadataCallback(err, metadata)

Parameter

err

Error

Request error, if any.

Value may be null.

metadata

object

The bucket metadata.

SetBucketMetadataResponse

array

Property

Parameter

0

object

The bucket metadata.

SetFileMetadataCallback

SetFileMetadataCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

SetFileMetadataResponse

array

Property

Parameter

0

object

The full API response.

SetLabelsCallback

SetLabelsCallback(err, metadata)

Parameter

err

Error

Request error, if any.

Value may be null.

metadata

object

The bucket metadata.

SetLabelsResponse

array

Property

Parameter

0

object

The bucket metadata.

SetPolicyCallback

SetPolicyCallback(err, acl, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

acl

object

The policy.

apiResponse

object

The full API response.

SetPolicyResponse

array

Properties

Parameter

0

object

The policy.

1

object

The full API response.

SetStorageClassCallback

SetStorageClassCallback(err)

Parameter

err

Error

Request error, if any.

Value may be null.

SetStorageClassCallback

SetStorageClassCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

SetStorageClassResponse

array

Property

Parameter

0

object

The full API response.

StopCallback

StopCallback(err, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

StopResponse

array

Property

Parameter

0

object

The full API response.

TestIamPermissionsCallback

TestIamPermissionsCallback(err, acl, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

acl

Array of object

A subset of permissions that the caller is allowed.

apiResponse

object

The full API response.

TestIamPermissionsResponse

array

Properties

Parameter

0

Array of object

A subset of permissions that the caller is allowed.

1

object

The full API response.

UpdateAclCallback

UpdateAclCallback(err, acl, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

acl

object

The updated Acl Objects.

apiResponse

object

The full API response.

UpdateAclResponse

array

Properties

Parameter

0

object

The updated Acl Objects.

1

object

The full API response.

UploadCallback

UploadCallback(err, metadata, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

metadata

object

The uploaded File.

apiResponse

object

The full API response.

UploadResponse

array

Properties

Parameter

0

object

The uploaded File.

1

object

The full API response.