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 Enable billing the requesting user's project.

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.

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.

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, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

buckets

Array of Bucket

Array of Bucket instances.

apiResponse

object

The full API response.

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.

GetBucketsResponse

array

Properties

Parameter

0

Array of Bucket

Array of Bucket instances.

1

object

The full API response.

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, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

files

Array of File

Array of File instances.

apiResponse

object

The full API response.

GetFilesRequest

object

Query object for listing files.

Properties

Parameter

autoPaginate

Optional

boolean

Have pagination handled automatically. Default: true.

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

boolean

If this bucket has requesterPays functionality enabled (see Bucket#enableRequesterPays), set this value to the project which should be billed for this operation.

versions

Optional

boolean

If true, returns File objects scoped to their versions.

GetFilesResponse

array

Properties

Parameter

0

Array of File

Array of File instances.

1

object

The full API response.

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.

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.

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.

RemoveAclCallback

RemoveAclCallback(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.

RemoveAclResponse

array

Properties

Parameter

0

object

The Acl Objects.

1

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, apiResponse)

Parameter

err

Error

Request error, if any.

Value may be null.

apiResponse

object

The full API response.

SetStorageClassCallback

SetStorageClassCallback(err)

Parameter

err

Error

Request error, if any.

Value may be null.

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.