@google-cloud/storage-control 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/build/protos/google/storage/v2/storage.proto +3166 -0
- package/build/protos/protos.d.ts +11304 -40
- package/build/protos/protos.js +30882 -22
- package/build/protos/protos.json +4507 -28
- package/build/src/index.d.ts +2 -3
- package/build/src/index.js +3 -3
- package/build/src/index.js.map +1 -1
- package/build/src/storage_control_client.d.ts +2035 -0
- package/build/src/storage_control_client.js +2440 -0
- package/build/src/storage_control_client.js.map +1 -0
- package/build/src/util/ast_utils.d.ts +22 -0
- package/build/src/util/ast_utils.js +356 -0
- package/build/src/util/ast_utils.js.map +1 -0
- package/build/src/util/index_fix_utils.d.ts +15 -0
- package/build/src/util/index_fix_utils.js +86 -0
- package/build/src/util/index_fix_utils.js.map +1 -0
- package/build/src/util/proto_utils.d.ts +13 -0
- package/build/src/util/proto_utils.js +53 -0
- package/build/src/util/proto_utils.js.map +1 -0
- package/build/src/util/storage_control_utils.d.ts +1 -0
- package/build/src/util/storage_control_utils.js +31 -0
- package/build/src/util/storage_control_utils.js.map +1 -0
- package/build/src/util/uber_client_builder.d.ts +12 -0
- package/build/src/util/uber_client_builder.js +187 -0
- package/build/src/util/uber_client_builder.js.map +1 -0
- package/build/src/v2/index.d.ts +1 -0
- package/build/src/v2/index.js +4 -2
- package/build/src/v2/index.js.map +1 -1
- package/build/src/v2/storage_client.d.ts +614 -0
- package/build/src/v2/storage_client.js +911 -0
- package/build/src/v2/storage_client.js.map +1 -0
- package/build/src/v2/storage_client_config.json +65 -0
- package/build/src/v2/storage_control_client.d.ts +138 -138
- package/build/src/v2/storage_control_client.js +486 -232
- package/build/src/v2/storage_control_client.js.map +1 -1
- package/build/src/v2/storage_proto_list.json +3 -0
- package/package.json +4 -2
|
@@ -0,0 +1,2440 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2025 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
//
|
|
16
|
+
// ** This file is automatically generated **
|
|
17
|
+
// ** All changes to this file may be overwritten. **
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.StorageControlClient = void 0;
|
|
20
|
+
const storage_control_client_1 = require("./v2/storage_control_client");
|
|
21
|
+
const storage_client_1 = require("./v2/storage_client");
|
|
22
|
+
class StorageControlClient {
|
|
23
|
+
storageControlInternal;
|
|
24
|
+
storageClient;
|
|
25
|
+
auth;
|
|
26
|
+
descriptors = {
|
|
27
|
+
page: {},
|
|
28
|
+
stream: {},
|
|
29
|
+
longrunning: {},
|
|
30
|
+
batching: {},
|
|
31
|
+
};
|
|
32
|
+
warn;
|
|
33
|
+
innerApiCalls;
|
|
34
|
+
pathTemplates;
|
|
35
|
+
operationsClient;
|
|
36
|
+
storageControlStub;
|
|
37
|
+
/**
|
|
38
|
+
* @param {object} [StorageControlClientOptions] - Enables user to instantiate clients separately and use those as the subclients.
|
|
39
|
+
* To have sub-clients with different options, instantiate each client separately.
|
|
40
|
+
*/
|
|
41
|
+
constructor(options) {
|
|
42
|
+
options = options || {};
|
|
43
|
+
this.storageControlInternal =
|
|
44
|
+
options?.storageControlInternal ?? new storage_control_client_1.StorageControlClient(options);
|
|
45
|
+
// utilize whatever auth was created with the first client for the rest of the clients
|
|
46
|
+
// this will either be what the user passed into options.auth, or whatever was
|
|
47
|
+
// initialized by default in gax. We reuse this auth rather than instantiating a default ourselves
|
|
48
|
+
// so that we do not have to keep this code in sync with gax
|
|
49
|
+
options.auth = this.storageControlInternal.auth;
|
|
50
|
+
this.storageClient = options?.storageClient ?? new storage_client_1.StorageClient(options);
|
|
51
|
+
this.auth = this.storageControlInternal.auth;
|
|
52
|
+
this.descriptors = this.storageControlInternal.descriptors;
|
|
53
|
+
this.warn = this.storageControlInternal.warn;
|
|
54
|
+
this.innerApiCalls = this.storageControlInternal.innerApiCalls;
|
|
55
|
+
this.pathTemplates = this.storageControlInternal.pathTemplates;
|
|
56
|
+
this.operationsClient = this.storageControlInternal.operationsClient;
|
|
57
|
+
this.storageControlStub = this.storageControlInternal.storageControlStub;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Initialize the client.
|
|
61
|
+
* Performs asynchronous operations (such as authentication) and prepares the client.
|
|
62
|
+
* This function will be called automatically when any class method is called for the
|
|
63
|
+
* first time, but if you need to initialize it before calling an actual method,
|
|
64
|
+
* feel free to call initialize() directly.
|
|
65
|
+
*
|
|
66
|
+
* You can await on this method if you want to make sure the client is initialized.
|
|
67
|
+
*
|
|
68
|
+
* @returns {Promise} A promise that resolves to an authenticated service stub.
|
|
69
|
+
*/
|
|
70
|
+
initialize() {
|
|
71
|
+
return this.storageControlInternal.initialize();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The DNS address for this API service.
|
|
75
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
76
|
+
* @returns {string} The DNS address for this service.
|
|
77
|
+
*/
|
|
78
|
+
static get servicePath() {
|
|
79
|
+
return storage_control_client_1.StorageControlClient.servicePath;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The DNS address for this API service - same as servicePath.
|
|
83
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
84
|
+
* @returns {string} The DNS address for this service.
|
|
85
|
+
*/
|
|
86
|
+
static get apiEndpoint() {
|
|
87
|
+
return storage_control_client_1.StorageControlClient.apiEndpoint;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The DNS address for this API service - same as servicePath.
|
|
91
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
92
|
+
* @returns {string} The DNS address for this service.
|
|
93
|
+
*/
|
|
94
|
+
get apiEndpoint() {
|
|
95
|
+
return this.storageControlInternal.apiEndpoint;
|
|
96
|
+
}
|
|
97
|
+
get universeDomain() {
|
|
98
|
+
return this.storageControlInternal.universeDomain;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The port for this API service.
|
|
102
|
+
* @returns {number} The default port for this service.
|
|
103
|
+
*/
|
|
104
|
+
static get port() {
|
|
105
|
+
return storage_control_client_1.StorageControlClient.port;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The scopes needed to make gRPC calls for every method defined
|
|
109
|
+
* in this service.
|
|
110
|
+
* @returns {string[]} List of default scopes.
|
|
111
|
+
*/
|
|
112
|
+
static get scopes() {
|
|
113
|
+
return storage_control_client_1.StorageControlClient.scopes;
|
|
114
|
+
}
|
|
115
|
+
getProjectId(callback) {
|
|
116
|
+
if (callback) {
|
|
117
|
+
this.storageControlInternal.getProjectId(callback);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
return this.storageControlInternal.getProjectId();
|
|
121
|
+
}
|
|
122
|
+
// -------------------
|
|
123
|
+
// -- Service calls --
|
|
124
|
+
// -------------------
|
|
125
|
+
/**
|
|
126
|
+
* Creates a new folder. This operation is only applicable to a hierarchical
|
|
127
|
+
* namespace enabled bucket.
|
|
128
|
+
*
|
|
129
|
+
* @param {Object} request
|
|
130
|
+
* The request object that will be sent.
|
|
131
|
+
* @param {string} request.parent
|
|
132
|
+
* Required. Name of the bucket in which the folder will reside. The bucket
|
|
133
|
+
* must be a hierarchical namespace enabled bucket.
|
|
134
|
+
* @param {google.storage.control.v2.Folder} request.folder
|
|
135
|
+
* Required. Properties of the new folder being created.
|
|
136
|
+
* The bucket and name of the folder are specified in the parent and folder_id
|
|
137
|
+
* fields, respectively. Populating those fields in `folder` will result in an
|
|
138
|
+
* error.
|
|
139
|
+
* @param {string} request.folderId
|
|
140
|
+
* Required. The full name of a folder, including all its parent folders.
|
|
141
|
+
* Folders use single '/' characters as a delimiter.
|
|
142
|
+
* The folder_id must end with a slash.
|
|
143
|
+
* For example, the folder_id of "books/biographies/" would create a new
|
|
144
|
+
* "biographies/" folder under the "books/" folder.
|
|
145
|
+
* @param {boolean} [request.recursive]
|
|
146
|
+
* Optional. If true, parent folder doesn't have to be present and all missing
|
|
147
|
+
* ancestor folders will be created atomically.
|
|
148
|
+
* @param {string} [request.requestId]
|
|
149
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
150
|
+
* format, but other formats are still accepted.
|
|
151
|
+
* @param {object} [options]
|
|
152
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
153
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
154
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.Folder|Folder}.
|
|
155
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
156
|
+
* for more details and examples.
|
|
157
|
+
* @example <caption>include:samples/generated/v2/storage_control.create_folder.js</caption>
|
|
158
|
+
* region_tag:storage_v2_generated_StorageControl_CreateFolder_async
|
|
159
|
+
*/
|
|
160
|
+
createFolder(request, optionsOrCallback, callback) {
|
|
161
|
+
request = request || {};
|
|
162
|
+
let options;
|
|
163
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
164
|
+
callback = optionsOrCallback;
|
|
165
|
+
options = {};
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
options = optionsOrCallback;
|
|
169
|
+
}
|
|
170
|
+
if (callback === undefined) {
|
|
171
|
+
return this.storageControlInternal.createFolder(request, options);
|
|
172
|
+
}
|
|
173
|
+
return this.storageControlInternal.createFolder(request, options, callback);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Permanently deletes an empty folder. This operation is only applicable to a
|
|
177
|
+
* hierarchical namespace enabled bucket.
|
|
178
|
+
*
|
|
179
|
+
* @param {Object} request
|
|
180
|
+
* The request object that will be sent.
|
|
181
|
+
* @param {string} request.name
|
|
182
|
+
* Required. Name of the folder.
|
|
183
|
+
* Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
|
|
184
|
+
* @param {number} request.ifMetagenerationMatch
|
|
185
|
+
* Makes the operation only succeed conditional on whether the folder's
|
|
186
|
+
* current metageneration matches the given value.
|
|
187
|
+
* @param {number} request.ifMetagenerationNotMatch
|
|
188
|
+
* Makes the operation only succeed conditional on whether the folder's
|
|
189
|
+
* current metageneration does not match the given value.
|
|
190
|
+
* @param {string} [request.requestId]
|
|
191
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
192
|
+
* format, but other formats are still accepted.
|
|
193
|
+
* @param {object} [options]
|
|
194
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
195
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
196
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
197
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
198
|
+
* for more details and examples.
|
|
199
|
+
* @example <caption>include:samples/generated/v2/storage_control.delete_folder.js</caption>
|
|
200
|
+
* region_tag:storage_v2_generated_StorageControl_DeleteFolder_async
|
|
201
|
+
*/
|
|
202
|
+
deleteFolder(request, optionsOrCallback, callback) {
|
|
203
|
+
request = request || {};
|
|
204
|
+
let options;
|
|
205
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
206
|
+
callback = optionsOrCallback;
|
|
207
|
+
options = {};
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
options = optionsOrCallback;
|
|
211
|
+
}
|
|
212
|
+
if (callback === undefined) {
|
|
213
|
+
return this.storageControlInternal.deleteFolder(request, options);
|
|
214
|
+
}
|
|
215
|
+
return this.storageControlInternal.deleteFolder(request, options, callback);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Returns metadata for the specified folder. This operation is only
|
|
219
|
+
* applicable to a hierarchical namespace enabled bucket.
|
|
220
|
+
*
|
|
221
|
+
* @param {Object} request
|
|
222
|
+
* The request object that will be sent.
|
|
223
|
+
* @param {string} request.name
|
|
224
|
+
* Required. Name of the folder.
|
|
225
|
+
* Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
|
|
226
|
+
* @param {number} request.ifMetagenerationMatch
|
|
227
|
+
* Makes the operation only succeed conditional on whether the folder's
|
|
228
|
+
* current metageneration matches the given value.
|
|
229
|
+
* @param {number} request.ifMetagenerationNotMatch
|
|
230
|
+
* Makes the operation only succeed conditional on whether the folder's
|
|
231
|
+
* current metageneration does not match the given value.
|
|
232
|
+
* @param {string} [request.requestId]
|
|
233
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
234
|
+
* format, but other formats are still accepted.
|
|
235
|
+
* @param {object} [options]
|
|
236
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
237
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
238
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.Folder|Folder}.
|
|
239
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
240
|
+
* for more details and examples.
|
|
241
|
+
* @example <caption>include:samples/generated/v2/storage_control.get_folder.js</caption>
|
|
242
|
+
* region_tag:storage_v2_generated_StorageControl_GetFolder_async
|
|
243
|
+
*/
|
|
244
|
+
getFolder(request, optionsOrCallback, callback) {
|
|
245
|
+
request = request || {};
|
|
246
|
+
let options;
|
|
247
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
248
|
+
callback = optionsOrCallback;
|
|
249
|
+
options = {};
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
options = optionsOrCallback;
|
|
253
|
+
}
|
|
254
|
+
if (callback === undefined) {
|
|
255
|
+
return this.storageControlInternal.getFolder(request, options);
|
|
256
|
+
}
|
|
257
|
+
return this.storageControlInternal.getFolder(request, options, callback);
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Returns the storage layout configuration for a given bucket.
|
|
261
|
+
*
|
|
262
|
+
* @param {Object} request
|
|
263
|
+
* The request object that will be sent.
|
|
264
|
+
* @param {string} request.name
|
|
265
|
+
* Required. The name of the StorageLayout resource.
|
|
266
|
+
* Format: `projects/{project}/buckets/{bucket}/storageLayout`
|
|
267
|
+
* @param {string} request.prefix
|
|
268
|
+
* An optional prefix used for permission check. It is useful when the caller
|
|
269
|
+
* only has limited permissions under a specific prefix.
|
|
270
|
+
* @param {string} [request.requestId]
|
|
271
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
272
|
+
* format, but other formats are still accepted.
|
|
273
|
+
* @param {object} [options]
|
|
274
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
275
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
276
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.StorageLayout|StorageLayout}.
|
|
277
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
278
|
+
* for more details and examples.
|
|
279
|
+
* @example <caption>include:samples/generated/v2/storage_control.get_storage_layout.js</caption>
|
|
280
|
+
* region_tag:storage_v2_generated_StorageControl_GetStorageLayout_async
|
|
281
|
+
*/
|
|
282
|
+
getStorageLayout(request, optionsOrCallback, callback) {
|
|
283
|
+
request = request || {};
|
|
284
|
+
let options;
|
|
285
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
286
|
+
callback = optionsOrCallback;
|
|
287
|
+
options = {};
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
options = optionsOrCallback;
|
|
291
|
+
}
|
|
292
|
+
if (callback === undefined) {
|
|
293
|
+
return this.storageControlInternal.getStorageLayout(request, options);
|
|
294
|
+
}
|
|
295
|
+
return this.storageControlInternal.getStorageLayout(request, options, callback);
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Creates a new managed folder.
|
|
299
|
+
*
|
|
300
|
+
* @param {Object} request
|
|
301
|
+
* The request object that will be sent.
|
|
302
|
+
* @param {string} request.parent
|
|
303
|
+
* Required. Name of the bucket this managed folder belongs to.
|
|
304
|
+
* @param {google.storage.control.v2.ManagedFolder} request.managedFolder
|
|
305
|
+
* Required. Properties of the managed folder being created.
|
|
306
|
+
* The bucket and managed folder names are specified in the `parent` and
|
|
307
|
+
* `managed_folder_id` fields. Populating these fields in `managed_folder`
|
|
308
|
+
* will result in an error.
|
|
309
|
+
* @param {string} request.managedFolderId
|
|
310
|
+
* Required. The name of the managed folder. It uses a single `/` as delimiter
|
|
311
|
+
* and leading and trailing `/` are allowed.
|
|
312
|
+
* @param {string} [request.requestId]
|
|
313
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
314
|
+
* format, but other formats are still accepted.
|
|
315
|
+
* @param {object} [options]
|
|
316
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
317
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
318
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
|
|
319
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
320
|
+
* for more details and examples.
|
|
321
|
+
* @example <caption>include:samples/generated/v2/storage_control.create_managed_folder.js</caption>
|
|
322
|
+
* region_tag:storage_v2_generated_StorageControl_CreateManagedFolder_async
|
|
323
|
+
*/
|
|
324
|
+
createManagedFolder(request, optionsOrCallback, callback) {
|
|
325
|
+
request = request || {};
|
|
326
|
+
let options;
|
|
327
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
328
|
+
callback = optionsOrCallback;
|
|
329
|
+
options = {};
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
options = optionsOrCallback;
|
|
333
|
+
}
|
|
334
|
+
if (callback === undefined) {
|
|
335
|
+
return this.storageControlInternal.createManagedFolder(request, options);
|
|
336
|
+
}
|
|
337
|
+
return this.storageControlInternal.createManagedFolder(request, options, callback);
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Permanently deletes an empty managed folder.
|
|
341
|
+
*
|
|
342
|
+
* @param {Object} request
|
|
343
|
+
* The request object that will be sent.
|
|
344
|
+
* @param {string} request.name
|
|
345
|
+
* Required. Name of the managed folder.
|
|
346
|
+
* Format:
|
|
347
|
+
* `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
348
|
+
* @param {number} request.ifMetagenerationMatch
|
|
349
|
+
* The operation succeeds conditional on the managed folder's current
|
|
350
|
+
* metageneration matching the value here specified.
|
|
351
|
+
* @param {number} request.ifMetagenerationNotMatch
|
|
352
|
+
* The operation succeeds conditional on the managed folder's current
|
|
353
|
+
* metageneration NOT matching the value here specified.
|
|
354
|
+
* @param {boolean} request.allowNonEmpty
|
|
355
|
+
* Allows deletion of a managed folder even if it is not empty.
|
|
356
|
+
* A managed folder is empty if it manages no child managed folders or
|
|
357
|
+
* objects. Caller must have permission for
|
|
358
|
+
* storage.managedFolders.setIamPolicy.
|
|
359
|
+
* @param {string} [request.requestId]
|
|
360
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
361
|
+
* format, but other formats are still accepted.
|
|
362
|
+
* @param {object} [options]
|
|
363
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
364
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
365
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
366
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
367
|
+
* for more details and examples.
|
|
368
|
+
* @example <caption>include:samples/generated/v2/storage_control.delete_managed_folder.js</caption>
|
|
369
|
+
* region_tag:storage_v2_generated_StorageControl_DeleteManagedFolder_async
|
|
370
|
+
*/
|
|
371
|
+
deleteManagedFolder(request, optionsOrCallback, callback) {
|
|
372
|
+
request = request || {};
|
|
373
|
+
let options;
|
|
374
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
375
|
+
callback = optionsOrCallback;
|
|
376
|
+
options = {};
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
options = optionsOrCallback;
|
|
380
|
+
}
|
|
381
|
+
if (callback === undefined) {
|
|
382
|
+
return this.storageControlInternal.deleteManagedFolder(request, options);
|
|
383
|
+
}
|
|
384
|
+
return this.storageControlInternal.deleteManagedFolder(request, options, callback);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Returns metadata for the specified managed folder.
|
|
388
|
+
*
|
|
389
|
+
* @param {Object} request
|
|
390
|
+
* The request object that will be sent.
|
|
391
|
+
* @param {string} request.name
|
|
392
|
+
* Required. Name of the managed folder.
|
|
393
|
+
* Format:
|
|
394
|
+
* `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
395
|
+
* @param {number} request.ifMetagenerationMatch
|
|
396
|
+
* The operation succeeds conditional on the managed folder's current
|
|
397
|
+
* metageneration matching the value here specified.
|
|
398
|
+
* @param {number} request.ifMetagenerationNotMatch
|
|
399
|
+
* The operation succeeds conditional on the managed folder's current
|
|
400
|
+
* metageneration NOT matching the value here specified.
|
|
401
|
+
* @param {string} [request.requestId]
|
|
402
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
403
|
+
* format, but other formats are still accepted.
|
|
404
|
+
* @param {object} [options]
|
|
405
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
406
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
407
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
|
|
408
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
409
|
+
* for more details and examples.
|
|
410
|
+
* @example <caption>include:samples/generated/v2/storage_control.get_managed_folder.js</caption>
|
|
411
|
+
* region_tag:storage_v2_generated_StorageControl_GetManagedFolder_async
|
|
412
|
+
*/
|
|
413
|
+
getManagedFolder(request, optionsOrCallback, callback) {
|
|
414
|
+
request = request || {};
|
|
415
|
+
let options;
|
|
416
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
417
|
+
callback = optionsOrCallback;
|
|
418
|
+
options = {};
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
options = optionsOrCallback;
|
|
422
|
+
}
|
|
423
|
+
if (callback === undefined) {
|
|
424
|
+
return this.storageControlInternal.getManagedFolder(request, options);
|
|
425
|
+
}
|
|
426
|
+
return this.storageControlInternal.getManagedFolder(request, options, callback);
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Disables an Anywhere Cache instance. A disabled instance is read-only. The
|
|
430
|
+
* disablement could be revoked by calling ResumeAnywhereCache. The cache
|
|
431
|
+
* instance will be deleted automatically if it remains in the disabled state
|
|
432
|
+
* for at least one hour.
|
|
433
|
+
*
|
|
434
|
+
* @param {Object} request
|
|
435
|
+
* The request object that will be sent.
|
|
436
|
+
* @param {string} request.name
|
|
437
|
+
* Required. The name field in the request should be:
|
|
438
|
+
* `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
|
|
439
|
+
* @param {string} [request.requestId]
|
|
440
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
441
|
+
* format, but other formats are still accepted. This request is only
|
|
442
|
+
* idempotent if a `request_id` is provided.
|
|
443
|
+
* @param {object} [options]
|
|
444
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
445
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
446
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
|
|
447
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
448
|
+
* for more details and examples.
|
|
449
|
+
* @example <caption>include:samples/generated/v2/storage_control.disable_anywhere_cache.js</caption>
|
|
450
|
+
* region_tag:storage_v2_generated_StorageControl_DisableAnywhereCache_async
|
|
451
|
+
*/
|
|
452
|
+
disableAnywhereCache(request, optionsOrCallback, callback) {
|
|
453
|
+
request = request || {};
|
|
454
|
+
let options;
|
|
455
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
456
|
+
callback = optionsOrCallback;
|
|
457
|
+
options = {};
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
options = optionsOrCallback;
|
|
461
|
+
}
|
|
462
|
+
if (callback === undefined) {
|
|
463
|
+
return this.storageControlInternal.disableAnywhereCache(request, options);
|
|
464
|
+
}
|
|
465
|
+
return this.storageControlInternal.disableAnywhereCache(request, options, callback);
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Pauses an Anywhere Cache instance.
|
|
469
|
+
*
|
|
470
|
+
* @param {Object} request
|
|
471
|
+
* The request object that will be sent.
|
|
472
|
+
* @param {string} request.name
|
|
473
|
+
* Required. The name field in the request should be:
|
|
474
|
+
* `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
|
|
475
|
+
* @param {string} [request.requestId]
|
|
476
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
477
|
+
* format, but other formats are still accepted. This request is only
|
|
478
|
+
* idempotent if a `request_id` is provided.
|
|
479
|
+
* @param {object} [options]
|
|
480
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
481
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
482
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
|
|
483
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
484
|
+
* for more details and examples.
|
|
485
|
+
* @example <caption>include:samples/generated/v2/storage_control.pause_anywhere_cache.js</caption>
|
|
486
|
+
* region_tag:storage_v2_generated_StorageControl_PauseAnywhereCache_async
|
|
487
|
+
*/
|
|
488
|
+
pauseAnywhereCache(request, optionsOrCallback, callback) {
|
|
489
|
+
request = request || {};
|
|
490
|
+
let options;
|
|
491
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
492
|
+
callback = optionsOrCallback;
|
|
493
|
+
options = {};
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
options = optionsOrCallback;
|
|
497
|
+
}
|
|
498
|
+
if (callback === undefined) {
|
|
499
|
+
return this.storageControlInternal.pauseAnywhereCache(request, options);
|
|
500
|
+
}
|
|
501
|
+
return this.storageControlInternal.pauseAnywhereCache(request, options, callback);
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Resumes a disabled or paused Anywhere Cache instance.
|
|
505
|
+
*
|
|
506
|
+
* @param {Object} request
|
|
507
|
+
* The request object that will be sent.
|
|
508
|
+
* @param {string} request.name
|
|
509
|
+
* Required. The name field in the request should be:
|
|
510
|
+
* `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
|
|
511
|
+
* @param {string} [request.requestId]
|
|
512
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
513
|
+
* format, but other formats are still accepted. This request is only
|
|
514
|
+
* idempotent if a `request_id` is provided.
|
|
515
|
+
* @param {object} [options]
|
|
516
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
517
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
518
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
|
|
519
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
520
|
+
* for more details and examples.
|
|
521
|
+
* @example <caption>include:samples/generated/v2/storage_control.resume_anywhere_cache.js</caption>
|
|
522
|
+
* region_tag:storage_v2_generated_StorageControl_ResumeAnywhereCache_async
|
|
523
|
+
*/
|
|
524
|
+
resumeAnywhereCache(request, optionsOrCallback, callback) {
|
|
525
|
+
request = request || {};
|
|
526
|
+
let options;
|
|
527
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
528
|
+
callback = optionsOrCallback;
|
|
529
|
+
options = {};
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
options = optionsOrCallback;
|
|
533
|
+
}
|
|
534
|
+
if (callback === undefined) {
|
|
535
|
+
return this.storageControlInternal.resumeAnywhereCache(request, options);
|
|
536
|
+
}
|
|
537
|
+
return this.storageControlInternal.resumeAnywhereCache(request, options, callback);
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Gets an Anywhere Cache instance.
|
|
541
|
+
*
|
|
542
|
+
* @param {Object} request
|
|
543
|
+
* The request object that will be sent.
|
|
544
|
+
* @param {string} request.name
|
|
545
|
+
* Required. The name field in the request should be:
|
|
546
|
+
* `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
|
|
547
|
+
* @param {string} [request.requestId]
|
|
548
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
549
|
+
* format, but other formats are still accepted.
|
|
550
|
+
* @param {object} [options]
|
|
551
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
552
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
553
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
|
|
554
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
555
|
+
* for more details and examples.
|
|
556
|
+
* @example <caption>include:samples/generated/v2/storage_control.get_anywhere_cache.js</caption>
|
|
557
|
+
* region_tag:storage_v2_generated_StorageControl_GetAnywhereCache_async
|
|
558
|
+
*/
|
|
559
|
+
getAnywhereCache(request, optionsOrCallback, callback) {
|
|
560
|
+
request = request || {};
|
|
561
|
+
let options;
|
|
562
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
563
|
+
callback = optionsOrCallback;
|
|
564
|
+
options = {};
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
options = optionsOrCallback;
|
|
568
|
+
}
|
|
569
|
+
if (callback === undefined) {
|
|
570
|
+
return this.storageControlInternal.getAnywhereCache(request, options);
|
|
571
|
+
}
|
|
572
|
+
return this.storageControlInternal.getAnywhereCache(request, options, callback);
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Returns the Project scoped singleton IntelligenceConfig resource.
|
|
576
|
+
*
|
|
577
|
+
* @param {Object} request
|
|
578
|
+
* The request object that will be sent.
|
|
579
|
+
* @param {string} request.name
|
|
580
|
+
* Required. The name of the `IntelligenceConfig` resource associated with
|
|
581
|
+
* your project.
|
|
582
|
+
*
|
|
583
|
+
* Format: `projects/{id}/locations/global/intelligenceConfig`
|
|
584
|
+
* @param {object} [options]
|
|
585
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
586
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
587
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
|
|
588
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
589
|
+
* for more details and examples.
|
|
590
|
+
* @example <caption>include:samples/generated/v2/storage_control.get_project_intelligence_config.js</caption>
|
|
591
|
+
* region_tag:storage_v2_generated_StorageControl_GetProjectIntelligenceConfig_async
|
|
592
|
+
*/
|
|
593
|
+
getProjectIntelligenceConfig(request, optionsOrCallback, callback) {
|
|
594
|
+
request = request || {};
|
|
595
|
+
let options;
|
|
596
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
597
|
+
callback = optionsOrCallback;
|
|
598
|
+
options = {};
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
options = optionsOrCallback;
|
|
602
|
+
}
|
|
603
|
+
if (callback === undefined) {
|
|
604
|
+
return this.storageControlInternal.getProjectIntelligenceConfig(request, options);
|
|
605
|
+
}
|
|
606
|
+
return this.storageControlInternal.getProjectIntelligenceConfig(request, options, callback);
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Updates the Project scoped singleton IntelligenceConfig resource.
|
|
610
|
+
*
|
|
611
|
+
* @param {Object} request
|
|
612
|
+
* The request object that will be sent.
|
|
613
|
+
* @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
|
|
614
|
+
* Required. The `IntelligenceConfig` resource to be updated.
|
|
615
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
616
|
+
* Required. The `update_mask` that specifies the fields within the
|
|
617
|
+
* `IntelligenceConfig` resource that should be modified by this update. Only
|
|
618
|
+
* the listed fields are updated.
|
|
619
|
+
* @param {string} [request.requestId]
|
|
620
|
+
* Optional. The ID that uniquely identifies the request, preventing duplicate
|
|
621
|
+
* processing.
|
|
622
|
+
* @param {object} [options]
|
|
623
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
624
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
625
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
|
|
626
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
627
|
+
* for more details and examples.
|
|
628
|
+
* @example <caption>include:samples/generated/v2/storage_control.update_project_intelligence_config.js</caption>
|
|
629
|
+
* region_tag:storage_v2_generated_StorageControl_UpdateProjectIntelligenceConfig_async
|
|
630
|
+
*/
|
|
631
|
+
updateProjectIntelligenceConfig(request, optionsOrCallback, callback) {
|
|
632
|
+
request = request || {};
|
|
633
|
+
let options;
|
|
634
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
635
|
+
callback = optionsOrCallback;
|
|
636
|
+
options = {};
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
639
|
+
options = optionsOrCallback;
|
|
640
|
+
}
|
|
641
|
+
if (callback === undefined) {
|
|
642
|
+
return this.storageControlInternal.updateProjectIntelligenceConfig(request, options);
|
|
643
|
+
}
|
|
644
|
+
return this.storageControlInternal.updateProjectIntelligenceConfig(request, options, callback);
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Returns the Folder scoped singleton IntelligenceConfig resource.
|
|
648
|
+
*
|
|
649
|
+
* @param {Object} request
|
|
650
|
+
* The request object that will be sent.
|
|
651
|
+
* @param {string} request.name
|
|
652
|
+
* Required. The name of the `IntelligenceConfig` resource associated with
|
|
653
|
+
* your folder.
|
|
654
|
+
*
|
|
655
|
+
* Format: `folders/{id}/locations/global/intelligenceConfig`
|
|
656
|
+
* @param {object} [options]
|
|
657
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
658
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
659
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
|
|
660
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
661
|
+
* for more details and examples.
|
|
662
|
+
* @example <caption>include:samples/generated/v2/storage_control.get_folder_intelligence_config.js</caption>
|
|
663
|
+
* region_tag:storage_v2_generated_StorageControl_GetFolderIntelligenceConfig_async
|
|
664
|
+
*/
|
|
665
|
+
getFolderIntelligenceConfig(request, optionsOrCallback, callback) {
|
|
666
|
+
request = request || {};
|
|
667
|
+
let options;
|
|
668
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
669
|
+
callback = optionsOrCallback;
|
|
670
|
+
options = {};
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
options = optionsOrCallback;
|
|
674
|
+
}
|
|
675
|
+
if (callback === undefined) {
|
|
676
|
+
return this.storageControlInternal.getFolderIntelligenceConfig(request, options);
|
|
677
|
+
}
|
|
678
|
+
return this.storageControlInternal.getFolderIntelligenceConfig(request, options, callback);
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Updates the Folder scoped singleton IntelligenceConfig resource.
|
|
682
|
+
*
|
|
683
|
+
* @param {Object} request
|
|
684
|
+
* The request object that will be sent.
|
|
685
|
+
* @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
|
|
686
|
+
* Required. The `IntelligenceConfig` resource to be updated.
|
|
687
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
688
|
+
* Required. The `update_mask` that specifies the fields within the
|
|
689
|
+
* `IntelligenceConfig` resource that should be modified by this update. Only
|
|
690
|
+
* the listed fields are updated.
|
|
691
|
+
* @param {string} [request.requestId]
|
|
692
|
+
* Optional. The ID that uniquely identifies the request, preventing duplicate
|
|
693
|
+
* processing.
|
|
694
|
+
* @param {object} [options]
|
|
695
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
696
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
697
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
|
|
698
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
699
|
+
* for more details and examples.
|
|
700
|
+
* @example <caption>include:samples/generated/v2/storage_control.update_folder_intelligence_config.js</caption>
|
|
701
|
+
* region_tag:storage_v2_generated_StorageControl_UpdateFolderIntelligenceConfig_async
|
|
702
|
+
*/
|
|
703
|
+
updateFolderIntelligenceConfig(request, optionsOrCallback, callback) {
|
|
704
|
+
request = request || {};
|
|
705
|
+
let options;
|
|
706
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
707
|
+
callback = optionsOrCallback;
|
|
708
|
+
options = {};
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
options = optionsOrCallback;
|
|
712
|
+
}
|
|
713
|
+
if (callback === undefined) {
|
|
714
|
+
return this.storageControlInternal.updateFolderIntelligenceConfig(request, options);
|
|
715
|
+
}
|
|
716
|
+
return this.storageControlInternal.updateFolderIntelligenceConfig(request, options, callback);
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Returns the Organization scoped singleton IntelligenceConfig resource.
|
|
720
|
+
*
|
|
721
|
+
* @param {Object} request
|
|
722
|
+
* The request object that will be sent.
|
|
723
|
+
* @param {string} request.name
|
|
724
|
+
* Required. The name of the `IntelligenceConfig` resource associated with
|
|
725
|
+
* your organization.
|
|
726
|
+
*
|
|
727
|
+
* Format: `organizations/{org_id}/locations/global/intelligenceConfig`
|
|
728
|
+
* @param {object} [options]
|
|
729
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
730
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
731
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
|
|
732
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
733
|
+
* for more details and examples.
|
|
734
|
+
* @example <caption>include:samples/generated/v2/storage_control.get_organization_intelligence_config.js</caption>
|
|
735
|
+
* region_tag:storage_v2_generated_StorageControl_GetOrganizationIntelligenceConfig_async
|
|
736
|
+
*/
|
|
737
|
+
getOrganizationIntelligenceConfig(request, optionsOrCallback, callback) {
|
|
738
|
+
request = request || {};
|
|
739
|
+
let options;
|
|
740
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
741
|
+
callback = optionsOrCallback;
|
|
742
|
+
options = {};
|
|
743
|
+
}
|
|
744
|
+
else {
|
|
745
|
+
options = optionsOrCallback;
|
|
746
|
+
}
|
|
747
|
+
if (callback === undefined) {
|
|
748
|
+
return this.storageControlInternal.getOrganizationIntelligenceConfig(request, options);
|
|
749
|
+
}
|
|
750
|
+
return this.storageControlInternal.getOrganizationIntelligenceConfig(request, options, callback);
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Updates the Organization scoped singleton IntelligenceConfig resource.
|
|
754
|
+
*
|
|
755
|
+
* @param {Object} request
|
|
756
|
+
* The request object that will be sent.
|
|
757
|
+
* @param {google.storage.control.v2.IntelligenceConfig} request.intelligenceConfig
|
|
758
|
+
* Required. The `IntelligenceConfig` resource to be updated.
|
|
759
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
760
|
+
* Required. The `update_mask` that specifies the fields within the
|
|
761
|
+
* `IntelligenceConfig` resource that should be modified by this update. Only
|
|
762
|
+
* the listed fields are updated.
|
|
763
|
+
* @param {string} [request.requestId]
|
|
764
|
+
* Optional. The ID that uniquely identifies the request, preventing duplicate
|
|
765
|
+
* processing.
|
|
766
|
+
* @param {object} [options]
|
|
767
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
768
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
769
|
+
* The first element of the array is an object representing {@link protos.google.storage.control.v2.IntelligenceConfig|IntelligenceConfig}.
|
|
770
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
771
|
+
* for more details and examples.
|
|
772
|
+
* @example <caption>include:samples/generated/v2/storage_control.update_organization_intelligence_config.js</caption>
|
|
773
|
+
* region_tag:storage_v2_generated_StorageControl_UpdateOrganizationIntelligenceConfig_async
|
|
774
|
+
*/
|
|
775
|
+
updateOrganizationIntelligenceConfig(request, optionsOrCallback, callback) {
|
|
776
|
+
request = request || {};
|
|
777
|
+
let options;
|
|
778
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
779
|
+
callback = optionsOrCallback;
|
|
780
|
+
options = {};
|
|
781
|
+
}
|
|
782
|
+
else {
|
|
783
|
+
options = optionsOrCallback;
|
|
784
|
+
}
|
|
785
|
+
if (callback === undefined) {
|
|
786
|
+
return this.storageControlInternal.updateOrganizationIntelligenceConfig(request, options);
|
|
787
|
+
}
|
|
788
|
+
return this.storageControlInternal.updateOrganizationIntelligenceConfig(request, options, callback);
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Gets the IAM policy for a specified bucket.
|
|
792
|
+
* The `resource` field in the request should be
|
|
793
|
+
* `projects/_/buckets/{bucket}` for a bucket, or
|
|
794
|
+
* `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
795
|
+
* for a managed folder.
|
|
796
|
+
*
|
|
797
|
+
* @param {Object} request
|
|
798
|
+
* The request object that will be sent.
|
|
799
|
+
* @param {string} request.resource
|
|
800
|
+
* REQUIRED: The resource for which the policy is being requested.
|
|
801
|
+
* See the operation documentation for the appropriate value for this field.
|
|
802
|
+
* @param {google.iam.v1.GetPolicyOptions} request.options
|
|
803
|
+
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
|
804
|
+
* `GetIamPolicy`.
|
|
805
|
+
* @param {object} [options]
|
|
806
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
807
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
808
|
+
* The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}.
|
|
809
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
810
|
+
* for more details and examples.
|
|
811
|
+
* @example <caption>include:samples/generated/v2/storage_control.get_iam_policy.js</caption>
|
|
812
|
+
* region_tag:storage_v2_generated_StorageControl_GetIamPolicy_async
|
|
813
|
+
*/
|
|
814
|
+
getIamPolicy(request, optionsOrCallback, callback) {
|
|
815
|
+
request = request || {};
|
|
816
|
+
let options;
|
|
817
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
818
|
+
callback = optionsOrCallback;
|
|
819
|
+
options = {};
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
options = optionsOrCallback;
|
|
823
|
+
}
|
|
824
|
+
if (callback === undefined) {
|
|
825
|
+
return this.storageControlInternal.getIamPolicy(request, options);
|
|
826
|
+
}
|
|
827
|
+
return this.storageControlInternal.getIamPolicy(request, options, callback);
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Updates an IAM policy for the specified bucket.
|
|
831
|
+
* The `resource` field in the request should be
|
|
832
|
+
* `projects/_/buckets/{bucket}` for a bucket, or
|
|
833
|
+
* `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
834
|
+
* for a managed folder.
|
|
835
|
+
*
|
|
836
|
+
* @param {Object} request
|
|
837
|
+
* The request object that will be sent.
|
|
838
|
+
* @param {string} request.resource
|
|
839
|
+
* REQUIRED: The resource for which the policy is being specified.
|
|
840
|
+
* See the operation documentation for the appropriate value for this field.
|
|
841
|
+
* @param {google.iam.v1.Policy} request.policy
|
|
842
|
+
* REQUIRED: The complete policy to be applied to the `resource`. The size of
|
|
843
|
+
* the policy is limited to a few 10s of KB. An empty policy is a
|
|
844
|
+
* valid policy but certain Cloud Platform services (such as Projects)
|
|
845
|
+
* might reject them.
|
|
846
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
847
|
+
* OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
|
848
|
+
* the fields in the mask will be modified. If no mask is provided, the
|
|
849
|
+
* following default mask is used:
|
|
850
|
+
*
|
|
851
|
+
* `paths: "bindings, etag"`
|
|
852
|
+
* @param {object} [options]
|
|
853
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
854
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
855
|
+
* The first element of the array is an object representing {@link protos.google.iam.v1.Policy|Policy}.
|
|
856
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
857
|
+
* for more details and examples.
|
|
858
|
+
* @example <caption>include:samples/generated/v2/storage_control.set_iam_policy.js</caption>
|
|
859
|
+
* region_tag:storage_v2_generated_StorageControl_SetIamPolicy_async
|
|
860
|
+
*/
|
|
861
|
+
setIamPolicy(request, optionsOrCallback, callback) {
|
|
862
|
+
request = request || {};
|
|
863
|
+
let options;
|
|
864
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
865
|
+
callback = optionsOrCallback;
|
|
866
|
+
options = {};
|
|
867
|
+
}
|
|
868
|
+
else {
|
|
869
|
+
options = optionsOrCallback;
|
|
870
|
+
}
|
|
871
|
+
if (callback === undefined) {
|
|
872
|
+
return this.storageControlInternal.setIamPolicy(request, options);
|
|
873
|
+
}
|
|
874
|
+
return this.storageControlInternal.setIamPolicy(request, options, callback);
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Tests a set of permissions on the given bucket, object, or managed folder
|
|
878
|
+
* to see which, if any, are held by the caller.
|
|
879
|
+
* The `resource` field in the request should be
|
|
880
|
+
* `projects/_/buckets/{bucket}` for a bucket,
|
|
881
|
+
* `projects/_/buckets/{bucket}/objects/{object}` for an object, or
|
|
882
|
+
* `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
883
|
+
* for a managed folder.
|
|
884
|
+
*
|
|
885
|
+
* @param {Object} request
|
|
886
|
+
* The request object that will be sent.
|
|
887
|
+
* @param {string} request.resource
|
|
888
|
+
* REQUIRED: The resource for which the policy detail is being requested.
|
|
889
|
+
* See the operation documentation for the appropriate value for this field.
|
|
890
|
+
* @param {string[]} request.permissions
|
|
891
|
+
* The set of permissions to check for the `resource`. Permissions with
|
|
892
|
+
* wildcards (such as '*' or 'storage.*') are not allowed. For more
|
|
893
|
+
* information see
|
|
894
|
+
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
|
895
|
+
* @param {object} [options]
|
|
896
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
897
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
898
|
+
* The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}.
|
|
899
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
900
|
+
* for more details and examples.
|
|
901
|
+
* @example <caption>include:samples/generated/v2/storage_control.test_iam_permissions.js</caption>
|
|
902
|
+
* region_tag:storage_v2_generated_StorageControl_TestIamPermissions_async
|
|
903
|
+
*/
|
|
904
|
+
testIamPermissions(request, optionsOrCallback, callback) {
|
|
905
|
+
request = request || {};
|
|
906
|
+
let options;
|
|
907
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
908
|
+
callback = optionsOrCallback;
|
|
909
|
+
options = {};
|
|
910
|
+
}
|
|
911
|
+
else {
|
|
912
|
+
options = optionsOrCallback;
|
|
913
|
+
}
|
|
914
|
+
if (callback === undefined) {
|
|
915
|
+
return this.storageControlInternal.testIamPermissions(request, options);
|
|
916
|
+
}
|
|
917
|
+
return this.storageControlInternal.testIamPermissions(request, options, callback);
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Renames a source folder to a destination folder. This operation is only
|
|
921
|
+
* applicable to a hierarchical namespace enabled bucket. During a rename, the
|
|
922
|
+
* source and destination folders are locked until the long running operation
|
|
923
|
+
* completes.
|
|
924
|
+
*
|
|
925
|
+
* @param {Object} request
|
|
926
|
+
* The request object that will be sent.
|
|
927
|
+
* @param {string} request.name
|
|
928
|
+
* Required. Name of the source folder being renamed.
|
|
929
|
+
* Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
|
|
930
|
+
* @param {string} request.destinationFolderId
|
|
931
|
+
* Required. The destination folder ID, e.g. `foo/bar/`.
|
|
932
|
+
* @param {number} request.ifMetagenerationMatch
|
|
933
|
+
* Makes the operation only succeed conditional on whether the source
|
|
934
|
+
* folder's current metageneration matches the given value.
|
|
935
|
+
* @param {number} request.ifMetagenerationNotMatch
|
|
936
|
+
* Makes the operation only succeed conditional on whether the source
|
|
937
|
+
* folder's current metageneration does not match the given value.
|
|
938
|
+
* @param {string} [request.requestId]
|
|
939
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
940
|
+
* format, but other formats are still accepted. This request is only
|
|
941
|
+
* idempotent if a `request_id` is provided.
|
|
942
|
+
* @param {object} [options]
|
|
943
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
944
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
945
|
+
* The first element of the array is an object representing
|
|
946
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
947
|
+
* you can `await` for.
|
|
948
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
949
|
+
* for more details and examples.
|
|
950
|
+
* @example <caption>include:samples/generated/v2/storage_control.rename_folder.js</caption>
|
|
951
|
+
* region_tag:storage_v2_generated_StorageControl_RenameFolder_async
|
|
952
|
+
*/
|
|
953
|
+
renameFolder(request, optionsOrCallback, callback) {
|
|
954
|
+
request = request || {};
|
|
955
|
+
let options;
|
|
956
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
957
|
+
callback = optionsOrCallback;
|
|
958
|
+
options = {};
|
|
959
|
+
}
|
|
960
|
+
else {
|
|
961
|
+
options = optionsOrCallback;
|
|
962
|
+
}
|
|
963
|
+
if (callback === undefined) {
|
|
964
|
+
return this.storageControlInternal.renameFolder(request, options);
|
|
965
|
+
}
|
|
966
|
+
return this.storageControlInternal.renameFolder(request, options, callback);
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Check the status of the long running operation returned by `renameFolder()`.
|
|
970
|
+
* @param {String} name
|
|
971
|
+
* The operation name that will be passed.
|
|
972
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
973
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
974
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
975
|
+
* for more details and examples.
|
|
976
|
+
* @example <caption>include:samples/generated/v2/storage_control.rename_folder.js</caption>
|
|
977
|
+
* region_tag:storage_v2_generated_StorageControl_RenameFolder_async
|
|
978
|
+
*/
|
|
979
|
+
checkRenameFolderProgress(name) {
|
|
980
|
+
return this.storageControlInternal.checkRenameFolderProgress(name);
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Creates an Anywhere Cache instance.
|
|
984
|
+
*
|
|
985
|
+
* @param {Object} request
|
|
986
|
+
* The request object that will be sent.
|
|
987
|
+
* @param {string} request.parent
|
|
988
|
+
* Required. The bucket to which this cache belongs.
|
|
989
|
+
* Format: `projects/{project}/buckets/{bucket}`
|
|
990
|
+
* @param {google.storage.control.v2.AnywhereCache} request.anywhereCache
|
|
991
|
+
* Required. Properties of the Anywhere Cache instance being created.
|
|
992
|
+
* The parent bucket name is specified in the `parent` field. Server uses the
|
|
993
|
+
* default value of `ttl` or `admission_policy` if not specified in
|
|
994
|
+
* request.
|
|
995
|
+
* @param {string} [request.requestId]
|
|
996
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
997
|
+
* format, but other formats are still accepted. This request is only
|
|
998
|
+
* idempotent if a `request_id` is provided.
|
|
999
|
+
* @param {object} [options]
|
|
1000
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1001
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1002
|
+
* The first element of the array is an object representing
|
|
1003
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
1004
|
+
* you can `await` for.
|
|
1005
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1006
|
+
* for more details and examples.
|
|
1007
|
+
* @example <caption>include:samples/generated/v2/storage_control.create_anywhere_cache.js</caption>
|
|
1008
|
+
* region_tag:storage_v2_generated_StorageControl_CreateAnywhereCache_async
|
|
1009
|
+
*/
|
|
1010
|
+
createAnywhereCache(request, optionsOrCallback, callback) {
|
|
1011
|
+
request = request || {};
|
|
1012
|
+
let options;
|
|
1013
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1014
|
+
callback = optionsOrCallback;
|
|
1015
|
+
options = {};
|
|
1016
|
+
}
|
|
1017
|
+
else {
|
|
1018
|
+
options = optionsOrCallback;
|
|
1019
|
+
}
|
|
1020
|
+
if (callback === undefined) {
|
|
1021
|
+
return this.storageControlInternal.createAnywhereCache(request, options);
|
|
1022
|
+
}
|
|
1023
|
+
return this.storageControlInternal.createAnywhereCache(request, options, callback);
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Check the status of the long running operation returned by `createAnywhereCache()`.
|
|
1027
|
+
* @param {String} name
|
|
1028
|
+
* The operation name that will be passed.
|
|
1029
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
1030
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
1031
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1032
|
+
* for more details and examples.
|
|
1033
|
+
* @example <caption>include:samples/generated/v2/storage_control.create_anywhere_cache.js</caption>
|
|
1034
|
+
* region_tag:storage_v2_generated_StorageControl_CreateAnywhereCache_async
|
|
1035
|
+
*/
|
|
1036
|
+
checkCreateAnywhereCacheProgress(name) {
|
|
1037
|
+
return this.storageControlInternal.checkCreateAnywhereCacheProgress(name);
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Updates an Anywhere Cache instance. Mutable fields include `ttl` and
|
|
1041
|
+
* `admission_policy`.
|
|
1042
|
+
*
|
|
1043
|
+
* @param {Object} request
|
|
1044
|
+
* The request object that will be sent.
|
|
1045
|
+
* @param {google.storage.control.v2.AnywhereCache} request.anywhereCache
|
|
1046
|
+
* Required. The Anywhere Cache instance to be updated.
|
|
1047
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
1048
|
+
* Required. List of fields to be updated. Mutable fields of AnywhereCache
|
|
1049
|
+
* include `ttl` and `admission_policy`.
|
|
1050
|
+
*
|
|
1051
|
+
* To specify ALL fields, specify a single field with the value `*`. Note: We
|
|
1052
|
+
* recommend against doing this. If a new field is introduced at a later time,
|
|
1053
|
+
* an older client updating with the `*` may accidentally reset the new
|
|
1054
|
+
* field's value.
|
|
1055
|
+
*
|
|
1056
|
+
* Not specifying any fields is an error.
|
|
1057
|
+
* @param {string} [request.requestId]
|
|
1058
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1059
|
+
* format, but other formats are still accepted. This request is only
|
|
1060
|
+
* idempotent if a `request_id` is provided.
|
|
1061
|
+
* @param {object} [options]
|
|
1062
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1063
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1064
|
+
* The first element of the array is an object representing
|
|
1065
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
1066
|
+
* you can `await` for.
|
|
1067
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1068
|
+
* for more details and examples.
|
|
1069
|
+
* @example <caption>include:samples/generated/v2/storage_control.update_anywhere_cache.js</caption>
|
|
1070
|
+
* region_tag:storage_v2_generated_StorageControl_UpdateAnywhereCache_async
|
|
1071
|
+
*/
|
|
1072
|
+
updateAnywhereCache(request, optionsOrCallback, callback) {
|
|
1073
|
+
request = request || {};
|
|
1074
|
+
let options;
|
|
1075
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1076
|
+
callback = optionsOrCallback;
|
|
1077
|
+
options = {};
|
|
1078
|
+
}
|
|
1079
|
+
else {
|
|
1080
|
+
options = optionsOrCallback;
|
|
1081
|
+
}
|
|
1082
|
+
if (callback === undefined) {
|
|
1083
|
+
return this.storageControlInternal.updateAnywhereCache(request, options);
|
|
1084
|
+
}
|
|
1085
|
+
return this.storageControlInternal.updateAnywhereCache(request, options, callback);
|
|
1086
|
+
}
|
|
1087
|
+
/**
|
|
1088
|
+
* Check the status of the long running operation returned by `updateAnywhereCache()`.
|
|
1089
|
+
* @param {String} name
|
|
1090
|
+
* The operation name that will be passed.
|
|
1091
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
1092
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
1093
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
1094
|
+
* for more details and examples.
|
|
1095
|
+
* @example <caption>include:samples/generated/v2/storage_control.update_anywhere_cache.js</caption>
|
|
1096
|
+
* region_tag:storage_v2_generated_StorageControl_UpdateAnywhereCache_async
|
|
1097
|
+
*/
|
|
1098
|
+
checkUpdateAnywhereCacheProgress(name) {
|
|
1099
|
+
return this.storageControlInternal.checkUpdateAnywhereCacheProgress(name);
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Retrieves a list of folders. This operation is only applicable to a
|
|
1103
|
+
* hierarchical namespace enabled bucket.
|
|
1104
|
+
*
|
|
1105
|
+
* @param {Object} request
|
|
1106
|
+
* The request object that will be sent.
|
|
1107
|
+
* @param {string} request.parent
|
|
1108
|
+
* Required. Name of the bucket in which to look for folders. The bucket must
|
|
1109
|
+
* be a hierarchical namespace enabled bucket.
|
|
1110
|
+
* @param {number} [request.pageSize]
|
|
1111
|
+
* Optional. Maximum number of folders to return in a single response. The
|
|
1112
|
+
* service will use this parameter or 1,000 items, whichever is smaller.
|
|
1113
|
+
* @param {string} [request.pageToken]
|
|
1114
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
1115
|
+
* set of results to view.
|
|
1116
|
+
* @param {string} [request.prefix]
|
|
1117
|
+
* Optional. Filter results to folders whose names begin with this prefix.
|
|
1118
|
+
* If set, the value must either be an empty string or end with a '/'.
|
|
1119
|
+
* @param {string} [request.delimiter]
|
|
1120
|
+
* Optional. If set, returns results in a directory-like mode. The results
|
|
1121
|
+
* will only include folders that either exactly match the above prefix, or
|
|
1122
|
+
* are one level below the prefix. The only supported value is '/'.
|
|
1123
|
+
* @param {string} [request.lexicographicStart]
|
|
1124
|
+
* Optional. Filter results to folders whose names are lexicographically equal
|
|
1125
|
+
* to or after lexicographic_start. If lexicographic_end is also set, the
|
|
1126
|
+
* folders listed have names between lexicographic_start (inclusive) and
|
|
1127
|
+
* lexicographic_end (exclusive).
|
|
1128
|
+
* @param {string} [request.lexicographicEnd]
|
|
1129
|
+
* Optional. Filter results to folders whose names are lexicographically
|
|
1130
|
+
* before lexicographic_end. If lexicographic_start is also set, the folders
|
|
1131
|
+
* listed have names between lexicographic_start (inclusive) and
|
|
1132
|
+
* lexicographic_end (exclusive).
|
|
1133
|
+
* @param {string} [request.requestId]
|
|
1134
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1135
|
+
* format, but other formats are still accepted.
|
|
1136
|
+
* @param {object} [options]
|
|
1137
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1138
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1139
|
+
* The first element of the array is Array of {@link protos.google.storage.control.v2.Folder|Folder}.
|
|
1140
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1141
|
+
* times as needed and will merge results from all the pages into this array.
|
|
1142
|
+
* Note that it can affect your quota.
|
|
1143
|
+
* We recommend using `listFoldersAsync()`
|
|
1144
|
+
* method described below for async iteration which you can stop as needed.
|
|
1145
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1146
|
+
* for more details and examples.
|
|
1147
|
+
*/
|
|
1148
|
+
listFolders(request, optionsOrCallback, callback) {
|
|
1149
|
+
request = request || {};
|
|
1150
|
+
let options;
|
|
1151
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1152
|
+
callback = optionsOrCallback;
|
|
1153
|
+
options = {};
|
|
1154
|
+
}
|
|
1155
|
+
else {
|
|
1156
|
+
options = optionsOrCallback;
|
|
1157
|
+
}
|
|
1158
|
+
if (callback === undefined) {
|
|
1159
|
+
return this.storageControlInternal.listFolders(request, options);
|
|
1160
|
+
}
|
|
1161
|
+
return this.storageControlInternal.listFolders(request, options, callback);
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* Equivalent to `listFolders`, but returns a NodeJS Stream object.
|
|
1165
|
+
* @param {Object} request
|
|
1166
|
+
* The request object that will be sent.
|
|
1167
|
+
* @param {string} request.parent
|
|
1168
|
+
* Required. Name of the bucket in which to look for folders. The bucket must
|
|
1169
|
+
* be a hierarchical namespace enabled bucket.
|
|
1170
|
+
* @param {number} [request.pageSize]
|
|
1171
|
+
* Optional. Maximum number of folders to return in a single response. The
|
|
1172
|
+
* service will use this parameter or 1,000 items, whichever is smaller.
|
|
1173
|
+
* @param {string} [request.pageToken]
|
|
1174
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
1175
|
+
* set of results to view.
|
|
1176
|
+
* @param {string} [request.prefix]
|
|
1177
|
+
* Optional. Filter results to folders whose names begin with this prefix.
|
|
1178
|
+
* If set, the value must either be an empty string or end with a '/'.
|
|
1179
|
+
* @param {string} [request.delimiter]
|
|
1180
|
+
* Optional. If set, returns results in a directory-like mode. The results
|
|
1181
|
+
* will only include folders that either exactly match the above prefix, or
|
|
1182
|
+
* are one level below the prefix. The only supported value is '/'.
|
|
1183
|
+
* @param {string} [request.lexicographicStart]
|
|
1184
|
+
* Optional. Filter results to folders whose names are lexicographically equal
|
|
1185
|
+
* to or after lexicographic_start. If lexicographic_end is also set, the
|
|
1186
|
+
* folders listed have names between lexicographic_start (inclusive) and
|
|
1187
|
+
* lexicographic_end (exclusive).
|
|
1188
|
+
* @param {string} [request.lexicographicEnd]
|
|
1189
|
+
* Optional. Filter results to folders whose names are lexicographically
|
|
1190
|
+
* before lexicographic_end. If lexicographic_start is also set, the folders
|
|
1191
|
+
* listed have names between lexicographic_start (inclusive) and
|
|
1192
|
+
* lexicographic_end (exclusive).
|
|
1193
|
+
* @param {string} [request.requestId]
|
|
1194
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1195
|
+
* format, but other formats are still accepted.
|
|
1196
|
+
* @param {object} [options]
|
|
1197
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1198
|
+
* @returns {Stream}
|
|
1199
|
+
* An object stream which emits an object representing {@link protos.google.storage.control.v2.Folder|Folder} on 'data' event.
|
|
1200
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1201
|
+
* times as needed. Note that it can affect your quota.
|
|
1202
|
+
* We recommend using `listFoldersAsync()`
|
|
1203
|
+
* method described below for async iteration which you can stop as needed.
|
|
1204
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1205
|
+
* for more details and examples.
|
|
1206
|
+
*/
|
|
1207
|
+
listFoldersStream(request, options) {
|
|
1208
|
+
return this.storageControlInternal.listFoldersStream(request, options);
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* Equivalent to `listFolders`, but returns an iterable object.
|
|
1212
|
+
*
|
|
1213
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1214
|
+
* @param {Object} request
|
|
1215
|
+
* The request object that will be sent.
|
|
1216
|
+
* @param {string} request.parent
|
|
1217
|
+
* Required. Name of the bucket in which to look for folders. The bucket must
|
|
1218
|
+
* be a hierarchical namespace enabled bucket.
|
|
1219
|
+
* @param {number} [request.pageSize]
|
|
1220
|
+
* Optional. Maximum number of folders to return in a single response. The
|
|
1221
|
+
* service will use this parameter or 1,000 items, whichever is smaller.
|
|
1222
|
+
* @param {string} [request.pageToken]
|
|
1223
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
1224
|
+
* set of results to view.
|
|
1225
|
+
* @param {string} [request.prefix]
|
|
1226
|
+
* Optional. Filter results to folders whose names begin with this prefix.
|
|
1227
|
+
* If set, the value must either be an empty string or end with a '/'.
|
|
1228
|
+
* @param {string} [request.delimiter]
|
|
1229
|
+
* Optional. If set, returns results in a directory-like mode. The results
|
|
1230
|
+
* will only include folders that either exactly match the above prefix, or
|
|
1231
|
+
* are one level below the prefix. The only supported value is '/'.
|
|
1232
|
+
* @param {string} [request.lexicographicStart]
|
|
1233
|
+
* Optional. Filter results to folders whose names are lexicographically equal
|
|
1234
|
+
* to or after lexicographic_start. If lexicographic_end is also set, the
|
|
1235
|
+
* folders listed have names between lexicographic_start (inclusive) and
|
|
1236
|
+
* lexicographic_end (exclusive).
|
|
1237
|
+
* @param {string} [request.lexicographicEnd]
|
|
1238
|
+
* Optional. Filter results to folders whose names are lexicographically
|
|
1239
|
+
* before lexicographic_end. If lexicographic_start is also set, the folders
|
|
1240
|
+
* listed have names between lexicographic_start (inclusive) and
|
|
1241
|
+
* lexicographic_end (exclusive).
|
|
1242
|
+
* @param {string} [request.requestId]
|
|
1243
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1244
|
+
* format, but other formats are still accepted.
|
|
1245
|
+
* @param {object} [options]
|
|
1246
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1247
|
+
* @returns {Object}
|
|
1248
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1249
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1250
|
+
* {@link protos.google.storage.control.v2.Folder|Folder}. The API will be called under the hood as needed, once per the page,
|
|
1251
|
+
* so you can stop the iteration when you don't need more results.
|
|
1252
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1253
|
+
* for more details and examples.
|
|
1254
|
+
* @example <caption>include:samples/generated/v2/storage_control.list_folders.js</caption>
|
|
1255
|
+
* region_tag:storage_v2_generated_StorageControl_ListFolders_async
|
|
1256
|
+
*/
|
|
1257
|
+
listFoldersAsync(request, options) {
|
|
1258
|
+
return this.storageControlInternal.listFoldersAsync(request, options);
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Retrieves a list of managed folders for a given bucket.
|
|
1262
|
+
*
|
|
1263
|
+
* @param {Object} request
|
|
1264
|
+
* The request object that will be sent.
|
|
1265
|
+
* @param {string} request.parent
|
|
1266
|
+
* Required. Name of the bucket this managed folder belongs to.
|
|
1267
|
+
* @param {number} [request.pageSize]
|
|
1268
|
+
* Optional. Maximum number of managed folders to return in a single response.
|
|
1269
|
+
* The service will use this parameter or 1,000 items, whichever is smaller.
|
|
1270
|
+
* @param {string} [request.pageToken]
|
|
1271
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
1272
|
+
* set of results to view.
|
|
1273
|
+
* @param {string} [request.prefix]
|
|
1274
|
+
* Optional. Filter results to match managed folders with name starting with
|
|
1275
|
+
* this prefix.
|
|
1276
|
+
* @param {string} [request.requestId]
|
|
1277
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1278
|
+
* format, but other formats are still accepted.
|
|
1279
|
+
* @param {object} [options]
|
|
1280
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1281
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1282
|
+
* The first element of the array is Array of {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}.
|
|
1283
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1284
|
+
* times as needed and will merge results from all the pages into this array.
|
|
1285
|
+
* Note that it can affect your quota.
|
|
1286
|
+
* We recommend using `listManagedFoldersAsync()`
|
|
1287
|
+
* method described below for async iteration which you can stop as needed.
|
|
1288
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1289
|
+
* for more details and examples.
|
|
1290
|
+
*/
|
|
1291
|
+
listManagedFolders(request, optionsOrCallback, callback) {
|
|
1292
|
+
request = request || {};
|
|
1293
|
+
let options;
|
|
1294
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1295
|
+
callback = optionsOrCallback;
|
|
1296
|
+
options = {};
|
|
1297
|
+
}
|
|
1298
|
+
else {
|
|
1299
|
+
options = optionsOrCallback;
|
|
1300
|
+
}
|
|
1301
|
+
if (callback === undefined) {
|
|
1302
|
+
return this.storageControlInternal.listManagedFolders(request, options);
|
|
1303
|
+
}
|
|
1304
|
+
return this.storageControlInternal.listManagedFolders(request, options, callback);
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Equivalent to `listManagedFolders`, but returns a NodeJS Stream object.
|
|
1308
|
+
* @param {Object} request
|
|
1309
|
+
* The request object that will be sent.
|
|
1310
|
+
* @param {string} request.parent
|
|
1311
|
+
* Required. Name of the bucket this managed folder belongs to.
|
|
1312
|
+
* @param {number} [request.pageSize]
|
|
1313
|
+
* Optional. Maximum number of managed folders to return in a single response.
|
|
1314
|
+
* The service will use this parameter or 1,000 items, whichever is smaller.
|
|
1315
|
+
* @param {string} [request.pageToken]
|
|
1316
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
1317
|
+
* set of results to view.
|
|
1318
|
+
* @param {string} [request.prefix]
|
|
1319
|
+
* Optional. Filter results to match managed folders with name starting with
|
|
1320
|
+
* this prefix.
|
|
1321
|
+
* @param {string} [request.requestId]
|
|
1322
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1323
|
+
* format, but other formats are still accepted.
|
|
1324
|
+
* @param {object} [options]
|
|
1325
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1326
|
+
* @returns {Stream}
|
|
1327
|
+
* An object stream which emits an object representing {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder} on 'data' event.
|
|
1328
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1329
|
+
* times as needed. Note that it can affect your quota.
|
|
1330
|
+
* We recommend using `listManagedFoldersAsync()`
|
|
1331
|
+
* method described below for async iteration which you can stop as needed.
|
|
1332
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1333
|
+
* for more details and examples.
|
|
1334
|
+
*/
|
|
1335
|
+
listManagedFoldersStream(request, options) {
|
|
1336
|
+
return this.storageControlInternal.listManagedFoldersStream(request, options);
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Equivalent to `listManagedFolders`, but returns an iterable object.
|
|
1340
|
+
*
|
|
1341
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1342
|
+
* @param {Object} request
|
|
1343
|
+
* The request object that will be sent.
|
|
1344
|
+
* @param {string} request.parent
|
|
1345
|
+
* Required. Name of the bucket this managed folder belongs to.
|
|
1346
|
+
* @param {number} [request.pageSize]
|
|
1347
|
+
* Optional. Maximum number of managed folders to return in a single response.
|
|
1348
|
+
* The service will use this parameter or 1,000 items, whichever is smaller.
|
|
1349
|
+
* @param {string} [request.pageToken]
|
|
1350
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
1351
|
+
* set of results to view.
|
|
1352
|
+
* @param {string} [request.prefix]
|
|
1353
|
+
* Optional. Filter results to match managed folders with name starting with
|
|
1354
|
+
* this prefix.
|
|
1355
|
+
* @param {string} [request.requestId]
|
|
1356
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1357
|
+
* format, but other formats are still accepted.
|
|
1358
|
+
* @param {object} [options]
|
|
1359
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1360
|
+
* @returns {Object}
|
|
1361
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1362
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1363
|
+
* {@link protos.google.storage.control.v2.ManagedFolder|ManagedFolder}. The API will be called under the hood as needed, once per the page,
|
|
1364
|
+
* so you can stop the iteration when you don't need more results.
|
|
1365
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1366
|
+
* for more details and examples.
|
|
1367
|
+
* @example <caption>include:samples/generated/v2/storage_control.list_managed_folders.js</caption>
|
|
1368
|
+
* region_tag:storage_v2_generated_StorageControl_ListManagedFolders_async
|
|
1369
|
+
*/
|
|
1370
|
+
listManagedFoldersAsync(request, options) {
|
|
1371
|
+
return this.storageControlInternal.listManagedFoldersAsync(request, options);
|
|
1372
|
+
}
|
|
1373
|
+
/**
|
|
1374
|
+
* Lists Anywhere Cache instances for a given bucket.
|
|
1375
|
+
*
|
|
1376
|
+
* @param {Object} request
|
|
1377
|
+
* The request object that will be sent.
|
|
1378
|
+
* @param {string} request.parent
|
|
1379
|
+
* Required. The bucket to which this cache belongs.
|
|
1380
|
+
* @param {number} request.pageSize
|
|
1381
|
+
* Maximum number of caches to return in a single response.
|
|
1382
|
+
* The service will use this parameter or 1,000 items, whichever is smaller.
|
|
1383
|
+
* @param {string} request.pageToken
|
|
1384
|
+
* A previously-returned page token representing part of the larger set of
|
|
1385
|
+
* results to view.
|
|
1386
|
+
* @param {string} [request.requestId]
|
|
1387
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1388
|
+
* format, but other formats are still accepted.
|
|
1389
|
+
* @param {object} [options]
|
|
1390
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1391
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1392
|
+
* The first element of the array is Array of {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}.
|
|
1393
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1394
|
+
* times as needed and will merge results from all the pages into this array.
|
|
1395
|
+
* Note that it can affect your quota.
|
|
1396
|
+
* We recommend using `listAnywhereCachesAsync()`
|
|
1397
|
+
* method described below for async iteration which you can stop as needed.
|
|
1398
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1399
|
+
* for more details and examples.
|
|
1400
|
+
*/
|
|
1401
|
+
listAnywhereCaches(request, optionsOrCallback, callback) {
|
|
1402
|
+
request = request || {};
|
|
1403
|
+
let options;
|
|
1404
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1405
|
+
callback = optionsOrCallback;
|
|
1406
|
+
options = {};
|
|
1407
|
+
}
|
|
1408
|
+
else {
|
|
1409
|
+
options = optionsOrCallback;
|
|
1410
|
+
}
|
|
1411
|
+
if (callback === undefined) {
|
|
1412
|
+
return this.storageControlInternal.listAnywhereCaches(request, options);
|
|
1413
|
+
}
|
|
1414
|
+
return this.storageControlInternal.listAnywhereCaches(request, options, callback);
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Equivalent to `listAnywhereCaches`, but returns a NodeJS Stream object.
|
|
1418
|
+
* @param {Object} request
|
|
1419
|
+
* The request object that will be sent.
|
|
1420
|
+
* @param {string} request.parent
|
|
1421
|
+
* Required. The bucket to which this cache belongs.
|
|
1422
|
+
* @param {number} request.pageSize
|
|
1423
|
+
* Maximum number of caches to return in a single response.
|
|
1424
|
+
* The service will use this parameter or 1,000 items, whichever is smaller.
|
|
1425
|
+
* @param {string} request.pageToken
|
|
1426
|
+
* A previously-returned page token representing part of the larger set of
|
|
1427
|
+
* results to view.
|
|
1428
|
+
* @param {string} [request.requestId]
|
|
1429
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1430
|
+
* format, but other formats are still accepted.
|
|
1431
|
+
* @param {object} [options]
|
|
1432
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1433
|
+
* @returns {Stream}
|
|
1434
|
+
* An object stream which emits an object representing {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache} on 'data' event.
|
|
1435
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
1436
|
+
* times as needed. Note that it can affect your quota.
|
|
1437
|
+
* We recommend using `listAnywhereCachesAsync()`
|
|
1438
|
+
* method described below for async iteration which you can stop as needed.
|
|
1439
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1440
|
+
* for more details and examples.
|
|
1441
|
+
*/
|
|
1442
|
+
listAnywhereCachesStream(request, options) {
|
|
1443
|
+
return this.storageControlInternal.listAnywhereCachesStream(request, options);
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* Equivalent to `listAnywhereCaches`, but returns an iterable object.
|
|
1447
|
+
*
|
|
1448
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
1449
|
+
* @param {Object} request
|
|
1450
|
+
* The request object that will be sent.
|
|
1451
|
+
* @param {string} request.parent
|
|
1452
|
+
* Required. The bucket to which this cache belongs.
|
|
1453
|
+
* @param {number} request.pageSize
|
|
1454
|
+
* Maximum number of caches to return in a single response.
|
|
1455
|
+
* The service will use this parameter or 1,000 items, whichever is smaller.
|
|
1456
|
+
* @param {string} request.pageToken
|
|
1457
|
+
* A previously-returned page token representing part of the larger set of
|
|
1458
|
+
* results to view.
|
|
1459
|
+
* @param {string} [request.requestId]
|
|
1460
|
+
* Optional. A unique identifier for this request. UUID is the recommended
|
|
1461
|
+
* format, but other formats are still accepted.
|
|
1462
|
+
* @param {object} [options]
|
|
1463
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1464
|
+
* @returns {Object}
|
|
1465
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
1466
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
1467
|
+
* {@link protos.google.storage.control.v2.AnywhereCache|AnywhereCache}. The API will be called under the hood as needed, once per the page,
|
|
1468
|
+
* so you can stop the iteration when you don't need more results.
|
|
1469
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
1470
|
+
* for more details and examples.
|
|
1471
|
+
* @example <caption>include:samples/generated/v2/storage_control.list_anywhere_caches.js</caption>
|
|
1472
|
+
* region_tag:storage_v2_generated_StorageControl_ListAnywhereCaches_async
|
|
1473
|
+
*/
|
|
1474
|
+
listAnywhereCachesAsync(request, options) {
|
|
1475
|
+
return this.storageControlInternal.listAnywhereCachesAsync(request, options);
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
|
1479
|
+
* method to poll the operation result at intervals as recommended by the API
|
|
1480
|
+
* service.
|
|
1481
|
+
*
|
|
1482
|
+
* @param {Object} request - The request object that will be sent.
|
|
1483
|
+
* @param {string} request.name - The name of the operation resource.
|
|
1484
|
+
* @param {Object=} options
|
|
1485
|
+
* Optional parameters. You can override the default settings for this call,
|
|
1486
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
1487
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
1488
|
+
* for the details.
|
|
1489
|
+
* @param {function(?Error, ?Object)=} callback
|
|
1490
|
+
* The function which will be called with the result of the API call.
|
|
1491
|
+
*
|
|
1492
|
+
* The second parameter to the callback is an object representing
|
|
1493
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
1494
|
+
* @return {Promise} - The promise which resolves to an array.
|
|
1495
|
+
* The first element of the array is an object representing
|
|
1496
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
|
1497
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
|
1498
|
+
*
|
|
1499
|
+
* @example
|
|
1500
|
+
* ```
|
|
1501
|
+
* const client = longrunning.operationsClient();
|
|
1502
|
+
* const name = '';
|
|
1503
|
+
* const [response] = await client.getOperation({name});
|
|
1504
|
+
* // doThingsWith(response)
|
|
1505
|
+
* ```
|
|
1506
|
+
*/
|
|
1507
|
+
getOperation(request, optionsOrCallback, callback) {
|
|
1508
|
+
request = request || {};
|
|
1509
|
+
let options;
|
|
1510
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1511
|
+
callback = optionsOrCallback;
|
|
1512
|
+
options = {};
|
|
1513
|
+
}
|
|
1514
|
+
else {
|
|
1515
|
+
options = optionsOrCallback;
|
|
1516
|
+
}
|
|
1517
|
+
if (callback === undefined) {
|
|
1518
|
+
return this.storageControlInternal.getOperation(request, options);
|
|
1519
|
+
}
|
|
1520
|
+
return this.storageControlInternal.getOperation(request, options, callback);
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Lists operations that match the specified filter in the request. If the
|
|
1524
|
+
* server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
|
|
1525
|
+
*
|
|
1526
|
+
* For-await-of syntax is used with the iterable to recursively get response element on-demand.
|
|
1527
|
+
*
|
|
1528
|
+
* @param {Object} request - The request object that will be sent.
|
|
1529
|
+
* @param {string} request.name - The name of the operation collection.
|
|
1530
|
+
* @param {string} request.filter - The standard list filter.
|
|
1531
|
+
* @param {number=} request.pageSize -
|
|
1532
|
+
* The maximum number of resources contained in the underlying API
|
|
1533
|
+
* response. If page streaming is performed per-resource, this
|
|
1534
|
+
* parameter does not affect the return value. If page streaming is
|
|
1535
|
+
* performed per-page, this determines the maximum number of
|
|
1536
|
+
* resources in a page.
|
|
1537
|
+
* @param {Object=} options
|
|
1538
|
+
* Optional parameters. You can override the default settings for this call,
|
|
1539
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
1540
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
|
1541
|
+
* details.
|
|
1542
|
+
* @returns {Object}
|
|
1543
|
+
* An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
|
|
1544
|
+
*
|
|
1545
|
+
* @example
|
|
1546
|
+
* ```
|
|
1547
|
+
* const client = longrunning.operationsClient();
|
|
1548
|
+
* for await (const response of client.listOperationsAsync(request));
|
|
1549
|
+
* // doThingsWith(response)
|
|
1550
|
+
* ```
|
|
1551
|
+
*/
|
|
1552
|
+
listOperationsAsync(request, options) {
|
|
1553
|
+
return this.storageControlInternal.listOperationsAsync(request, options);
|
|
1554
|
+
}
|
|
1555
|
+
/**
|
|
1556
|
+
* Starts asynchronous cancellation on a long-running operation. The server
|
|
1557
|
+
* makes a best effort to cancel the operation, but success is not
|
|
1558
|
+
* guaranteed. If the server doesn't support this method, it returns
|
|
1559
|
+
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
|
1560
|
+
* {@link Operations.GetOperation} or
|
|
1561
|
+
* other methods to check whether the cancellation succeeded or whether the
|
|
1562
|
+
* operation completed despite cancellation. On successful cancellation,
|
|
1563
|
+
* the operation is not deleted; instead, it becomes an operation with
|
|
1564
|
+
* an {@link Operation.error} value with a {@link google.rpc.Status.code} of
|
|
1565
|
+
* 1, corresponding to `Code.CANCELLED`.
|
|
1566
|
+
*
|
|
1567
|
+
* @param {Object} request - The request object that will be sent.
|
|
1568
|
+
* @param {string} request.name - The name of the operation resource to be cancelled.
|
|
1569
|
+
* @param {Object=} options
|
|
1570
|
+
* Optional parameters. You can override the default settings for this call,
|
|
1571
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
1572
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
|
|
1573
|
+
* details.
|
|
1574
|
+
* @param {function(?Error)=} callback
|
|
1575
|
+
* The function which will be called with the result of the API call.
|
|
1576
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
|
1577
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
|
1578
|
+
* call.
|
|
1579
|
+
*
|
|
1580
|
+
* @example
|
|
1581
|
+
* ```
|
|
1582
|
+
* const client = longrunning.operationsClient();
|
|
1583
|
+
* await client.cancelOperation({name: ''});
|
|
1584
|
+
* ```
|
|
1585
|
+
*/
|
|
1586
|
+
cancelOperation(request, optionsOrCallback, callback) {
|
|
1587
|
+
request = request || {};
|
|
1588
|
+
let options;
|
|
1589
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1590
|
+
callback = optionsOrCallback;
|
|
1591
|
+
options = {};
|
|
1592
|
+
}
|
|
1593
|
+
else {
|
|
1594
|
+
options = optionsOrCallback;
|
|
1595
|
+
}
|
|
1596
|
+
if (callback === undefined) {
|
|
1597
|
+
return this.storageControlInternal.cancelOperation(request, options);
|
|
1598
|
+
}
|
|
1599
|
+
return this.storageControlInternal.cancelOperation(request, options, callback);
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Deletes a long-running operation. This method indicates that the client is
|
|
1603
|
+
* no longer interested in the operation result. It does not cancel the
|
|
1604
|
+
* operation. If the server doesn't support this method, it returns
|
|
1605
|
+
* `google.rpc.Code.UNIMPLEMENTED`.
|
|
1606
|
+
*
|
|
1607
|
+
* @param {Object} request - The request object that will be sent.
|
|
1608
|
+
* @param {string} request.name - The name of the operation resource to be deleted.
|
|
1609
|
+
* @param {Object=} options
|
|
1610
|
+
* Optional parameters. You can override the default settings for this call,
|
|
1611
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
|
1612
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
|
1613
|
+
* for the details.
|
|
1614
|
+
* @param {function(?Error)=} callback
|
|
1615
|
+
* The function which will be called with the result of the API call.
|
|
1616
|
+
* @return {Promise} - The promise which resolves when API call finishes.
|
|
1617
|
+
* The promise has a method named "cancel" which cancels the ongoing API
|
|
1618
|
+
* call.
|
|
1619
|
+
*
|
|
1620
|
+
* @example
|
|
1621
|
+
* ```
|
|
1622
|
+
* const client = longrunning.operationsClient();
|
|
1623
|
+
* await client.deleteOperation({name: ''});
|
|
1624
|
+
* ```
|
|
1625
|
+
*/
|
|
1626
|
+
deleteOperation(request, optionsOrCallback, callback) {
|
|
1627
|
+
request = request || {};
|
|
1628
|
+
let options;
|
|
1629
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1630
|
+
callback = optionsOrCallback;
|
|
1631
|
+
options = {};
|
|
1632
|
+
}
|
|
1633
|
+
else {
|
|
1634
|
+
options = optionsOrCallback;
|
|
1635
|
+
}
|
|
1636
|
+
if (callback === undefined) {
|
|
1637
|
+
return this.storageControlInternal.deleteOperation(request, options);
|
|
1638
|
+
}
|
|
1639
|
+
return this.storageControlInternal.deleteOperation(request, options, callback);
|
|
1640
|
+
}
|
|
1641
|
+
// --------------------
|
|
1642
|
+
// -- Path templates --
|
|
1643
|
+
// --------------------
|
|
1644
|
+
/**
|
|
1645
|
+
* Return a fully-qualified anywhereCache resource name string.
|
|
1646
|
+
*
|
|
1647
|
+
* @param {string} project
|
|
1648
|
+
* @param {string} bucket
|
|
1649
|
+
* @param {string} anywhere_cache
|
|
1650
|
+
* @returns {string} Resource name string.
|
|
1651
|
+
*/
|
|
1652
|
+
anywhereCachePath(project, bucket, anywhereCache) {
|
|
1653
|
+
return this.storageControlInternal.anywhereCachePath(project, bucket, anywhereCache);
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* Parse the project from AnywhereCache resource.
|
|
1657
|
+
*
|
|
1658
|
+
* @param {string} anywhereCacheName
|
|
1659
|
+
* A fully-qualified path representing AnywhereCache resource.
|
|
1660
|
+
* @returns {string} A string representing the project.
|
|
1661
|
+
*/
|
|
1662
|
+
matchProjectFromAnywhereCacheName(anywhereCacheName) {
|
|
1663
|
+
return this.storageControlInternal.matchProjectFromAnywhereCacheName(anywhereCacheName);
|
|
1664
|
+
}
|
|
1665
|
+
/**
|
|
1666
|
+
* Parse the bucket from AnywhereCache resource.
|
|
1667
|
+
*
|
|
1668
|
+
* @param {string} anywhereCacheName
|
|
1669
|
+
* A fully-qualified path representing AnywhereCache resource.
|
|
1670
|
+
* @returns {string} A string representing the bucket.
|
|
1671
|
+
*/
|
|
1672
|
+
matchBucketFromAnywhereCacheName(anywhereCacheName) {
|
|
1673
|
+
return this.storageControlInternal.matchBucketFromAnywhereCacheName(anywhereCacheName);
|
|
1674
|
+
}
|
|
1675
|
+
/**
|
|
1676
|
+
* Parse the anywhere_cache from AnywhereCache resource.
|
|
1677
|
+
*
|
|
1678
|
+
* @param {string} anywhereCacheName
|
|
1679
|
+
* A fully-qualified path representing AnywhereCache resource.
|
|
1680
|
+
* @returns {string} A string representing the anywhere_cache.
|
|
1681
|
+
*/
|
|
1682
|
+
matchAnywhereCacheFromAnywhereCacheName(anywhereCacheName) {
|
|
1683
|
+
return this.storageControlInternal.matchAnywhereCacheFromAnywhereCacheName(anywhereCacheName);
|
|
1684
|
+
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Return a fully-qualified bucket resource name string.
|
|
1687
|
+
*
|
|
1688
|
+
* @param {string} project
|
|
1689
|
+
* @param {string} bucket
|
|
1690
|
+
* @returns {string} Resource name string.
|
|
1691
|
+
*/
|
|
1692
|
+
bucketPath(project, bucket) {
|
|
1693
|
+
return this.storageControlInternal.bucketPath(project, bucket);
|
|
1694
|
+
}
|
|
1695
|
+
/**
|
|
1696
|
+
* Parse the project from Bucket resource.
|
|
1697
|
+
*
|
|
1698
|
+
* @param {string} bucketName
|
|
1699
|
+
* A fully-qualified path representing Bucket resource.
|
|
1700
|
+
* @returns {string} A string representing the project.
|
|
1701
|
+
*/
|
|
1702
|
+
matchProjectFromBucketName(bucketName) {
|
|
1703
|
+
return this.storageControlInternal.matchProjectFromBucketName(bucketName);
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* Parse the bucket from Bucket resource.
|
|
1707
|
+
*
|
|
1708
|
+
* @param {string} bucketName
|
|
1709
|
+
* A fully-qualified path representing Bucket resource.
|
|
1710
|
+
* @returns {string} A string representing the bucket.
|
|
1711
|
+
*/
|
|
1712
|
+
matchBucketFromBucketName(bucketName) {
|
|
1713
|
+
return this.storageControlInternal.matchBucketFromBucketName(bucketName);
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Return a fully-qualified folder resource name string.
|
|
1717
|
+
*
|
|
1718
|
+
* @param {string} project
|
|
1719
|
+
* @param {string} bucket
|
|
1720
|
+
* @param {string} folder
|
|
1721
|
+
* @returns {string} Resource name string.
|
|
1722
|
+
*/
|
|
1723
|
+
folderPath(project, bucket, folder) {
|
|
1724
|
+
return this.storageControlInternal.folderPath(project, bucket, folder);
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* Parse the project from Folder resource.
|
|
1728
|
+
*
|
|
1729
|
+
* @param {string} folderName
|
|
1730
|
+
* A fully-qualified path representing Folder resource.
|
|
1731
|
+
* @returns {string} A string representing the project.
|
|
1732
|
+
*/
|
|
1733
|
+
matchProjectFromFolderName(folderName) {
|
|
1734
|
+
return this.storageControlInternal.matchProjectFromFolderName(folderName);
|
|
1735
|
+
}
|
|
1736
|
+
/**
|
|
1737
|
+
* Parse the bucket from Folder resource.
|
|
1738
|
+
*
|
|
1739
|
+
* @param {string} folderName
|
|
1740
|
+
* A fully-qualified path representing Folder resource.
|
|
1741
|
+
* @returns {string} A string representing the bucket.
|
|
1742
|
+
*/
|
|
1743
|
+
matchBucketFromFolderName(folderName) {
|
|
1744
|
+
return this.storageControlInternal.matchBucketFromFolderName(folderName);
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* Parse the folder from Folder resource.
|
|
1748
|
+
*
|
|
1749
|
+
* @param {string} folderName
|
|
1750
|
+
* A fully-qualified path representing Folder resource.
|
|
1751
|
+
* @returns {string} A string representing the folder.
|
|
1752
|
+
*/
|
|
1753
|
+
matchFolderFromFolderName(folderName) {
|
|
1754
|
+
return this.storageControlInternal.matchFolderFromFolderName(folderName);
|
|
1755
|
+
}
|
|
1756
|
+
/**
|
|
1757
|
+
* Return a fully-qualified folderLocationIntelligenceConfig resource name string.
|
|
1758
|
+
*
|
|
1759
|
+
* @param {string} folder
|
|
1760
|
+
* @param {string} location
|
|
1761
|
+
* @returns {string} Resource name string.
|
|
1762
|
+
*/
|
|
1763
|
+
folderLocationIntelligenceConfigPath(folder, location) {
|
|
1764
|
+
return this.storageControlInternal.folderLocationIntelligenceConfigPath(folder, location);
|
|
1765
|
+
}
|
|
1766
|
+
/**
|
|
1767
|
+
* Parse the folder from FolderLocationIntelligenceConfig resource.
|
|
1768
|
+
*
|
|
1769
|
+
* @param {string} folderLocationIntelligenceConfigName
|
|
1770
|
+
* A fully-qualified path representing folder_location_intelligenceConfig resource.
|
|
1771
|
+
* @returns {string} A string representing the folder.
|
|
1772
|
+
*/
|
|
1773
|
+
matchFolderFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName) {
|
|
1774
|
+
return this.storageControlInternal.matchFolderFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName);
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Parse the location from FolderLocationIntelligenceConfig resource.
|
|
1778
|
+
*
|
|
1779
|
+
* @param {string} folderLocationIntelligenceConfigName
|
|
1780
|
+
* A fully-qualified path representing folder_location_intelligenceConfig resource.
|
|
1781
|
+
* @returns {string} A string representing the location.
|
|
1782
|
+
*/
|
|
1783
|
+
matchLocationFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName) {
|
|
1784
|
+
return this.storageControlInternal.matchLocationFromFolderLocationIntelligenceConfigName(folderLocationIntelligenceConfigName);
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* Return a fully-qualified managedFolder resource name string.
|
|
1788
|
+
*
|
|
1789
|
+
* @param {string} project
|
|
1790
|
+
* @param {string} bucket
|
|
1791
|
+
* @param {string} managed_folder
|
|
1792
|
+
* @returns {string} Resource name string.
|
|
1793
|
+
*/
|
|
1794
|
+
managedFolderPath(project, bucket, managedFolder) {
|
|
1795
|
+
return this.storageControlInternal.managedFolderPath(project, bucket, managedFolder);
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* Parse the project from ManagedFolder resource.
|
|
1799
|
+
*
|
|
1800
|
+
* @param {string} managedFolderName
|
|
1801
|
+
* A fully-qualified path representing ManagedFolder resource.
|
|
1802
|
+
* @returns {string} A string representing the project.
|
|
1803
|
+
*/
|
|
1804
|
+
matchProjectFromManagedFolderName(managedFolderName) {
|
|
1805
|
+
return this.storageControlInternal.matchProjectFromManagedFolderName(managedFolderName);
|
|
1806
|
+
}
|
|
1807
|
+
/**
|
|
1808
|
+
* Parse the bucket from ManagedFolder resource.
|
|
1809
|
+
*
|
|
1810
|
+
* @param {string} managedFolderName
|
|
1811
|
+
* A fully-qualified path representing ManagedFolder resource.
|
|
1812
|
+
* @returns {string} A string representing the bucket.
|
|
1813
|
+
*/
|
|
1814
|
+
matchBucketFromManagedFolderName(managedFolderName) {
|
|
1815
|
+
return this.storageControlInternal.matchBucketFromManagedFolderName(managedFolderName);
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* Parse the managed_folder from ManagedFolder resource.
|
|
1819
|
+
*
|
|
1820
|
+
* @param {string} managedFolderName
|
|
1821
|
+
* A fully-qualified path representing ManagedFolder resource.
|
|
1822
|
+
* @returns {string} A string representing the managed_folder.
|
|
1823
|
+
*/
|
|
1824
|
+
matchManagedFolderFromManagedFolderName(managedFolderName) {
|
|
1825
|
+
return this.storageControlInternal.matchManagedFolderFromManagedFolderName(managedFolderName);
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* Return a fully-qualified orgLocationIntelligenceConfig resource name string.
|
|
1829
|
+
*
|
|
1830
|
+
* @param {string} org
|
|
1831
|
+
* @param {string} location
|
|
1832
|
+
* @returns {string} Resource name string.
|
|
1833
|
+
*/
|
|
1834
|
+
orgLocationIntelligenceConfigPath(org, location) {
|
|
1835
|
+
return this.storageControlInternal.orgLocationIntelligenceConfigPath(org, location);
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Parse the org from OrgLocationIntelligenceConfig resource.
|
|
1839
|
+
*
|
|
1840
|
+
* @param {string} orgLocationIntelligenceConfigName
|
|
1841
|
+
* A fully-qualified path representing org_location_intelligenceConfig resource.
|
|
1842
|
+
* @returns {string} A string representing the org.
|
|
1843
|
+
*/
|
|
1844
|
+
matchOrgFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName) {
|
|
1845
|
+
return this.storageControlInternal.matchOrgFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName);
|
|
1846
|
+
}
|
|
1847
|
+
/**
|
|
1848
|
+
* Parse the location from OrgLocationIntelligenceConfig resource.
|
|
1849
|
+
*
|
|
1850
|
+
* @param {string} orgLocationIntelligenceConfigName
|
|
1851
|
+
* A fully-qualified path representing org_location_intelligenceConfig resource.
|
|
1852
|
+
* @returns {string} A string representing the location.
|
|
1853
|
+
*/
|
|
1854
|
+
matchLocationFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName) {
|
|
1855
|
+
return this.storageControlInternal.matchLocationFromOrgLocationIntelligenceConfigName(orgLocationIntelligenceConfigName);
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* Return a fully-qualified project resource name string.
|
|
1859
|
+
*
|
|
1860
|
+
* @param {string} project
|
|
1861
|
+
* @returns {string} Resource name string.
|
|
1862
|
+
*/
|
|
1863
|
+
projectPath(project) {
|
|
1864
|
+
return this.storageControlInternal.projectPath(project);
|
|
1865
|
+
}
|
|
1866
|
+
/**
|
|
1867
|
+
* Parse the project from Project resource.
|
|
1868
|
+
*
|
|
1869
|
+
* @param {string} projectName
|
|
1870
|
+
* A fully-qualified path representing Project resource.
|
|
1871
|
+
* @returns {string} A string representing the project.
|
|
1872
|
+
*/
|
|
1873
|
+
matchProjectFromProjectName(projectName) {
|
|
1874
|
+
return this.storageControlInternal.matchProjectFromProjectName(projectName);
|
|
1875
|
+
}
|
|
1876
|
+
/**
|
|
1877
|
+
* Return a fully-qualified projectLocationIntelligenceConfig resource name string.
|
|
1878
|
+
*
|
|
1879
|
+
* @param {string} project
|
|
1880
|
+
* @param {string} location
|
|
1881
|
+
* @returns {string} Resource name string.
|
|
1882
|
+
*/
|
|
1883
|
+
projectLocationIntelligenceConfigPath(project, location) {
|
|
1884
|
+
return this.storageControlInternal.projectLocationIntelligenceConfigPath(project, location);
|
|
1885
|
+
}
|
|
1886
|
+
/**
|
|
1887
|
+
* Parse the project from ProjectLocationIntelligenceConfig resource.
|
|
1888
|
+
*
|
|
1889
|
+
* @param {string} projectLocationIntelligenceConfigName
|
|
1890
|
+
* A fully-qualified path representing project_location_intelligenceConfig resource.
|
|
1891
|
+
* @returns {string} A string representing the project.
|
|
1892
|
+
*/
|
|
1893
|
+
matchProjectFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName) {
|
|
1894
|
+
return this.storageControlInternal.matchProjectFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName);
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* Parse the location from ProjectLocationIntelligenceConfig resource.
|
|
1898
|
+
*
|
|
1899
|
+
* @param {string} projectLocationIntelligenceConfigName
|
|
1900
|
+
* A fully-qualified path representing project_location_intelligenceConfig resource.
|
|
1901
|
+
* @returns {string} A string representing the location.
|
|
1902
|
+
*/
|
|
1903
|
+
matchLocationFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName) {
|
|
1904
|
+
return this.storageControlInternal.matchLocationFromProjectLocationIntelligenceConfigName(projectLocationIntelligenceConfigName);
|
|
1905
|
+
}
|
|
1906
|
+
/**
|
|
1907
|
+
* Return a fully-qualified storageLayout resource name string.
|
|
1908
|
+
*
|
|
1909
|
+
* @param {string} project
|
|
1910
|
+
* @param {string} bucket
|
|
1911
|
+
* @returns {string} Resource name string.
|
|
1912
|
+
*/
|
|
1913
|
+
storageLayoutPath(project, bucket) {
|
|
1914
|
+
return this.storageControlInternal.storageLayoutPath(project, bucket);
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Parse the project from StorageLayout resource.
|
|
1918
|
+
*
|
|
1919
|
+
* @param {string} storageLayoutName
|
|
1920
|
+
* A fully-qualified path representing StorageLayout resource.
|
|
1921
|
+
* @returns {string} A string representing the project.
|
|
1922
|
+
*/
|
|
1923
|
+
matchProjectFromStorageLayoutName(storageLayoutName) {
|
|
1924
|
+
return this.storageControlInternal.matchProjectFromStorageLayoutName(storageLayoutName);
|
|
1925
|
+
}
|
|
1926
|
+
/**
|
|
1927
|
+
* Parse the bucket from StorageLayout resource.
|
|
1928
|
+
*
|
|
1929
|
+
* @param {string} storageLayoutName
|
|
1930
|
+
* A fully-qualified path representing StorageLayout resource.
|
|
1931
|
+
* @returns {string} A string representing the bucket.
|
|
1932
|
+
*/
|
|
1933
|
+
matchBucketFromStorageLayoutName(storageLayoutName) {
|
|
1934
|
+
return this.storageControlInternal.matchBucketFromStorageLayoutName(storageLayoutName);
|
|
1935
|
+
}
|
|
1936
|
+
/**
|
|
1937
|
+
* Terminate the gRPC channel and close the client.
|
|
1938
|
+
*
|
|
1939
|
+
* The client will no longer be usable and all future behavior is undefined.
|
|
1940
|
+
* @returns {Promise} A promise that resolves when the client is closed.
|
|
1941
|
+
*/
|
|
1942
|
+
close() {
|
|
1943
|
+
return Promise.all([
|
|
1944
|
+
this.storageControlInternal.close(),
|
|
1945
|
+
this.storageClient.close(),
|
|
1946
|
+
]).then(() => { });
|
|
1947
|
+
}
|
|
1948
|
+
// -------------------
|
|
1949
|
+
// -- Service calls --
|
|
1950
|
+
// -------------------
|
|
1951
|
+
/**
|
|
1952
|
+
* Permanently deletes an empty bucket.
|
|
1953
|
+
* The request fails if there are any live or
|
|
1954
|
+
* noncurrent objects in the bucket, but the request succeeds if the
|
|
1955
|
+
* bucket only contains soft-deleted objects or incomplete uploads, such
|
|
1956
|
+
* as ongoing XML API multipart uploads. Does not permanently delete
|
|
1957
|
+
* soft-deleted objects.
|
|
1958
|
+
*
|
|
1959
|
+
* When this API is used to delete a bucket containing an object that has a
|
|
1960
|
+
* soft delete policy
|
|
1961
|
+
* enabled, the object becomes soft deleted, and the
|
|
1962
|
+
* `softDeleteTime` and `hardDeleteTime` properties are set on the
|
|
1963
|
+
* object.
|
|
1964
|
+
*
|
|
1965
|
+
* Objects and multipart uploads that were in the bucket at the time of
|
|
1966
|
+
* deletion are also retained for the specified retention duration. When
|
|
1967
|
+
* a soft-deleted bucket reaches the end of its retention duration, it
|
|
1968
|
+
* is permanently deleted. The `hardDeleteTime` of the bucket always
|
|
1969
|
+
* equals
|
|
1970
|
+
* or exceeds the expiration time of the last soft-deleted object in the
|
|
1971
|
+
* bucket.
|
|
1972
|
+
*
|
|
1973
|
+
* **IAM Permissions**:
|
|
1974
|
+
*
|
|
1975
|
+
* Requires `storage.buckets.delete` IAM permission on the bucket.
|
|
1976
|
+
*
|
|
1977
|
+
* @param {Object} request
|
|
1978
|
+
* The request object that will be sent.
|
|
1979
|
+
* @param {string} request.name
|
|
1980
|
+
* Required. Name of a bucket to delete.
|
|
1981
|
+
* @param {number} request.ifMetagenerationMatch
|
|
1982
|
+
* If set, only deletes the bucket if its metageneration matches this value.
|
|
1983
|
+
* @param {number} request.ifMetagenerationNotMatch
|
|
1984
|
+
* If set, only deletes the bucket if its metageneration does not match this
|
|
1985
|
+
* value.
|
|
1986
|
+
* @param {object} [options]
|
|
1987
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1988
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1989
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
1990
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1991
|
+
* for more details and examples.
|
|
1992
|
+
* @example <caption>include:samples/generated/v2/storage.delete_bucket.js</caption>
|
|
1993
|
+
* region_tag:storage_v2_generated_Storage_DeleteBucket_async
|
|
1994
|
+
*/
|
|
1995
|
+
deleteBucket(request, optionsOrCallback, callback) {
|
|
1996
|
+
request = request || {};
|
|
1997
|
+
let options;
|
|
1998
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
1999
|
+
callback = optionsOrCallback;
|
|
2000
|
+
options = {};
|
|
2001
|
+
}
|
|
2002
|
+
else {
|
|
2003
|
+
options = optionsOrCallback;
|
|
2004
|
+
}
|
|
2005
|
+
if (callback === undefined) {
|
|
2006
|
+
return this.storageClient.deleteBucket(request, options);
|
|
2007
|
+
}
|
|
2008
|
+
return this.storageClient.deleteBucket(request, options, callback);
|
|
2009
|
+
}
|
|
2010
|
+
/**
|
|
2011
|
+
* Returns metadata for the specified bucket.
|
|
2012
|
+
*
|
|
2013
|
+
* **IAM Permissions**:
|
|
2014
|
+
*
|
|
2015
|
+
* Requires `storage.buckets.get`
|
|
2016
|
+
* IAM permission on
|
|
2017
|
+
* the bucket. Additionally, to return specific bucket metadata, the
|
|
2018
|
+
* authenticated user must have the following permissions:
|
|
2019
|
+
*
|
|
2020
|
+
* - To return the IAM policies: `storage.buckets.getIamPolicy`
|
|
2021
|
+
* - To return the bucket IP filtering rules: `storage.buckets.getIpFilter`
|
|
2022
|
+
*
|
|
2023
|
+
* @param {Object} request
|
|
2024
|
+
* The request object that will be sent.
|
|
2025
|
+
* @param {string} request.name
|
|
2026
|
+
* Required. Name of a bucket.
|
|
2027
|
+
* @param {number} request.ifMetagenerationMatch
|
|
2028
|
+
* If set, only gets the bucket metadata if its metageneration matches this
|
|
2029
|
+
* value.
|
|
2030
|
+
* @param {number} request.ifMetagenerationNotMatch
|
|
2031
|
+
* If set, and if the bucket's current metageneration matches the specified
|
|
2032
|
+
* value, the request returns an error.
|
|
2033
|
+
* @param {google.protobuf.FieldMask} request.readMask
|
|
2034
|
+
* Mask specifying which fields to read.
|
|
2035
|
+
* A `*` field might be used to indicate all fields.
|
|
2036
|
+
* If no mask is specified, it defaults to all fields.
|
|
2037
|
+
* @param {object} [options]
|
|
2038
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2039
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2040
|
+
* The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
|
|
2041
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
2042
|
+
* for more details and examples.
|
|
2043
|
+
* @example <caption>include:samples/generated/v2/storage.get_bucket.js</caption>
|
|
2044
|
+
* region_tag:storage_v2_generated_Storage_GetBucket_async
|
|
2045
|
+
*/
|
|
2046
|
+
getBucket(request, optionsOrCallback, callback) {
|
|
2047
|
+
request = request || {};
|
|
2048
|
+
let options;
|
|
2049
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2050
|
+
callback = optionsOrCallback;
|
|
2051
|
+
options = {};
|
|
2052
|
+
}
|
|
2053
|
+
else {
|
|
2054
|
+
options = optionsOrCallback;
|
|
2055
|
+
}
|
|
2056
|
+
if (callback === undefined) {
|
|
2057
|
+
return this.storageClient.getBucket(request, options);
|
|
2058
|
+
}
|
|
2059
|
+
return this.storageClient.getBucket(request, options, callback);
|
|
2060
|
+
}
|
|
2061
|
+
/**
|
|
2062
|
+
* Creates a new bucket.
|
|
2063
|
+
*
|
|
2064
|
+
* **IAM Permissions**:
|
|
2065
|
+
*
|
|
2066
|
+
* Requires `storage.buckets.create` IAM permission on the bucket.
|
|
2067
|
+
* Additionally, to enable specific bucket features, the authenticated user
|
|
2068
|
+
* must have the following permissions:
|
|
2069
|
+
*
|
|
2070
|
+
* - To enable object retention using the `enableObjectRetention` query
|
|
2071
|
+
* parameter: `storage.buckets.enableObjectRetention`
|
|
2072
|
+
* - To set the bucket IP filtering rules: `storage.buckets.setIpFilter`
|
|
2073
|
+
*
|
|
2074
|
+
* @param {Object} request
|
|
2075
|
+
* The request object that will be sent.
|
|
2076
|
+
* @param {string} request.parent
|
|
2077
|
+
* Required. The project to which this bucket belongs. This field must either
|
|
2078
|
+
* be empty or `projects/_`. The project ID that owns this bucket should be
|
|
2079
|
+
* specified in the `bucket.project` field.
|
|
2080
|
+
* @param {google.storage.v2.Bucket} [request.bucket]
|
|
2081
|
+
* Optional. Properties of the new bucket being inserted.
|
|
2082
|
+
* The name of the bucket is specified in the `bucket_id` field. Populating
|
|
2083
|
+
* `bucket.name` field results in an error.
|
|
2084
|
+
* The project of the bucket must be specified in the `bucket.project` field.
|
|
2085
|
+
* This field must be in `projects/{projectIdentifier}` format,
|
|
2086
|
+
* {projectIdentifier} can be the project ID or project number. The `parent`
|
|
2087
|
+
* field must be either empty or `projects/_`.
|
|
2088
|
+
* @param {string} request.bucketId
|
|
2089
|
+
* Required. The ID to use for this bucket, which becomes the final component
|
|
2090
|
+
* of the bucket's resource name. For example, the value `foo` might result in
|
|
2091
|
+
* a bucket with the name `projects/123456/buckets/foo`.
|
|
2092
|
+
* @param {string} [request.predefinedAcl]
|
|
2093
|
+
* Optional. Apply a predefined set of access controls to this bucket.
|
|
2094
|
+
* Valid values are `authenticatedRead`, `private`, `projectPrivate`,
|
|
2095
|
+
* `publicRead`, or `publicReadWrite`.
|
|
2096
|
+
* @param {string} [request.predefinedDefaultObjectAcl]
|
|
2097
|
+
* Optional. Apply a predefined set of default object access controls to this
|
|
2098
|
+
* bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
|
|
2099
|
+
* `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
|
|
2100
|
+
* @param {boolean} [request.enableObjectRetention]
|
|
2101
|
+
* Optional. If true, enable object retention on the bucket.
|
|
2102
|
+
* @param {object} [options]
|
|
2103
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2104
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2105
|
+
* The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
|
|
2106
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
2107
|
+
* for more details and examples.
|
|
2108
|
+
* @example <caption>include:samples/generated/v2/storage.create_bucket.js</caption>
|
|
2109
|
+
* region_tag:storage_v2_generated_Storage_CreateBucket_async
|
|
2110
|
+
*/
|
|
2111
|
+
createBucket(request, optionsOrCallback, callback) {
|
|
2112
|
+
request = request || {};
|
|
2113
|
+
let options;
|
|
2114
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2115
|
+
callback = optionsOrCallback;
|
|
2116
|
+
options = {};
|
|
2117
|
+
}
|
|
2118
|
+
else {
|
|
2119
|
+
options = optionsOrCallback;
|
|
2120
|
+
}
|
|
2121
|
+
if (callback === undefined) {
|
|
2122
|
+
return this.storageClient.createBucket(request, options);
|
|
2123
|
+
}
|
|
2124
|
+
return this.storageClient.createBucket(request, options, callback);
|
|
2125
|
+
}
|
|
2126
|
+
/**
|
|
2127
|
+
* Permanently locks the retention
|
|
2128
|
+
* policy that is
|
|
2129
|
+
* currently applied to the specified bucket.
|
|
2130
|
+
*
|
|
2131
|
+
* Caution: Locking a bucket is an
|
|
2132
|
+
* irreversible action. Once you lock a bucket:
|
|
2133
|
+
*
|
|
2134
|
+
* - You cannot remove the retention policy from the bucket.
|
|
2135
|
+
* - You cannot decrease the retention period for the policy.
|
|
2136
|
+
*
|
|
2137
|
+
* Once locked, you must delete the entire bucket in order to remove the
|
|
2138
|
+
* bucket's retention policy. However, before you can delete the bucket, you
|
|
2139
|
+
* must delete all the objects in the bucket, which is only
|
|
2140
|
+
* possible if all the objects have reached the retention period set by the
|
|
2141
|
+
* retention policy.
|
|
2142
|
+
*
|
|
2143
|
+
* **IAM Permissions**:
|
|
2144
|
+
*
|
|
2145
|
+
* Requires `storage.buckets.update` IAM permission on the bucket.
|
|
2146
|
+
*
|
|
2147
|
+
* @param {Object} request
|
|
2148
|
+
* The request object that will be sent.
|
|
2149
|
+
* @param {string} request.bucket
|
|
2150
|
+
* Required. Name of a bucket.
|
|
2151
|
+
* @param {number} request.ifMetagenerationMatch
|
|
2152
|
+
* Required. Makes the operation conditional on whether bucket's current
|
|
2153
|
+
* metageneration matches the given value. Must be positive.
|
|
2154
|
+
* @param {object} [options]
|
|
2155
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2156
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2157
|
+
* The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
|
|
2158
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
2159
|
+
* for more details and examples.
|
|
2160
|
+
* @example <caption>include:samples/generated/v2/storage.lock_bucket_retention_policy.js</caption>
|
|
2161
|
+
* region_tag:storage_v2_generated_Storage_LockBucketRetentionPolicy_async
|
|
2162
|
+
*/
|
|
2163
|
+
lockBucketRetentionPolicy(request, optionsOrCallback, callback) {
|
|
2164
|
+
request = request || {};
|
|
2165
|
+
let options;
|
|
2166
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2167
|
+
callback = optionsOrCallback;
|
|
2168
|
+
options = {};
|
|
2169
|
+
}
|
|
2170
|
+
else {
|
|
2171
|
+
options = optionsOrCallback;
|
|
2172
|
+
}
|
|
2173
|
+
if (callback === undefined) {
|
|
2174
|
+
return this.storageClient.lockBucketRetentionPolicy(request, options);
|
|
2175
|
+
}
|
|
2176
|
+
return this.storageClient.lockBucketRetentionPolicy(request, options, callback);
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* Updates a bucket. Changes to the bucket are readable immediately after
|
|
2180
|
+
* writing, but configuration changes might take time to propagate. This
|
|
2181
|
+
* method supports `patch` semantics.
|
|
2182
|
+
*
|
|
2183
|
+
* **IAM Permissions**:
|
|
2184
|
+
*
|
|
2185
|
+
* Requires `storage.buckets.update` IAM permission on the bucket.
|
|
2186
|
+
* Additionally, to enable specific bucket features, the authenticated user
|
|
2187
|
+
* must have the following permissions:
|
|
2188
|
+
*
|
|
2189
|
+
* - To set bucket IP filtering rules: `storage.buckets.setIpFilter`
|
|
2190
|
+
* - To update public access prevention policies or access control lists
|
|
2191
|
+
* (ACLs): `storage.buckets.setIamPolicy`
|
|
2192
|
+
*
|
|
2193
|
+
* @param {Object} request
|
|
2194
|
+
* The request object that will be sent.
|
|
2195
|
+
* @param {google.storage.v2.Bucket} request.bucket
|
|
2196
|
+
* Required. The bucket to update.
|
|
2197
|
+
* The bucket's `name` field is used to identify the bucket.
|
|
2198
|
+
* @param {number} request.ifMetagenerationMatch
|
|
2199
|
+
* If set, the request modifies the bucket if its metageneration matches this
|
|
2200
|
+
* value.
|
|
2201
|
+
* @param {number} request.ifMetagenerationNotMatch
|
|
2202
|
+
* If set, the request modifies the bucket if its metageneration doesn't
|
|
2203
|
+
* match this value.
|
|
2204
|
+
* @param {string} [request.predefinedAcl]
|
|
2205
|
+
* Optional. Apply a predefined set of access controls to this bucket.
|
|
2206
|
+
* Valid values are `authenticatedRead`, `private`, `projectPrivate`,
|
|
2207
|
+
* `publicRead`, or `publicReadWrite`.
|
|
2208
|
+
* @param {string} [request.predefinedDefaultObjectAcl]
|
|
2209
|
+
* Optional. Apply a predefined set of default object access controls to this
|
|
2210
|
+
* bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
|
|
2211
|
+
* `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
|
|
2212
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
2213
|
+
* Required. List of fields to be updated.
|
|
2214
|
+
*
|
|
2215
|
+
* To specify ALL fields, equivalent to the JSON API's "update" function,
|
|
2216
|
+
* specify a single field with the value `*`. Note: not recommended. If a new
|
|
2217
|
+
* field is introduced at a later time, an older client updating with the `*`
|
|
2218
|
+
* might accidentally reset the new field's value.
|
|
2219
|
+
*
|
|
2220
|
+
* Not specifying any fields is an error.
|
|
2221
|
+
* @param {object} [options]
|
|
2222
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2223
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2224
|
+
* The first element of the array is an object representing {@link protos.google.storage.v2.Bucket|Bucket}.
|
|
2225
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
2226
|
+
* for more details and examples.
|
|
2227
|
+
* @example <caption>include:samples/generated/v2/storage.update_bucket.js</caption>
|
|
2228
|
+
* region_tag:storage_v2_generated_Storage_UpdateBucket_async
|
|
2229
|
+
*/
|
|
2230
|
+
updateBucket(request, optionsOrCallback, callback) {
|
|
2231
|
+
request = request || {};
|
|
2232
|
+
let options;
|
|
2233
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2234
|
+
callback = optionsOrCallback;
|
|
2235
|
+
options = {};
|
|
2236
|
+
}
|
|
2237
|
+
else {
|
|
2238
|
+
options = optionsOrCallback;
|
|
2239
|
+
}
|
|
2240
|
+
if (callback === undefined) {
|
|
2241
|
+
return this.storageClient.updateBucket(request, options);
|
|
2242
|
+
}
|
|
2243
|
+
return this.storageClient.updateBucket(request, options, callback);
|
|
2244
|
+
}
|
|
2245
|
+
/**
|
|
2246
|
+
* Retrieves a list of buckets for a given project, ordered
|
|
2247
|
+
* lexicographically by name.
|
|
2248
|
+
*
|
|
2249
|
+
* **IAM Permissions**:
|
|
2250
|
+
*
|
|
2251
|
+
* Requires `storage.buckets.list` IAM permission on the bucket.
|
|
2252
|
+
* Additionally, to enable specific bucket features, the authenticated
|
|
2253
|
+
* user must have the following permissions:
|
|
2254
|
+
*
|
|
2255
|
+
* - To list the IAM policies: `storage.buckets.getIamPolicy`
|
|
2256
|
+
* - To list the bucket IP filtering rules: `storage.buckets.getIpFilter`
|
|
2257
|
+
*
|
|
2258
|
+
* @param {Object} request
|
|
2259
|
+
* The request object that will be sent.
|
|
2260
|
+
* @param {string} request.parent
|
|
2261
|
+
* Required. The project whose buckets we are listing.
|
|
2262
|
+
* @param {number} [request.pageSize]
|
|
2263
|
+
* Optional. Maximum number of buckets to return in a single response. The
|
|
2264
|
+
* service uses this parameter or `1,000` items, whichever is smaller. If
|
|
2265
|
+
* `acl` is present in the `read_mask`, the service uses this parameter of
|
|
2266
|
+
* `200` items, whichever is smaller.
|
|
2267
|
+
* @param {string} [request.pageToken]
|
|
2268
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
2269
|
+
* set of results to view.
|
|
2270
|
+
* @param {string} [request.prefix]
|
|
2271
|
+
* Optional. Filter results to buckets whose names begin with this prefix.
|
|
2272
|
+
* @param {google.protobuf.FieldMask} request.readMask
|
|
2273
|
+
* Mask specifying which fields to read from each result.
|
|
2274
|
+
* If no mask is specified, it defaults to all fields except `items.
|
|
2275
|
+
* owner`, `items.acl`, and `items.default_object_acl`.
|
|
2276
|
+
* `*` might be used to mean "all fields".
|
|
2277
|
+
* @param {boolean} [request.returnPartialSuccess]
|
|
2278
|
+
* Optional. Allows listing of buckets, even if there are buckets that are
|
|
2279
|
+
* unreachable.
|
|
2280
|
+
* @param {object} [options]
|
|
2281
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2282
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2283
|
+
* The first element of the array is Array of {@link protos.google.storage.v2.Bucket|Bucket}.
|
|
2284
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2285
|
+
* times as needed and will merge results from all the pages into this array.
|
|
2286
|
+
* Note that it can affect your quota.
|
|
2287
|
+
* We recommend using `listBucketsAsync()`
|
|
2288
|
+
* method described below for async iteration which you can stop as needed.
|
|
2289
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2290
|
+
* for more details and examples.
|
|
2291
|
+
*/
|
|
2292
|
+
listBuckets(request, optionsOrCallback, callback) {
|
|
2293
|
+
request = request || {};
|
|
2294
|
+
let options;
|
|
2295
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
2296
|
+
callback = optionsOrCallback;
|
|
2297
|
+
options = {};
|
|
2298
|
+
}
|
|
2299
|
+
else {
|
|
2300
|
+
options = optionsOrCallback;
|
|
2301
|
+
}
|
|
2302
|
+
if (callback === undefined) {
|
|
2303
|
+
return this.storageClient.listBuckets(request, options);
|
|
2304
|
+
}
|
|
2305
|
+
return this.storageClient.listBuckets(request, options, callback);
|
|
2306
|
+
}
|
|
2307
|
+
/**
|
|
2308
|
+
* Equivalent to `listBuckets`, but returns a NodeJS Stream object.
|
|
2309
|
+
* @param {Object} request
|
|
2310
|
+
* The request object that will be sent.
|
|
2311
|
+
* @param {string} request.parent
|
|
2312
|
+
* Required. The project whose buckets we are listing.
|
|
2313
|
+
* @param {number} [request.pageSize]
|
|
2314
|
+
* Optional. Maximum number of buckets to return in a single response. The
|
|
2315
|
+
* service uses this parameter or `1,000` items, whichever is smaller. If
|
|
2316
|
+
* `acl` is present in the `read_mask`, the service uses this parameter of
|
|
2317
|
+
* `200` items, whichever is smaller.
|
|
2318
|
+
* @param {string} [request.pageToken]
|
|
2319
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
2320
|
+
* set of results to view.
|
|
2321
|
+
* @param {string} [request.prefix]
|
|
2322
|
+
* Optional. Filter results to buckets whose names begin with this prefix.
|
|
2323
|
+
* @param {google.protobuf.FieldMask} request.readMask
|
|
2324
|
+
* Mask specifying which fields to read from each result.
|
|
2325
|
+
* If no mask is specified, it defaults to all fields except `items.
|
|
2326
|
+
* owner`, `items.acl`, and `items.default_object_acl`.
|
|
2327
|
+
* `*` might be used to mean "all fields".
|
|
2328
|
+
* @param {boolean} [request.returnPartialSuccess]
|
|
2329
|
+
* Optional. Allows listing of buckets, even if there are buckets that are
|
|
2330
|
+
* unreachable.
|
|
2331
|
+
* @param {object} [options]
|
|
2332
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2333
|
+
* @returns {Stream}
|
|
2334
|
+
* An object stream which emits an object representing {@link protos.google.storage.v2.Bucket|Bucket} on 'data' event.
|
|
2335
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2336
|
+
* times as needed. Note that it can affect your quota.
|
|
2337
|
+
* We recommend using `listBucketsAsync()`
|
|
2338
|
+
* method described below for async iteration which you can stop as needed.
|
|
2339
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2340
|
+
* for more details and examples.
|
|
2341
|
+
*/
|
|
2342
|
+
listBucketsStream(request, options) {
|
|
2343
|
+
return this.storageClient.listBucketsStream(request, options);
|
|
2344
|
+
}
|
|
2345
|
+
/**
|
|
2346
|
+
* Equivalent to `listBuckets`, but returns an iterable object.
|
|
2347
|
+
*
|
|
2348
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2349
|
+
* @param {Object} request
|
|
2350
|
+
* The request object that will be sent.
|
|
2351
|
+
* @param {string} request.parent
|
|
2352
|
+
* Required. The project whose buckets we are listing.
|
|
2353
|
+
* @param {number} [request.pageSize]
|
|
2354
|
+
* Optional. Maximum number of buckets to return in a single response. The
|
|
2355
|
+
* service uses this parameter or `1,000` items, whichever is smaller. If
|
|
2356
|
+
* `acl` is present in the `read_mask`, the service uses this parameter of
|
|
2357
|
+
* `200` items, whichever is smaller.
|
|
2358
|
+
* @param {string} [request.pageToken]
|
|
2359
|
+
* Optional. A previously-returned page token representing part of the larger
|
|
2360
|
+
* set of results to view.
|
|
2361
|
+
* @param {string} [request.prefix]
|
|
2362
|
+
* Optional. Filter results to buckets whose names begin with this prefix.
|
|
2363
|
+
* @param {google.protobuf.FieldMask} request.readMask
|
|
2364
|
+
* Mask specifying which fields to read from each result.
|
|
2365
|
+
* If no mask is specified, it defaults to all fields except `items.
|
|
2366
|
+
* owner`, `items.acl`, and `items.default_object_acl`.
|
|
2367
|
+
* `*` might be used to mean "all fields".
|
|
2368
|
+
* @param {boolean} [request.returnPartialSuccess]
|
|
2369
|
+
* Optional. Allows listing of buckets, even if there are buckets that are
|
|
2370
|
+
* unreachable.
|
|
2371
|
+
* @param {object} [options]
|
|
2372
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2373
|
+
* @returns {Object}
|
|
2374
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
2375
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
2376
|
+
* {@link protos.google.storage.v2.Bucket|Bucket}. The API will be called under the hood as needed, once per the page,
|
|
2377
|
+
* so you can stop the iteration when you don't need more results.
|
|
2378
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2379
|
+
* for more details and examples.
|
|
2380
|
+
* @example <caption>include:samples/generated/v2/storage.list_buckets.js</caption>
|
|
2381
|
+
* region_tag:storage_v2_generated_Storage_ListBuckets_async
|
|
2382
|
+
*/
|
|
2383
|
+
listBucketsAsync(request, options) {
|
|
2384
|
+
return this.storageClient.listBucketsAsync(request, options);
|
|
2385
|
+
}
|
|
2386
|
+
/**
|
|
2387
|
+
* Return a fully-qualified cryptoKey resource name string.
|
|
2388
|
+
*
|
|
2389
|
+
* @param {string} project
|
|
2390
|
+
* @param {string} location
|
|
2391
|
+
* @param {string} key_ring
|
|
2392
|
+
* @param {string} crypto_key
|
|
2393
|
+
* @returns {string} Resource name string.
|
|
2394
|
+
*/
|
|
2395
|
+
cryptoKeyPath(project, location, keyRing, cryptoKey) {
|
|
2396
|
+
return this.storageClient.cryptoKeyPath(project, location, keyRing, cryptoKey);
|
|
2397
|
+
}
|
|
2398
|
+
/**
|
|
2399
|
+
* Parse the project from CryptoKey resource.
|
|
2400
|
+
*
|
|
2401
|
+
* @param {string} cryptoKeyName
|
|
2402
|
+
* A fully-qualified path representing CryptoKey resource.
|
|
2403
|
+
* @returns {string} A string representing the project.
|
|
2404
|
+
*/
|
|
2405
|
+
matchProjectFromCryptoKeyName(cryptoKeyName) {
|
|
2406
|
+
return this.storageClient.matchProjectFromCryptoKeyName(cryptoKeyName);
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* Parse the location from CryptoKey resource.
|
|
2410
|
+
*
|
|
2411
|
+
* @param {string} cryptoKeyName
|
|
2412
|
+
* A fully-qualified path representing CryptoKey resource.
|
|
2413
|
+
* @returns {string} A string representing the location.
|
|
2414
|
+
*/
|
|
2415
|
+
matchLocationFromCryptoKeyName(cryptoKeyName) {
|
|
2416
|
+
return this.storageClient.matchLocationFromCryptoKeyName(cryptoKeyName);
|
|
2417
|
+
}
|
|
2418
|
+
/**
|
|
2419
|
+
* Parse the key_ring from CryptoKey resource.
|
|
2420
|
+
*
|
|
2421
|
+
* @param {string} cryptoKeyName
|
|
2422
|
+
* A fully-qualified path representing CryptoKey resource.
|
|
2423
|
+
* @returns {string} A string representing the key_ring.
|
|
2424
|
+
*/
|
|
2425
|
+
matchKeyRingFromCryptoKeyName(cryptoKeyName) {
|
|
2426
|
+
return this.storageClient.matchKeyRingFromCryptoKeyName(cryptoKeyName);
|
|
2427
|
+
}
|
|
2428
|
+
/**
|
|
2429
|
+
* Parse the crypto_key from CryptoKey resource.
|
|
2430
|
+
*
|
|
2431
|
+
* @param {string} cryptoKeyName
|
|
2432
|
+
* A fully-qualified path representing CryptoKey resource.
|
|
2433
|
+
* @returns {string} A string representing the crypto_key.
|
|
2434
|
+
*/
|
|
2435
|
+
matchCryptoKeyFromCryptoKeyName(cryptoKeyName) {
|
|
2436
|
+
return this.storageClient.matchCryptoKeyFromCryptoKeyName(cryptoKeyName);
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
exports.StorageControlClient = StorageControlClient;
|
|
2440
|
+
//# sourceMappingURL=storage_control_client.js.map
|