Members
(constant) AUTO_RETRY_DEFAULT :boolean
Default behavior: Automatically retry retriable server errors.
(constant) CRC32C_EXTENSIONS
Ported from github.com/google/crc32c
(constant) DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT
Default number of concurrently executing promises to use when calling downloadFileInChunks.
(constant) DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT
Default number of concurrently executing promises to use when calling uploadFileInChunks.
(constant) DEFAULT_PARALLEL_DOWNLOAD_LIMIT
Default number of concurrently executing promises to use when calling downloadManyFiles.
(constant) DEFAULT_PARALLEL_UPLOAD_LIMIT
Default number of concurrently executing promises to use when calling uploadManyFiles.
(constant) DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE
The chunk size in bytes to use when calling downloadFileInChunks.
(constant) DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD
The minimum size threshold in bytes at which to apply a chunked download strategy when calling downloadFileInChunks.
(constant) GCCL_GCS_CMD_FEATURE
The gccl-gcs-cmd
value for the X-Goog-API-Client
header.
Example: gccl-gcs-cmd/tm.upload_many
- See:
-
- GCCL_GCS_CMD.
- GCCL_GCS_CMD_KEY.
GCCL_GCS_CMD_KEY
A unique symbol for providing a gccl-gcs-cmd
value
for the X-Goog-API-Client
header.
E.g. the V
in X-Goog-API-Client: gccl-gcs-cmd/V
(constant) MAX_RETRY_DEFAULT :number
Default behavior: Only attempt to retry retriable errors 3 times.
(constant) MAX_RETRY_DELAY_DEFAULT :number
Default behavior: Wait no more than 64 seconds between retries.
(constant) PATH_STYLED_HOST :string
(constant) RETRYABLE_ERR_FN_DEFAULT
Returns true if the API request should be retried, given the error that was given the first time the request was attempted.
(constant) RETRY_DELAY_MULTIPLIER_DEFAULT :number
Default behavior: Wait twice as long as previous retry before retrying.
STORAGE_POST_POLICY_BASE_URL
(constant) TOTAL_TIMEOUT_DEFAULT :number
Default behavior: If the operation doesn't succeed after 600 seconds, stop retrying.
(constant) UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE
The chunk size in bytes to use when calling uploadFileInChunks.
Methods
checkUploadStatus(cfg)
Check the status of an existing resumable upload.
Parameters:
Name | Type | Description |
---|---|---|
cfg |
A configuration to use. |
Returns:
Type | Description |
---|---|
the current upload status |
convertObjKeysToSnakeCase(obj) → {object}
Converts the given objects keys to snake_case
Parameters:
Name | Type | Description |
---|---|---|
obj |
object |
object to convert keys to snake case. |
Returns:
Type | Description |
---|---|
object |
object with keys converted to snake case. |
encodeURI(uri, booleanopt) → {string}
URI encode uri
for generating signed URLs, using fixedEncodeURIComponent.
Encode every byte except A-Z a-Z 0-9 ~ - . _
.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
uri |
string |
The URI to encode. |
||
boolean |
<optional> |
false |
encodeSlash If |
Returns:
Type | Description |
---|---|
string |
The encoded string. |
fixedEncodeURIComponent(str) → {string}
Encode str
with encodeURIComponent, plus these
reserved characters: ! * ' ( )
.
Parameters:
Name | Type | Description |
---|---|---|
str |
string |
The URI component to encode. |
Returns:
Type | Description |
---|---|
string |
The encoded string. |
formatAsUTCISO(dateTimeToFormat, includeTime, dateDelimiter, timeDelimiter) → {string}
Formats the provided date object as a UTC ISO string.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
dateTimeToFormat |
Date |
date object to be formatted. |
|
includeTime |
boolean | false |
flag to include hours, minutes, seconds in output. |
dateDelimiter |
string |
delimiter between date components. |
|
timeDelimiter |
string |
delimiter between time components. |
Returns:
Type | Description |
---|---|
string |
UTC ISO format of provided date obect. |
getRuntimeTrackingString() → {string}
Examines the runtime environment and returns the appropriate tracking string.
Returns:
Type | Description |
---|---|
string |
metrics tracking string based on the current runtime environment. |
getUserAgentString() → {string}
Looks at package.json and creates the user-agent string to be applied to request headers.
Returns:
Type | Description |
---|---|
string |
user agent string. |
objectEntries()
Flatten an object into an Array of arrays, [[key, value], ..]. Implements Object.entries() for Node.js <8
qsStringify(url) → {string}
Serialize an object to a URL query string using util.encodeURI(uri, true).
Parameters:
Name | Type | Description |
---|---|---|
url |
string |
The object to serialize. |
Returns:
Type | Description |
---|---|
string |
Serialized string. |
unicodeJSONStringify(obj) → {string}
JSON encode str, with unicode \u+ representation.
Parameters:
Name | Type | Description |
---|---|---|
obj |
object |
The object to encode. |
Returns:
Type | Description |
---|---|
string |
Serialized string. |
Type Definitions
AddAclCallback(errnullable, acl, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
acl |
object |
The Acl Objects. |
|
apiResponse |
object |
The full API response. |
AddAclResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The Acl Objects. |
1 |
object |
The full API response. |
AddLifecycleRuleOptions
Configuration options for Bucket#addLifecycleRule().
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
append |
boolean |
<optional> |
true |
The new rules will be appended to any pre-existing rules. |
BucketExistsCallback(errnullable, exists)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
exists |
boolean |
Whether the Bucket exists. |
BucketExistsOptions
Configuration options for Bucket#exists().
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
BucketExistsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
boolean |
Whether the Bucket exists. |
BucketLockCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
CRC32CValidator
Properties:
Type | Description |
---|---|
Crc32cGeneratorToStringCallback | |
Crc32cGeneratorValidateCallback | |
Crc32cGeneratorUpdateCallback |
CRC32CValidator
Properties:
Type | Description |
---|---|
Crc32cGeneratorToStringCallback | |
Crc32cGeneratorValidateCallback | |
Crc32cGeneratorUpdateCallback |
CRC32CValidator
Properties:
Type | Description |
---|---|
Crc32cGeneratorToStringCallback | |
Crc32cGeneratorValidateCallback | |
Crc32cGeneratorUpdateCallback |
CombineCallback(errnullable, newFile, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
newFile |
File |
The new File. |
|
apiResponse |
object |
The full API response. |
CombineOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
kmsKeyName |
string |
<optional> |
Resource name of the Cloud KMS key, of
the form
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
CombineResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
File |
The new File. |
1 |
object |
The full API response. |
CopyCallback(errnullable, copiedFile, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
copiedFile |
File |
The copied File. |
|
apiResponse |
object |
The full API response. |
CopyOptions
Configuration options for File#copy(). See an Object resource.
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
cacheControl |
string |
<optional> |
The cacheControl setting for the new file. |
contentEncoding |
string |
<optional> |
The contentEncoding setting for the new file. |
contentType |
string |
<optional> |
The contentType setting for the new file. |
destinationKmsKeyName |
string |
<optional> |
Resource name of the Cloud
KMS key, of the form
|
metadata |
Metadata |
<optional> |
Metadata to specify on the copied file. |
predefinedAcl |
string |
<optional> |
Set the ACL for the new file. |
token |
string |
<optional> |
A previously-returned |
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
CopyResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
File |
The copied File. |
1 |
object |
The full API response. |
Cors
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
maxAgeSeconds |
number |
<optional> |
The number of seconds the browser is allowed to make requests before it must repeat the preflight request. |
method |
Array.<string> |
<optional> |
HTTP method allowed for cross origin resource sharing with this bucket. |
origin |
Array.<string> |
<optional> |
an origin allowed for cross origin resource sharing with this bucket. |
responseHeader |
Array.<string> |
<optional> |
A header allowed for cross origin resource sharing with this bucket. |
Crc32cGeneratorCallback() → {CRC32CValidator}
Returns:
Type | Description |
---|---|
CRC32CValidator |
Crc32cGeneratorCallback() → {CRC32CValidator}
Returns:
Type | Description |
---|---|
CRC32CValidator |
Crc32cGeneratorToStringCallback() → {string}
Returns:
Type | Description |
---|---|
string |
Example
Hashing the string 'data' should return 'rth90Q=='
```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.toString(); // 'rth90Q=='
```
Crc32cGeneratorToStringCallback() → {string}
Returns:
Type | Description |
---|---|
string |
Example
Hashing the string 'data' should return 'rth90Q=='
```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.toString(); // 'rth90Q=='
```
Crc32cGeneratorToStringCallback() → {string}
Returns:
Type | Description |
---|---|
string |
Example
Hashing the string 'data' should return 'rth90Q=='
```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.toString(); // 'rth90Q=='
```
Crc32cGeneratorUpdateCallback(dataopt) → {undefined}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer |
<optional> |
data to update CRC32C value with |
Returns:
Type | Description |
---|---|
undefined |
Example
Hashing buffers from 'some ' and 'text\n'
```js
const buffer1 = Buffer.from('some ');
crc32c.update(buffer1);
const buffer2 = Buffer.from('text\n');
crc32c.update(buffer2);
crc32c.toString(); // 'DkjKuA=='
```
Crc32cGeneratorUpdateCallback(dataopt) → {undefined}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer |
<optional> |
data to update CRC32C value with |
Returns:
Type | Description |
---|---|
undefined |
Example
Hashing buffers from 'some ' and 'text\n'
```js
const buffer1 = Buffer.from('some ');
crc32c.update(buffer1);
const buffer2 = Buffer.from('text\n');
crc32c.update(buffer2);
crc32c.toString(); // 'DkjKuA=='
```
Crc32cGeneratorUpdateCallback(dataopt) → {undefined}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer |
<optional> |
data to update CRC32C value with |
Returns:
Type | Description |
---|---|
undefined |
Example
Hashing buffers from 'some ' and 'text\n'
```js
const buffer1 = Buffer.from('some ');
crc32c.update(buffer1);
const buffer2 = Buffer.from('text\n');
crc32c.update(buffer2);
crc32c.toString(); // 'DkjKuA=='
```
Crc32cGeneratorValidateCallback(valueopt) → {boolean}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
string |
<optional> |
base64-encoded CRC32C string to validate |
Returns:
Type | Description |
---|---|
boolean |
Example
Should return `true` if the value matches, `false` otherwise
```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.validate('DkjKuA=='); // false
crc32c.validate('rth90Q=='); // true
```
Crc32cGeneratorValidateCallback(valueopt) → {boolean}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
string |
<optional> |
base64-encoded CRC32C string to validate |
Returns:
Type | Description |
---|---|
boolean |
Example
Should return `true` if the value matches, `false` otherwise
```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.validate('DkjKuA=='); // false
crc32c.validate('rth90Q=='); // true
```
Crc32cGeneratorValidateCallback(valueopt) → {boolean}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
string |
<optional> |
base64-encoded CRC32C string to validate |
Returns:
Type | Description |
---|---|
boolean |
Example
Should return `true` if the value matches, `false` otherwise
```js
const buffer = Buffer.from('data');
crc32c.update(buffer);
crc32c.validate('DkjKuA=='); // false
crc32c.validate('rth90Q=='); // true
```
CreateBucketCallback(errnullable, bucket, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
bucket |
Bucket |
The new Bucket. |
|
apiResponse |
object |
The full API response. |
CreateBucketRequest
Metadata to set for the bucket.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
archive |
boolean |
<optional> |
false |
Specify the storage class as Archive. |
autoclass.enabled |
object |
<optional> |
false |
Specify whether Autoclass is enabled for the bucket. |
autoclass.terminalStorageClass |
object |
<optional> |
'NEARLINE' |
The storage class that objects in an Autoclass bucket eventually transition to if they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE. |
coldline |
boolean |
<optional> |
false |
Specify the storage class as Coldline. |
cors |
Array.<Cors> |
<optional> |
[] |
Specify the CORS configuration to use. |
customPlacementConfig |
CustomPlacementConfig |
<optional> |
{} |
Specify the bucket's regions for dual-region buckets. For more information, see Bucket Locations. |
dra |
boolean |
<optional> |
false |
Specify the storage class as Durable Reduced Availability. |
enableObjectRetention |
boolean |
<optional> |
false |
Specifiy whether or not object retention should be enabled on this bucket. |
hierarchicalNamespace.enabled |
object |
<optional> |
false |
Specify whether or not to enable hierarchical namespace on this bucket. |
location |
string |
<optional> |
Specify the bucket's location. If specifying
a dual-region, the |
|
multiRegional |
boolean |
<optional> |
false |
Specify the storage class as Multi-Regional. |
nearline |
boolean |
<optional> |
false |
Specify the storage class as Nearline. |
regional |
boolean |
<optional> |
false |
Specify the storage class as Regional. |
requesterPays |
boolean |
<optional> |
false |
Force the use of the User Project metadata field to assign operational costs when an operation is made on a Bucket and its objects. |
rpo |
string |
<optional> |
For dual-region buckets, controls whether turbo
replication is enabled ( |
|
standard |
boolean |
<optional> |
true |
Specify the storage class as Standard. |
storageClass |
string |
<optional> |
The new storage class. ( |
|
versioning |
Versioning |
<optional> |
Specify the versioning status. |
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
CreateBucketResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Bucket |
The new Bucket. |
1 |
object |
The full API response. |
CreateChannelCallback(errnullable, channel, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
channel |
Channel |
The new Channel. |
|
apiResponse |
object |
The full API response. |
CreateChannelConfig
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
address |
string |
The address where notifications are delivered for this channel. |
||
delimiter |
string |
<optional> |
Returns results in a directory-like mode. |
|
maxResults |
number |
<optional> |
Maximum number of |
|
pageToken |
string |
<optional> |
A previously-returned page token representing part of the larger set of results to view. |
|
prefix |
string |
<optional> |
Filter results to objects whose names begin with this prefix. |
|
projection |
string |
<optional> |
noAcl |
Set of properties to return. |
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
|
versions |
boolean |
<optional> |
false |
If |
CreateChannelOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
CreateChannelResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Channel |
The new Channel. |
1 |
object |
The full API response. |
CreateHmacKeyCallback(errnullable, hmacKey, secret, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
hmacKey |
HmacKey |
The HmacKey instance created from API response. |
|
secret |
string |
The HMAC key's secret used to access the XML API. |
|
apiResponse |
object |
The raw API response. |
CreateHmacKeyOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
projectId |
string |
<optional> |
The project ID of the project that owns the service account of the requested HMAC key. If not provided, the project ID used to instantiate the Storage client will be used. |
userProject |
string |
<optional> |
This parameter is currently ignored. |
CreateHmacKeyResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
HmacKey |
The HmacKey instance created from API response. |
1 |
string |
The HMAC key's secret used to access the XML API. |
3 |
object |
The raw API response. |
CreateNotificationCallback(errnullable, notification, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
notification |
Notification |
The new Notification. |
|
apiResponse |
object |
The full API response. |
CreateNotificationOptions
Metadata to set for the Notification.
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
customAttributes |
object |
<optional> |
An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. |
eventTypes |
Array.<string> |
<optional> |
If present, only send notifications about listed event types. If empty, sent notifications for all event types. |
objectNamePrefix |
string |
<optional> |
If present, only apply this notification configuration to object names that begin with this prefix. |
payloadFormat |
string |
<optional> |
The desired content of the Payload.
Defaults to Acceptable values are:
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
CreateNotificationResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Notification |
The new Notification. |
1 |
object |
The full API response. |
CreateReadStreamOptions
Configuration options for File#createReadStream.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
|
validation |
string | boolean |
<optional> |
Possible values: |
|
start |
number |
<optional> |
A byte offset to begin the file's download
from. Default is 0. NOTE: Byte ranges are inclusive; that is,
|
|
end |
number |
<optional> |
A byte offset to stop reading the file at.
NOTE: Byte ranges are inclusive; that is, |
|
decompress |
boolean |
<optional> |
true |
Disable auto decompression of the
received data. By default this option is set to |
CreateResumableUploadCallback(errnullable, uri)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
uri |
string |
The resumable upload's unique session URI. |
CreateResumableUploadOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
metadata |
object |
<optional> |
Metadata to set on the file. |
offset |
number |
<optional> |
The starting byte of the upload stream for resuming an interrupted upload. |
origin |
string |
<optional> |
Origin header to set for the upload. |
predefinedAcl |
string |
<optional> |
Apply a predefined set of access controls to this object. Acceptable values are:
|
private |
boolean |
<optional> |
Make the uploaded file private. (Alias for
|
public |
boolean |
<optional> |
Make the uploaded file public. (Alias for
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
chunkSize |
string |
<optional> |
Create a separate request per chunk. This value is in bytes and should be a multiple of 256 KiB (2^18). We recommend using at least 8 MiB for the chunk size. |
CreateResumableUploadResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
string |
The resumable upload's unique session URI. |
CreateWriteStreamOptions
Configuration options for File#createWriteStream().
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
contentType |
string |
<optional> |
Alias for
|
|
gzip |
string | boolean |
<optional> |
If true, automatically gzip the file.
If set to |
|
metadata |
object |
<optional> |
See the examples below or Objects: insert request body for more details. |
|
offset |
number |
<optional> |
The starting byte of the upload stream, for resuming an interrupted upload. Defaults to 0. |
|
predefinedAcl |
string |
<optional> |
Apply a predefined set of access controls to this object. Acceptable values are:
|
|
private |
boolean |
<optional> |
Make the uploaded file private. (Alias for
|
|
public |
boolean |
<optional> |
Make the uploaded file public. (Alias for
|
|
resumable |
boolean |
<optional> |
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. |
|
timeout |
number |
<optional> |
60000 |
Set the HTTP request timeout in
milliseconds. This option is not available for resumable uploads.
Default: |
uri |
string |
<optional> |
The URI for an already-created resumable upload. See File#createResumableUpload. |
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
|
validation |
string | boolean |
<optional> |
Possible values: |
DeleteBucketCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
DeleteBucketResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
DeleteFileCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
DeleteFileResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
DeleteFilesCallback(err, apiResponseopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error | ?Array.<Error> |
Request error, if any, or array of errors from files that were not able to be deleted. |
|
apiResponse |
object |
<optional> |
The full API response. |
DeleteFilesOptions
Query object. See Bucket#getFiles for all of the supported properties.
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
force |
boolean |
<optional> |
Suppress errors until all files have been processed. |
DeleteHmacKeyCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
DeleteHmacKeyOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
This parameter is currently ignored. |
DeleteHmacKeyResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
DeleteLabelsCallback(errnullable, metadata)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
metadata |
object |
Bucket's metadata. |
DeleteLabelsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
DeleteNotificationResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
DisableRequesterPaysCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
DisableRequesterPaysResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
DownloadCallback(err, contents)
Parameters:
Name | Type | Description |
---|---|---|
err |
Request error, if any. |
|
contents |
The contents of a File. |
DownloadFileInChunksOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
concurrencyLimit |
number |
<optional> |
The number of concurrently executing promises to use when downloading the file. |
chunkSizeBytes |
number |
<optional> |
The size in bytes of each chunk to be downloaded. |
validation |
string | boolean |
<optional> |
Whether or not to perform a CRC32C validation check when download is complete. |
noReturnData |
boolean |
<optional> |
Whether or not to return the downloaded data. A |
DownloadManyFilesOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
concurrencyLimit |
number |
<optional> |
The number of concurrently executing promises to use when downloading the files. |
prefix |
string |
<optional> |
A prefix to append to all of the downloaded files. |
stripPrefix |
string |
<optional> |
A prefix to remove from all of the downloaded files. |
passthroughOptions |
object |
<optional> |
DownloadOptions Options to be passed through to each individual download operation. |
DownloadResponse
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
0 |
<optional> |
The contents of a File. |
EnableLoggingOptions
Configuration object for enabling logging.
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
bucket |
string | Bucket |
<optional> |
The bucket for the log entries. By default, the current bucket is used. |
prefix |
string |
A unique prefix for log object names. |
EnableRequesterPaysCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
EnableRequesterPaysResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
Expr
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
title |
string |
<optional> |
An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. |
description |
string |
<optional> |
An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. |
expression |
string |
Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.The condition that is associated with this binding. |
- See:
-
-
[Condition] https://cloud.google.com/storage/docs/access-control/iam#conditions
-
FileExistsCallback(errnullable, exists)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
exists |
boolean |
Whether the File exists. |
FileExistsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
boolean |
Whether the File exists. |
FileOptions
Options passed to the File constructor.
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
encryptionKey |
string |
<optional> |
A custom encryption key. |
generation |
number |
<optional> |
Generation to scope the file to. |
kmsKeyName |
string |
<optional> |
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 |
<optional> |
The ID of the project which will be billed for all requests made from File object. |
callback |
Crc32cGeneratorCallback |
<optional> |
A function that generates a CRC32C Validator. Defaults to CRC32C |
GenerateSignedPostPolicyV2Callback(errnullable, policy)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
policy |
object |
The document policy. |
GenerateSignedPostPolicyV2Response
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The document policy. |
GenerateSignedPostPolicyV4Callback(errnullable, output)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
output |
SignedPostPolicyV4Output |
An object containing the request URL and form fields. |
GenerateSignedPostPolicyV4Response
Properties:
Name | Type | Description |
---|---|---|
0 |
SignedPostPolicyV4Output |
An object containing the request URL and form fields. |
GetAclCallback(errnullable, acl, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
acl |
object | Array.<object> |
Single or array of Acl Objects. |
|
apiResponse |
object |
The full API response. |
GetAclResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object | Array.<object> |
Single or array of Acl Objects. |
1 |
object |
The full API response. |
GetBucketCallback(errnullable, bucket, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
bucket |
Bucket |
The Bucket. |
|
apiResponse |
object |
The full API response. |
GetBucketMetadataCallback(errnullable, metadata, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
metadata |
object |
The bucket metadata. |
|
apiResponse |
object |
The full API response. |
GetBucketMetadataOptions
Configuration options for Bucket#getMetadata().
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
GetBucketMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The bucket metadata. |
1 |
object |
The full API response. |
GetBucketOptions
Configuration options for Bucket#get()
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
autoCreate |
boolean |
<optional> |
Automatically create the object if
it does not exist. Default: |
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
GetBucketResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Bucket |
The Bucket. |
1 |
object |
The full API response. |
GetBucketSignedUrlConfig
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
action |
string |
Only listing objects within a bucket (HTTP: GET) is supported for bucket-level signed URLs. |
||
expires |
* |
A timestamp when this link will expire. Any value
given is passed to |
||
version |
string |
<optional> |
'v2' |
The signing version to use, either 'v2' or 'v4'. |
virtualHostedStyle |
boolean |
<optional> |
false |
Use virtual hosted-style
URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style
('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs
should generally be preferred instaed of path-style URL.
Currently defaults to |
cname |
string |
<optional> |
The cname for this bucket, i.e., "https://cdn.example.com". See reference |
|
extensionHeaders |
object |
<optional> |
If these headers are used, the server will check to make sure that the client provides matching values. See Canonical extension headers for the requirements of this feature, most notably:
Note: Multi-valued header passed as an array in the extensionHeaders
object is converted into a string, delimited by |
|
queryParams |
object |
<optional> |
Additional query parameters to include in the signed URL. |
GetBucketsCallback(errnullable, buckets, nextQuery, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
buckets |
Array.<Bucket> |
Array of Bucket instances. |
|
nextQuery |
object |
A query object to receive more results. |
|
apiResponse |
object |
The full API response. |
GetBucketsRequest
Query object for listing buckets.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
autoPaginate |
boolean |
<optional> |
true |
Have pagination handled automatically. |
maxApiCalls |
number |
<optional> |
Maximum number of API calls to make. |
|
maxResults |
number |
<optional> |
Maximum number of items plus prefixes to
return per call.
Note: By default will handle pagination automatically
if more than 1 page worth of results are requested per call.
When |
|
pageToken |
string |
<optional> |
A previously-returned page token representing part of the larger set of results to view. |
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
GetBucketsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<Bucket> |
Array of Bucket instances. |
1 |
object |
nextQuery A query object to receive more results. |
2 |
object |
The full API response. |
GetExpirationDateCallback(errnullable, expirationDate)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
expirationDate |
date |
A Date object representing the earliest time this file's retention policy will expire. |
GetExpirationDateResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
date |
A Date object representing the earliest time this file's retention policy will expire. |
GetFileCallback(errnullable, file, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
file |
File |
The File. |
|
apiResponse |
object |
The full API response. |
GetFileMetadataCallback(errnullable, metadata, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
metadata |
object |
The File metadata. |
|
apiResponse |
object |
The full API response. |
GetFileMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The File metadata. |
1 |
object |
The full API response. |
GetFileResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
File |
The File. |
1 |
object |
The full API response. |
GetFilesCallback(errnullable, files, nextQuery, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
files |
Array.<File> |
Array of File instances. |
|
nextQuery |
object |
A query object to receive more results. |
|
apiResponse |
object |
The full API response. |
GetFilesOptions
Query object for listing files.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
autoPaginate |
boolean |
<optional> |
true |
Have pagination handled automatically. |
delimiter |
string |
<optional> |
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 |
|
endOffset |
string |
<optional> |
Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed have names between startOffset (inclusive) and endOffset (exclusive). |
|
includeFoldersAsPrefixes |
boolean |
<optional> |
If true, includes folders and managed folders in the set of prefixes returned by the query. Only applicable if delimiter is set to / and autoPaginate is set to false. See: https://cloud.google.com/storage/docs/managed-folders |
|
includeTrailingDelimiter |
boolean |
<optional> |
If true, objects that end in exactly one instance of delimiter have their metadata included in items[] in addition to the relevant part of the object name appearing in prefixes[]. |
|
prefix |
string |
<optional> |
Filter results to objects whose names begin with this prefix. |
|
matchGlob |
string |
<optional> |
A glob pattern used to filter results, for example foo*bar |
|
maxApiCalls |
number |
<optional> |
Maximum number of API calls to make. |
|
maxResults |
number |
<optional> |
Maximum number of items plus prefixes to
return per call.
Note: By default will handle pagination automatically
if more than 1 page worth of results are requested per call.
When |
|
pageToken |
string |
<optional> |
A previously-returned page token representing part of the larger set of results to view. |
|
softDeleted |
boolean |
<optional> |
If true, only soft-deleted object versions will be
listed as distinct results in order of generation number. Note |
|
startOffset |
string |
<optional> |
Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed have names between startOffset (inclusive) and endOffset (exclusive). |
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
|
versions |
boolean |
<optional> |
If true, returns File objects scoped to their versions. |
GetFilesResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<File> |
Array of File instances. |
GetHmacKeyCallback(errnullable, hmacKey, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
hmacKey |
HmacKey |
this HmacKey instance. |
|
apiResponse |
object |
The full API response. |
GetHmacKeyMetadataOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
This parameter is currently ignored. |
GetHmacKeyOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
This parameter is currently ignored. |
GetHmacKeyResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
HmacKey |
This HmacKey instance. |
1 |
object |
The full API response. |
GetLabelsCallback(errnullable, labels)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
labels |
object |
Object of labels currently set on this bucket. |
GetLabelsOptions
Configuration options for Bucket#getLabels().
GetLabelsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
Object of labels currently set on this bucket. |
GetNotificationsCallback(errnullable, notifications, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
notifications |
Array.<Notification> |
Array of Notification instances. |
|
apiResponse |
object |
The full API response. |
GetNotificationsOptions
Configuration options for Bucket#getNotification().
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
GetNotificationsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<Notification> |
Array of Notification instances. |
1 |
object |
The full API response. |
GetPolicyOptions
Requested options for IAM#getPolicy().
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
requestedPolicyVersion |
number |
<optional> |
The version of IAM policies to request. If a policy with a condition is requested without setting this, the server will return an error. This must be set to a value of 3 to retrieve IAM policies containing conditions. This is to prevent client code that isn't aware of IAM conditions from interpreting and modifying policies incorrectly. The service might return a policy with version lower than the one that was requested, based on the feature syntax in the policy fetched. See IAM Policy versions |
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
GetPolicyResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Policy |
The policy. |
1 |
object |
The full API response. |
GetServiceAccountCallback(errnullable, serviceAccount, apiResponse)
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
||||||
serviceAccount |
object |
The serviceAccount resource. Properties
|
|||||||
apiResponse |
object |
The full API response. |
GetServiceAccountResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The service account resource. |
1 |
object |
The full API response. |
GetSignedUrlCallback(errnullable, url)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
url |
object |
The signed URL. |
GetSignedUrlCallback(errnullable, url)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
url |
object |
The signed URL. |
GetSignedUrlResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The signed URL. |
GetSignedUrlResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The signed URL. |
HmacKeyMetadata
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
accessId |
string |
The access id identifies which HMAC key was used to sign a request when authenticating with HMAC. |
|
etag |
string |
Used to perform a read-modify-write of the key. |
|
id |
string |
The resource name of the HMAC key. |
|
projectId |
string |
The project ID. |
|
serviceAccountEmail |
string |
The service account's email this HMAC key is created for. |
|
state |
string |
The state of this HMAC key. One of "ACTIVE", "INACTIVE" or "DELETED". |
|
timeCreated |
string |
The creation time of the HMAC key in RFC 3339 format. |
|
updated |
string |
<optional> |
The time this HMAC key was last updated in RFC 3339 format. |
HmacKeyMetadataCallback(errnullable, metadata, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
metadata |
HmacKeyMetadata |
The updated HmacKeyMetadata object. |
|
apiResponse |
object |
The full API response. |
HmacKeyMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
HmacKeyMetadata |
The updated HmacKeyMetadata object. |
1 |
object |
The full API response. |
HmacKeyOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
projectId |
string |
<optional> |
The project ID of the project that owns the service account of the requested HMAC key. If not provided, the project ID used to instantiate the Storage client will be used. |
IsPublicCallback(errnullable, resp)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
resp |
boolean |
Whether file is public or not. |
IsPublicResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
boolean |
Whether file is public or not. |
LifecycleRule
The new lifecycle rule to be added to objects in this bucket.
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
action |
string | object |
The action to be taken upon matching of
all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'.
Note: For configuring a raw-formatted rule object to be passed as |
|
condition |
object |
Condition a bucket must meet before the action occurs on the bucket. Refer to following supported conditions. |
|
storageClass |
string |
<optional> |
When using the |
MakeAllFilesPublicPrivateResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<File> |
List of files affected. |
MakeBucketPrivateCallback(errnullable, files)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
files |
Array.<File> |
List of files made private. |
MakeBucketPrivateOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
includeFiles |
boolean |
<optional> |
false |
Make each file in the bucket private. |
metadata |
Metadata |
<optional> |
Define custom metadata properties to define along with the operation. |
|
force |
boolean |
<optional> |
Queue errors occurred while making files private until all files have been processed. |
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
MakeBucketPrivateResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<File> |
List of files made private. |
MakeBucketPublicCallback(errnullable, files)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
files |
Array.<File> |
List of files made public. |
MakeBucketPublicOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
includeFiles |
boolean |
<optional> |
false |
Make each file in the bucket private. |
force |
boolean |
<optional> |
Queue errors occurred while making files private until all files have been processed. |
MakeBucketPublicResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<File> |
List of files made public. |
MakeFilePrivateCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
MakeFilePrivateOptions
Configuration options for File#makePrivate().
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
metadata |
Metadata |
<optional> |
Define custom metadata properties to define along with the operation. |
strict |
boolean |
<optional> |
If true, set the file to be private to only the owner user. Otherwise, it will be private to the project. |
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
MakeFilePrivateResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
MakeFilePublicCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
MakeFilePublicResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
MoveCallback(errnullable, destinationFilenullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
destinationFile |
File |
<nullable> |
The destination File. |
apiResponse |
object |
The full API response. |
MoveOptions
Configuration options for File#move(). See an Object resource.
MoveResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
File |
The destination File. |
1 |
object |
The full API response. |
NotificationExistsCallback(errnullable, exists)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
exists |
boolean |
Whether the notification exists or not. |
NotificationExistsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
boolean |
Whether the notification exists or not. |
Policy
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
policy.bindings |
Array.<PolicyBinding> |
Bindings associate members with roles. |
|
policy.etag |
string |
<optional> |
Etags are used to perform a read-modify-write. |
policy.version |
number |
<optional> |
The syntax schema version of the Policy. To set an IAM policy with conditional binding, this field must be set to 3 or greater. See IAM Policy versions |
PolicyBinding
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
role |
string |
Role that is assigned to members. |
|
members |
Array.<string> |
Specifies the identities requesting access for the bucket. |
|
condition |
Expr |
<optional> |
The condition that is associated with this binding. |
RemoveAclCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
RemoveAclResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
RenameCallback(errnullable, destinationFilenullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
destinationFile |
File |
<nullable> |
The destination File. |
apiResponse |
object |
The full API response. |
RenameOptions
Configuration options for File#move(). See an Object resource.
RenameResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
File |
The destination File. |
1 |
object |
The full API response. |
RestoreOptions
Options for File#restore(). See an Object resource.
RotateEncryptionKeyCallback()
RotateEncryptionKeyResponse
SaveCallback(errnullable)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
SaveOptions
SetBucketMetadataCallback(errnullable, metadata)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
metadata |
object |
The bucket metadata. |
SetBucketMetadataOptions
Configuration options for Bucket#setMetadata().
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
SetBucketMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
apiResponse |
object |
The full API response. |
SetBucketStorageClassCallback(errnullable)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
SetBucketStorageClassOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
SetFileMetadataCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
SetFileMetadataOptions
Configuration options for File#setMetadata().
SetFileMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
SetHmacKeyMetadata
Subset of HmacKeyMetadata to update.
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
state |
string |
New state of the HmacKey. Either 'ACTIVE' or 'INACTIVE'. |
|
etag |
string |
<optional> |
Include an etag from a previous get HMAC key request to perform safe read-modify-write. |
SetHmacKeyMetadataOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
This parameter is currently ignored. |
SetLabelsCallback(errnullable, metadata)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
metadata |
object |
The bucket metadata. |
SetLabelsOptions
Configuration options for Bucket#setLabels().
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
SetLabelsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The bucket metadata. |
SetStorageClassCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
SetStorageClassOptions
Configuration options for File#setStorageClass().
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
SetStorageClassResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
SignedPostPolicyV4Output
Properties:
Name | Type | Description |
---|---|---|
url |
string |
The request URL. |
fields |
object |
The form fields to include in the POST request. |
StopCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
StopResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
StorageOptions
Properties:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
projectId |
string |
<optional> |
The project ID from the Google Developer's
Console, e.g. 'grape-spaceship-123'. We will also check the environment
variable |
|||||||||||||||||||||||||||||||||||||||||
keyFilename |
string |
<optional> |
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 |
|||||||||||||||||||||||||||||||||||||||||
email |
string |
<optional> |
Account email address. Required when using a .pem or .p12 keyFilename. |
|||||||||||||||||||||||||||||||||||||||||
credentials |
object |
<optional> |
Credentials object. Properties
|
|||||||||||||||||||||||||||||||||||||||||
retryOptions |
object |
<optional> |
Options for customizing retries. Retriable server errors will be retried with exponential delay between them dictated by the formula max(maxRetryDelay, retryDelayMultiplier*retryNumber) until maxRetries or totalTimeout has been reached. Retries will only happen if autoRetry is set to true. Properties
|
|||||||||||||||||||||||||||||||||||||||||
userAgent |
string |
<optional> |
The value to be prepended to the User-Agent header in API requests. |
|||||||||||||||||||||||||||||||||||||||||
authClient |
object |
<optional> |
|
|||||||||||||||||||||||||||||||||||||||||
timeout |
number |
<optional> |
The amount of time in milliseconds to wait per http request before timing out. |
|||||||||||||||||||||||||||||||||||||||||
interceptors_ |
Array.<object> |
<optional> |
Array of custom request interceptors to be returned in the order they were assigned. |
|||||||||||||||||||||||||||||||||||||||||
apiEndpoint |
string |
<optional> |
storage.google.com |
The API endpoint of the service used to make requests. |
||||||||||||||||||||||||||||||||||||||||
useAuthWithCustomEndpoint |
boolean |
<optional> |
false |
Controls whether or not to use authentication when using a custom endpoint. |
||||||||||||||||||||||||||||||||||||||||
callback |
Crc32cGeneratorCallback |
<optional> |
A function that generates a CRC32C Validator. Defaults to CRC32C |
UpdateAclCallback(errnullable, acl, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
acl |
object |
The updated Acl Objects. |
|
apiResponse |
object |
The full API response. |
UpdateAclResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The updated Acl Objects. |
1 |
object |
The full API response. |
UploadCallback(errnullable, file, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
file |
object |
The uploaded File. |
|
apiResponse |
object |
The full API response. |
UploadFileInChunksOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
concurrencyLimit |
number |
<optional> |
The number of concurrently executing promises to use when uploading the file. |
chunkSizeBytes |
number |
<optional> |
The size in bytes of each chunk to be uploaded. |
uploadName |
string |
<optional> |
Name of the file when saving to GCS. If ommitted the name is taken from the file path. |
maxQueueSize |
number |
<optional> |
The number of chunks to be uploaded to hold in memory concurrently. If not specified defaults to the specified concurrency limit. |
uploadId |
string |
<optional> |
If specified attempts to resume a previous upload. |
partsMap |
Map |
<optional> |
If specified alongside uploadId, attempts to resume a previous upload from the last chunk specified in partsMap |
headers |
object |
<optional> |
headers to be sent when initiating the multipart upload. See Request Headers: Initiate a Multipart Upload |
autoAbortFailure |
boolean |
<optional> |
boolean to indicate if an in progress upload session will be automatically aborted upon failure. If not set, failures will be automatically aborted. |
UploadManyFilesOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
concurrencyLimit |
number |
<optional> |
The number of concurrently executing promises to use when uploading the files. |
customDestinationBuilder |
function |
<optional> |
A fuction that will take the current path of a local file and return a string representing a custom path to be used to upload the file to GCS. |
skipIfExists |
boolean |
<optional> |
Do not upload the file if it already exists in the bucket. This will set the precondition ifGenerationMatch = 0. |
prefix |
string |
<optional> |
A prefix to append to all of the uploaded files. |
passthroughOptions |
object |
<optional> |
UploadOptions Options to be passed through to each individual upload operation. |
UploadOptions
Configuration options for Bucket#upload().
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
destination |
string | File |
<optional> |
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. |
|
encryptionKey |
string |
<optional> |
A custom encryption key. See Customer-supplied Encryption Keys. |
|
gzip |
boolean |
<optional> |
Automatically gzip the file. This will set
|
|
kmsKeyName |
string |
<optional> |
The name of the Cloud KMS key that will
be used to encrypt the object. Must be in the format:
|
|
metadata |
object |
<optional> |
See an Objects: insert request body. |
|
offset |
string |
<optional> |
The starting byte of the upload stream, for resuming an interrupted upload. Defaults to 0. |
|
predefinedAcl |
string |
<optional> |
Apply a predefined set of access controls to this object. Acceptable values are:
|
|
private |
boolean |
<optional> |
Make the uploaded file private. (Alias for
|
|
public |
boolean |
<optional> |
Make the uploaded file public. (Alias for
|
|
resumable |
boolean |
<optional> |
true |
Resumable uploads are automatically enabled and must be shut off explicitly by setting to false. |
timeout |
number |
<optional> |
60000 |
Set the HTTP request timeout in
milliseconds. This option is not available for resumable uploads.
Default: |
uri |
string |
<optional> |
The URI for an already-created resumable upload. See File#createResumableUpload. |
|
userProject |
string |
<optional> |
The ID of the project which will be billed for the request. |
|
validation |
string | boolean |
<optional> |
Possible values: |
UploadResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The uploaded File. |
1 |
object |
The full API response. |