Globals
Method
Abstract types
- AddAclCallback(err, acl, apiResponse)
- AddAclResponse
- AddLifecycleRuleOptions
- BucketExistsCallback(err, exists)
- BucketExistsOptions
- BucketExistsResponse
- BucketLockCallback(err, apiResponse)
- CombineCallback(err, newFile, apiResponse)
- CombineOptions
- CombineResponse
- CopyCallback(err, copiedFile, apiResponse)
- CopyOptions
- CopyResponse
- CreateBucketCallback(err, bucket, apiResponse)
- CreateBucketRequest
- CreateBucketResponse
- CreateChannelCallback(err, channel, apiResponse)
- CreateChannelConfig
- CreateChannelOptions
- CreateChannelResponse
- CreateNotificationCallback(err, notification, apiResponse)
- CreateNotificationOptions
- CreateNotificationResponse
- CreateReadStreamOptions
- CreateResumableUploadCallback(err, uri)
- CreateResumableUploadOptions
- CreateResumableUploadResponse
- CreateWriteStreamOptions
- DeleteBucketCallback(err, apiResponse)
- DeleteBucketOptions
- DeleteBucketResponse
- DeleteFileCallback(err, apiResponse)
- DeleteFileResponse
- DeleteFilesCallback(err[, apiResponse])
- DeleteFilesOptions
- DeleteLabelsCallback(err, metadata)
- DeleteLabelsResponse
- DeleteNotificationResponse
- DisableRequesterPaysCallback(err, apiResponse)
- DisableRequesterPaysResponse
- DownloadCallback(err, contents)
- DownloadResponse
- EnableRequesterPaysCallback(err, apiResponse)
- EnableRequesterPaysResponse
- FileExistsCallback(err, exists)
- FileExistsResponse
- FileOptions
- GetAclCallback(err, acl, apiResponse)
- GetAclResponse
- GetBucketCallback(err, bucket, apiResponse)
- GetBucketMetadataCallback(err, metadata, apiResponse)
- GetBucketMetadataOptions
- GetBucketMetadataResponse
- GetBucketOptions
- GetBucketResponse
- GetBucketsCallback(err, buckets)
- GetBucketsRequest
- GetBucketsResponse
- GetExpirationDateCallback(err, expirationDate)
- GetExpirationDateResponse
- GetFileCallback(err, file, apiResponse)
- GetFileMetadataCallback(err, metadata, apiResponse)
- GetFileMetadataResponse
- GetFileResponse
- GetFilesCallback(err, files)
- GetFilesOptions
- GetFilesResponse
- GetLabelsCallback(err, labels)
- GetLabelsOptions
- GetLabelsResponse
- GetNotificationOptions
- GetNotificationsCallback(err, notifications, apiResponse)
- GetNotificationsResponse
- GetServiceAccountCallback(err, serviceAccount, apiResponse)
- GetServiceAccountResponse
- GetSignedPolicyCallback(err, policy)
- GetSignedPolicyResponse
- GetSignedUrlCallback(err, url)
- GetSignedUrlResponse
- IsPublicCallback(err, resp)
- IsPublicResponse
- MakeAllFilesPublicPrivateResponse
- MakeBucketPrivateCallback(err, files)
- MakeBucketPrivateOptions
- MakeBucketPrivateResponse
- MakeBucketPublicCallback(err, files)
- MakeBucketPublicOptions
- MakeBucketPublicResponse
- MakeFilePrivateCallback(err, apiResponse)
- MakeFilePrivateOptions
- MakeFilePrivateResponse
- MakeFilePublicCallback(err, apiResponse)
- MakeFilePublicResponse
- MoveCallback(err, destinationFile, apiResponse)
- MoveOptions
- MoveResponse
- NotificationExistsCallback(err, exists)
- NotificationExistsResponse
- RemoveAclCallback(err, apiResponse)
- RemoveAclResponse
- RotateEncryptionKeyCallback()
- RotateEncryptionKeyResponse
- SaveCallback(err)
- SaveOptions
- SetBucketMetadataCallback(err, metadata)
- SetBucketMetadataOptions
- SetBucketMetadataResponse
- SetBucketStorageClassCallback(err)
- SetBucketStorageClassOptions
- SetFileMetadataCallback(err, apiResponse)
- SetFileMetadataOptions
- SetFileMetadataResponse
- SetLabelsCallback(err, metadata)
- SetLabelsOptions
- SetLabelsResponse
- SetStorageClassCallback(err, apiResponse)
- SetStorageClassOptions
- SetStorageClassResponse
- StopCallback(err, apiResponse)
- StopResponse
- StorageOptions
- UpdateAclCallback(err, acl, apiResponse)
- UpdateAclResponse
- UploadCallback(err, file, apiResponse)
- UploadOptions
- UploadResponse
Method
objectEntries()
Flatten an object into an Array of arrays, [[key, value], ..]. Implements Object.entries() for Node.js <8
Abstract types
AddAclCallback(err, acl, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
acl |
object |
|
The Acl Objects. |
apiResponse |
object |
|
The full API response. |
AddAclResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The Acl Objects. |
1 |
object |
|
The full API response. |
AddLifecycleRuleOptions object
Configuration options for Bucket#addLifecycleRule().
Property
Name | Type | Optional | Description |
---|---|---|---|
append |
string |
Yes |
The new rules will be appended to any pre-existing rules. Defaults to |
BucketExistsCallback(err, exists)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
exists |
boolean |
|
Whether the Bucket exists. |
BucketExistsOptions object
Configuration options for Bucket#exists().
Parameter
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
BucketExistsResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
boolean |
|
Whether the Bucket exists. |
BucketLockCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
CombineCallback(err, newFile, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
newFile |
|
The new File. |
|
apiResponse |
object |
|
The full API response. |
CombineOptions object
Properties
Name | Type | Optional | Description |
---|---|---|---|
kmsKeyName |
string |
Yes |
Resource name of the Cloud KMS key, of
the form
|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
CombineResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
The new File. |
|
1 |
object |
|
The full API response. |
CopyCallback(err, copiedFile, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
copiedFile |
|
The copied File. |
|
apiResponse |
object |
|
The full API response. |
CopyOptions object
Configuration options for File#copy(). See an Object resource.
Properties
Name | Type | Optional | Description |
---|---|---|---|
destinationKmsKeyName |
string |
Yes |
Resource name of the Cloud
KMS key, of the form
|
keepAcl |
string |
Yes |
Retain the ACL for the new file. |
predefinedAcl |
string |
Yes |
Set the ACL for the new file. |
token |
string |
Yes |
A previously-returned |
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
CopyResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
The copied File. |
|
1 |
object |
|
The full API response. |
CreateBucketCallback(err, bucket, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
bucket |
|
The new Bucket. |
|
apiResponse |
object |
|
The full API response. |
CreateBucketRequest object
Metadata to set for the bucket.
Properties
Name | Type | Optional | Description |
---|---|---|---|
coldline |
boolean |
Yes |
Specify the storage class as Coldline. Defaults to |
dra |
boolean |
Yes |
Specify the storage class as Durable Reduced Availability. Defaults to |
multiRegional |
boolean |
Yes |
Specify the storage class as Multi-Regional. Defaults to |
nearline |
boolean |
Yes |
Specify the storage class as Nearline. Defaults to |
regional |
boolean |
Yes |
Specify the storage class as Regional. Defaults to |
requesterPays |
boolean |
Yes |
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. Defaults to |
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
CreateBucketResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
The new Bucket. |
|
1 |
object |
|
The full API response. |
CreateChannelCallback(err, channel, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
channel |
|
The new Channel. |
|
apiResponse |
object |
|
The full API response. |
CreateChannelConfig object
See a Objects: watchAll request body.
Property
Name | Type | Optional | Description |
---|---|---|---|
address |
string |
|
The address where notifications are delivered for this channel. |
- Extends
- WatchAllOptions
CreateChannelOptions object
Property
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
CreateChannelResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
The new Channel. |
|
1 |
object |
|
The full API response. |
CreateNotificationCallback(err, notification, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
notification |
|
The new Notification. |
|
apiResponse |
object |
|
The full API response. |
CreateNotificationOptions object
Metadata to set for the Notification.
Properties
Name | Type | Optional | Description |
---|---|---|---|
customAttributes |
object |
Yes |
An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. |
eventTypes |
Array of string |
Yes |
If present, only send notifications about listed event types. If empty, sent notifications for all event types. |
objectNamePrefix |
string |
Yes |
If present, only apply this notification configuration to object names that begin with this prefix. |
payloadFormat |
string |
Yes |
The desired content of the Payload.
Defaults to
|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
CreateNotificationResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
The new Notification. |
|
1 |
object |
|
The full API response. |
CreateReadStreamOptions object
Configuration options for File#createReadStream.
Properties
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
validation |
(string or boolean) |
Yes |
Possible values: |
start |
number |
Yes |
A byte offset to begin the file's download
from. Default is 0. NOTE: Byte ranges are inclusive; that is,
|
end |
number |
Yes |
A byte offset to stop reading the file at.
NOTE: Byte ranges are inclusive; that is, |
CreateResumableUploadCallback(err, uri)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
uri |
string |
|
The resumable upload's unique session URI. |
CreateResumableUploadOptions object
Properties
Name | Type | Optional | Description |
---|---|---|---|
metadata |
object |
Yes |
Metadata to set on the file. |
origin |
string |
Yes |
Origin header to set for the upload. |
predefinedAcl |
string |
Yes |
Apply a predefined set of access controls to this object.
get |
private |
boolean |
Yes |
Make the uploaded file private. (Alias for
|
public |
boolean |
Yes |
Make the uploaded file public. (Alias for
|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
CreateResumableUploadResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
string |
|
The resumable upload's unique session URI. |
CreateWriteStreamOptions object
Configuration options for File#createWriteStream().
Properties
Name | Type | Optional | Description |
---|---|---|---|
contentType |
string |
Yes |
Alias for
|
gzip |
(string or boolean) |
Yes |
If true, automatically gzip the file.
If set to |
metadata |
object |
Yes |
See the examples below or Objects: insert request body for more details. |
offset |
number |
Yes |
The starting byte of the upload stream, for resuming an interrupted upload. Defaults to 0. |
predefinedAcl |
string |
Yes |
Apply a predefined set of access controls to this object.
get |
private |
boolean |
Yes |
Make the uploaded file private. (Alias for
|
public |
boolean |
Yes |
Make the uploaded file public. (Alias for
|
resumable |
boolean |
Yes |
Force a resumable upload. NOTE: When working with streams, the file format and size is unknown until it's completely consumed. Because of this, it's best for you to be explicit for what makes sense given your input. |
uri |
string |
Yes |
The URI for an already-created resumable upload. See File#createResumableUpload. |
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
validation |
(string or boolean) |
Yes |
Possible values: |
DeleteBucketCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
DeleteBucketOptions object
Configuration options.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
DeleteBucketResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
DeleteFileCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
DeleteFileResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
DeleteFilesCallback(err[, apiResponse])
Parameters
Name | Type | Optional | Description |
---|---|---|---|
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 |
Yes |
The full API response. |
DeleteFilesOptions object
Query object. See Bucket#getFiles for all of the supported properties.
Property
Name | Type | Optional | Description |
---|---|---|---|
force |
boolean |
Yes |
Suppress errors until all files have been processed. |
DeleteLabelsCallback(err, metadata)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
metadata |
object |
|
Bucket's metadata. |
DeleteLabelsResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
DeleteNotificationResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
DisableRequesterPaysCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
DisableRequesterPaysResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
DownloadCallback(err, contents)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
|
|
Request error, if any. |
contents |
|
|
The contents of a File. |
DownloadResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
Yes |
The contents of a File. |
EnableRequesterPaysCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
EnableRequesterPaysResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
FileExistsCallback(err, exists)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
exists |
boolean |
|
Whether the File exists. |
FileExistsResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
boolean |
|
Whether the File exists. |
FileOptions object
Options passed to the File constructor.
Properties
Name | Type | Optional | Description |
---|---|---|---|
encryptionKey |
string |
Yes |
A custom encryption key. |
generation |
number |
Yes |
Generation to scope the file to. |
kmsKeyName |
string |
Yes |
Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. Limited availability; usable only by enabled projects. |
userProject |
string |
Yes |
The ID of the project which will be billed for all requests made from File object. |
GetAclCallback(err, acl, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
acl |
(object or Array of object) |
|
Single or array of Acl Objects. |
apiResponse |
object |
|
The full API response. |
GetAclResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
(object or Array of object) |
|
Single or array of Acl Objects. |
1 |
object |
|
The full API response. |
GetBucketCallback(err, bucket, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
bucket |
|
The Bucket. |
|
apiResponse |
object |
|
The full API response. |
GetBucketMetadataCallback(err, metadata, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
metadata |
object |
|
The bucket metadata. |
apiResponse |
object |
|
The full API response. |
GetBucketMetadataOptions object
Configuration options for Bucket#getMetadata().
Property
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
GetBucketMetadataResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The bucket metadata. |
1 |
object |
|
The full API response. |
GetBucketOptions object
Configuration options for Bucket#get()
Properties
Name | Type | Optional | Description |
---|---|---|---|
autoCreate |
boolean |
Yes |
Automatically create the object if
it does not exist. Default: |
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
GetBucketResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
The Bucket. |
|
1 |
object |
|
The full API response. |
GetBucketsCallback(err, buckets)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
buckets |
Array of Bucket |
|
Array of Bucket instances. |
GetBucketsRequest object
Query object for listing buckets.
Properties
Name | Type | Optional | Description |
---|---|---|---|
autoPaginate |
boolean |
Yes |
Have pagination handled automatically. Defaults to |
maxApiCalls |
number |
Yes |
Maximum number of API calls to make. |
maxResults |
number |
Yes |
Maximum number of items plus prefixes to return. |
pageToken |
string |
Yes |
A previously-returned page token representing part of the larger set of results to view. |
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
GetBucketsResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
Array of Bucket |
|
Array of Bucket instances. |
GetExpirationDateCallback(err, expirationDate)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
expirationDate |
date |
|
A Date object representing the earliest time this file's retention policy will expire. |
GetExpirationDateResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
date |
|
A Date object representing the earliest time this file's retention policy will expire. |
GetFileCallback(err, file, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
file |
|
The File. |
|
apiResponse |
object |
|
The full API response. |
GetFileMetadataCallback(err, metadata, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
metadata |
object |
|
The File metadata. |
apiResponse |
object |
|
The full API response. |
GetFileMetadataResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The File metadata. |
1 |
object |
|
The full API response. |
GetFileResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
The File. |
|
1 |
object |
|
The full API response. |
GetFilesCallback(err, files)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
files |
Array of File |
|
Array of File instances. |
GetFilesOptions object
Query object for listing files.
Properties
Name | Type | Optional | Description |
---|---|---|---|
autoPaginate |
boolean |
Yes |
Have pagination handled automatically. Defaults to |
delimiter |
string |
Yes |
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 |
directory |
string |
Yes |
Filter results based on a directory name, or more technically, a "prefix". |
prefix |
string |
Yes |
Filter results to objects whose names begin with this prefix. |
maxApiCalls |
number |
Yes |
Maximum number of API calls to make. |
maxResults |
number |
Yes |
Maximum number of items plus prefixes to return. |
pageToken |
string |
Yes |
A previously-returned page token representing part of the larger set of results to view. |
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
versions |
boolean |
Yes |
If true, returns File objects scoped to their versions. |
GetFilesResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
Array of File |
|
Array of File instances. |
GetLabelsCallback(err, labels)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
labels |
object |
|
Object of labels currently set on this bucket. |
GetLabelsOptions object
Configuration options for Bucket#getLabels().
Parameter
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
GetLabelsResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
Object of labels currently set on this bucket. |
GetNotificationOptions object
Configuration options for Bucket#getNotification().
Property
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
GetNotificationsCallback(err, notifications, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
notifications |
Array of Notification |
|
Array of Notification instances. |
apiResponse |
object |
|
The full API response. |
GetNotificationsResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
Array of Notification |
|
Array of Notification instances. |
1 |
object |
|
The full API response. |
GetServiceAccountCallback(err, serviceAccount, apiResponse)
Parameters
Name | Type | Optional | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
||||||||
serviceAccount |
object |
|
The serviceAccount resource. Values in
|
||||||||
apiResponse |
object |
|
The full API response. |
GetServiceAccountResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The service account resource. |
1 |
object |
|
The full API response. |
GetSignedPolicyCallback(err, policy)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
policy |
object |
|
The document policy. |
GetSignedPolicyResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The document policy. |
GetSignedUrlCallback(err, url)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
url |
object |
|
The signed URL. |
GetSignedUrlResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The signed URL. |
IsPublicCallback(err, resp)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
resp |
boolean |
|
Whether file is public or not. |
IsPublicResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
boolean |
|
Whether file is public or not. |
MakeAllFilesPublicPrivateResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
Array of File |
|
List of files affected. |
MakeBucketPrivateCallback(err, files)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
files |
Array of File |
|
List of files made private. |
MakeBucketPrivateOptions object
Parameters
Name | Type | Optional | Description |
---|---|---|---|
includeFiles |
boolean |
Yes |
Make each file in the bucket private. Defaults to |
force |
boolean |
Yes |
Queue errors occurred while making files private until all files have been processed. |
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
MakeBucketPrivateResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
Array of File |
|
List of files made private. |
MakeBucketPublicCallback(err, files)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
files |
Array of File |
|
List of files made public. |
MakeBucketPublicOptions object
Parameters
Name | Type | Optional | Description |
---|---|---|---|
includeFiles |
boolean |
Yes |
Make each file in the bucket private. Defaults to |
force |
boolean |
Yes |
Queue errors occurred while making files private until all files have been processed. |
MakeBucketPublicResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
Array of File |
|
List of files made public. |
MakeFilePrivateCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
MakeFilePrivateOptions object
Configuration options for File#makePrivate().
Properties
Name | Type | Optional | Description |
---|---|---|---|
strict |
boolean |
Yes |
If true, set the file to be private to only the owner user. Otherwise, it will be private to the project. |
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
MakeFilePrivateResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
MakeFilePublicCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
MakeFilePublicResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
MoveCallback(err, destinationFile, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
destinationFile |
|
The destination File. Value can be null. |
|
apiResponse |
object |
|
The full API response. |
MoveOptions object
Configuration options for File#move(). See an Object resource.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
MoveResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
|
The destination File. |
|
1 |
object |
|
The full API response. |
NotificationExistsCallback(err, exists)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
exists |
boolean |
|
Whether the notification exists or not. |
NotificationExistsResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
boolean |
|
Whether the notification exists or not. |
RemoveAclCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
RemoveAclResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
RotateEncryptionKeyCallback()
- Extends
- CopyCallback
RotateEncryptionKeyResponse
- Extends
- CopyResponse
SaveCallback(err)
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
SaveOptions object
- Extends
- CreateWriteStreamOptions
SetBucketMetadataCallback(err, metadata)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
metadata |
object |
|
The bucket metadata. |
SetBucketMetadataOptions object
Configuration options for Bucket#setMetadata().
Property
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
SetBucketMetadataResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
apiResponse |
object |
|
The full API response. |
SetBucketStorageClassCallback(err)
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
SetBucketStorageClassOptions object
Parameter
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
SetFileMetadataCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
SetFileMetadataOptions object
Configuration options for File#setMetadata().
Parameter
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
SetFileMetadataResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
SetLabelsCallback(err, metadata)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
metadata |
object |
|
The bucket metadata. |
SetLabelsOptions object
Configuration options for Bucket#setLabels().
Property
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
SetLabelsResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The bucket metadata. |
SetStorageClassCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
SetStorageClassOptions object
Configuration options for File#setStorageClass().
Property
Name | Type | Optional | Description |
---|---|---|---|
userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
SetStorageClassResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
StopCallback(err, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
apiResponse |
object |
|
The full API response. |
StopResponse array
Property
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The full API response. |
StorageOptions object
Properties
Name | Type | Optional | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
projectId |
string |
Yes |
The project ID from the Google Developer's
Console, e.g. 'grape-spaceship-123'. We will also check the environment
variable |
||||||||||||
keyFilename |
string |
Yes |
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 |
||||||||||||
|
string |
Yes |
Account email address. Required when using a .pem or .p12 keyFilename. |
||||||||||||
credentials |
object |
Yes |
Credentials object. Values in
|
||||||||||||
autoRetry |
boolean |
Yes |
Automatically retry requests if the response is related to rate limits or certain intermittent server errors. We will exponentially backoff subsequent requests by default. Defaults to |
||||||||||||
maxRetries |
number |
Yes |
Maximum number of automatic retries attempted before returning the error. Defaults to |
||||||||||||
promise |
Constructor |
Yes |
Custom promise module to use instead of native Promises. |
UpdateAclCallback(err, acl, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
acl |
object |
|
The updated Acl Objects. |
apiResponse |
object |
|
The full API response. |
UpdateAclResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The updated Acl Objects. |
1 |
object |
|
The full API response. |
UploadCallback(err, file, apiResponse)
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
Error |
|
Request error, if any. Value can be null. |
file |
object |
|
The uploaded File. |
apiResponse |
object |
|
The full API response. |
UploadOptions object
Configuration options for Bucket#upload().
Parameters
Name | Type | Optional | Description |
---|---|---|---|
options.destination |
(string or File) |
Yes |
The place to save your file. If given a string, the file will be uploaded to the bucket using the string as a filename. When given a File object, your local file will be uploaded to the File object's bucket and under the File object's name. Lastly, when this argument is omitted, the file is uploaded to your bucket using the name of the local file. |
options.encryptionKey |
string |
Yes |
A custom encryption key. See Customer-supplied Encryption Keys. |
options.gzip |
boolean |
Yes |
Automatically gzip the file. This will set
|
options.kmsKeyName |
string |
Yes |
The name of the Cloud KMS key that will
be used to encrypt the object. Must be in the format:
|
options.metadata |
object |
Yes |
See an Objects: insert request body. |
options.offset |
string |
Yes |
The starting byte of the upload stream, for resuming an interrupted upload. Defaults to 0. |
options.predefinedAcl |
string |
Yes |
Apply a predefined set of access controls to this object.
get |
options.private |
boolean |
Yes |
Make the uploaded file private. (Alias for
|
options.public |
boolean |
Yes |
Make the uploaded file public. (Alias for
|
options.resumable |
boolean |
Yes |
Force a resumable upload. (default: true for files larger than 5 MB). |
options.uri |
string |
Yes |
The URI for an already-created resumable upload. See File#createResumableUpload. |
options.userProject |
string |
Yes |
The ID of the project which will be billed for the request. |
options.validation |
(string or boolean) |
Yes |
Possible values: |
UploadResponse array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
object |
|
The uploaded File. |
1 |
object |
|
The full API response. |