@google-cloud/parallelstore
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -42,2 +42,10 @@ { | ||
"retry_params_name": "default" | ||
}, | ||
"ImportData": { | ||
"retry_codes_name": "non_idempotent", | ||
"retry_params_name": "default" | ||
}, | ||
"ExportData": { | ||
"retry_codes_name": "non_idempotent", | ||
"retry_params_name": "default" | ||
} | ||
@@ -44,0 +52,0 @@ } |
@@ -330,2 +330,116 @@ /// <reference types="node" /> | ||
/** | ||
* ImportData copies data from Cloud Storage to Parallelstore. | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} request.sourceGcsUri | ||
* URI to a Cloud Storage object in format: | ||
* 'gs://<bucket_name>/<path_inside_bucket>'. | ||
* @param {string} [request.destinationPath] | ||
* Optional. Root directory path to the Paralellstore filesystem, starting | ||
* with '/'. Sets to '/' if no value is set. | ||
* @param {string} request.name | ||
* Required. Name of the resource. | ||
* @param {string} [request.requestId] | ||
* Optional. An optional request ID to identify requests. Specify a unique | ||
* request ID so that if you must retry your request, the server will know to | ||
* ignore the request if it has already been completed. The server will | ||
* guarantee that for at least 60 minutes since the first request. | ||
* | ||
* For example, consider a situation where you make an initial request and t | ||
* he request times out. If you make the request again with the same request | ||
* ID, the server can check if original operation with the same request ID | ||
* was received, and if so, will ignore the second request. This prevents | ||
* clients from accidentally creating duplicate commitments. | ||
* | ||
* The request ID must be a valid UUID with the exception that zero UUID is | ||
* not supported (00000000-0000-0000-0000-000000000000). | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Promise} - The promise which resolves to an array. | ||
* The first element of the array is an object representing | ||
* a long running operation. Its `promise()` method returns a promise | ||
* you can `await` for. | ||
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } | ||
* for more details and examples. | ||
* @example <caption>include:samples/generated/v1beta/parallelstore.import_data.js</caption> | ||
* region_tag:parallelstore_v1beta_generated_Parallelstore_ImportData_async | ||
*/ | ||
importData(request?: protos.google.cloud.parallelstore.v1beta.IImportDataRequest, options?: CallOptions): Promise<[ | ||
LROperation<protos.google.cloud.parallelstore.v1beta.IImportDataResponse, protos.google.cloud.parallelstore.v1beta.IImportDataMetadata>, | ||
protos.google.longrunning.IOperation | undefined, | ||
{} | undefined | ||
]>; | ||
importData(request: protos.google.cloud.parallelstore.v1beta.IImportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.parallelstore.v1beta.IImportDataResponse, protos.google.cloud.parallelstore.v1beta.IImportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; | ||
importData(request: protos.google.cloud.parallelstore.v1beta.IImportDataRequest, callback: Callback<LROperation<protos.google.cloud.parallelstore.v1beta.IImportDataResponse, protos.google.cloud.parallelstore.v1beta.IImportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; | ||
/** | ||
* Check the status of the long running operation returned by `importData()`. | ||
* @param {String} name | ||
* The operation name that will be passed. | ||
* @returns {Promise} - The promise which resolves to an object. | ||
* The decoded operation object has result and metadata field to get information from. | ||
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } | ||
* for more details and examples. | ||
* @example <caption>include:samples/generated/v1beta/parallelstore.import_data.js</caption> | ||
* region_tag:parallelstore_v1beta_generated_Parallelstore_ImportData_async | ||
*/ | ||
checkImportDataProgress(name: string): Promise<LROperation<protos.google.cloud.parallelstore.v1beta.ImportDataResponse, protos.google.cloud.parallelstore.v1beta.ImportDataMetadata>>; | ||
/** | ||
* ExportData copies data from Parallelstore to Cloud Storage | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} [request.sourcePath] | ||
* Optional. Root directory path to the Paralellstore filesystem, starting | ||
* with '/'. Sets to '/' if no value is set. | ||
* @param {string} request.destinationGcsUri | ||
* URI to a Cloud Storage object in format: | ||
* 'gs://<bucket_name>/<path_inside_bucket>'. | ||
* @param {string} request.name | ||
* Required. Name of the resource. | ||
* @param {string} [request.requestId] | ||
* Optional. An optional request ID to identify requests. Specify a unique | ||
* request ID so that if you must retry your request, the server will know to | ||
* ignore the request if it has already been completed. The server will | ||
* guarantee that for at least 60 minutes since the first request. | ||
* | ||
* For example, consider a situation where you make an initial request and t | ||
* he request times out. If you make the request again with the same request | ||
* ID, the server can check if original operation with the same request ID | ||
* was received, and if so, will ignore the second request. This prevents | ||
* clients from accidentally creating duplicate commitments. | ||
* | ||
* The request ID must be a valid UUID with the exception that zero UUID is | ||
* not supported (00000000-0000-0000-0000-000000000000). | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Promise} - The promise which resolves to an array. | ||
* The first element of the array is an object representing | ||
* a long running operation. Its `promise()` method returns a promise | ||
* you can `await` for. | ||
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } | ||
* for more details and examples. | ||
* @example <caption>include:samples/generated/v1beta/parallelstore.export_data.js</caption> | ||
* region_tag:parallelstore_v1beta_generated_Parallelstore_ExportData_async | ||
*/ | ||
exportData(request?: protos.google.cloud.parallelstore.v1beta.IExportDataRequest, options?: CallOptions): Promise<[ | ||
LROperation<protos.google.cloud.parallelstore.v1beta.IExportDataResponse, protos.google.cloud.parallelstore.v1beta.IExportDataMetadata>, | ||
protos.google.longrunning.IOperation | undefined, | ||
{} | undefined | ||
]>; | ||
exportData(request: protos.google.cloud.parallelstore.v1beta.IExportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.parallelstore.v1beta.IExportDataResponse, protos.google.cloud.parallelstore.v1beta.IExportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; | ||
exportData(request: protos.google.cloud.parallelstore.v1beta.IExportDataRequest, callback: Callback<LROperation<protos.google.cloud.parallelstore.v1beta.IExportDataResponse, protos.google.cloud.parallelstore.v1beta.IExportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; | ||
/** | ||
* Check the status of the long running operation returned by `exportData()`. | ||
* @param {String} name | ||
* The operation name that will be passed. | ||
* @returns {Promise} - The promise which resolves to an object. | ||
* The decoded operation object has result and metadata field to get information from. | ||
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } | ||
* for more details and examples. | ||
* @example <caption>include:samples/generated/v1beta/parallelstore.export_data.js</caption> | ||
* region_tag:parallelstore_v1beta_generated_Parallelstore_ExportData_async | ||
*/ | ||
checkExportDataProgress(name: string): Promise<LROperation<protos.google.cloud.parallelstore.v1beta.ExportDataResponse, protos.google.cloud.parallelstore.v1beta.ExportDataMetadata>>; | ||
/** | ||
* Lists Instances in a given project and location. | ||
@@ -332,0 +446,0 @@ * |
@@ -225,2 +225,6 @@ "use strict"; | ||
const deleteInstanceMetadata = protoFilesRoot.lookup('.google.cloud.parallelstore.v1beta.OperationMetadata'); | ||
const importDataResponse = protoFilesRoot.lookup('.google.cloud.parallelstore.v1beta.ImportDataResponse'); | ||
const importDataMetadata = protoFilesRoot.lookup('.google.cloud.parallelstore.v1beta.ImportDataMetadata'); | ||
const exportDataResponse = protoFilesRoot.lookup('.google.cloud.parallelstore.v1beta.ExportDataResponse'); | ||
const exportDataMetadata = protoFilesRoot.lookup('.google.cloud.parallelstore.v1beta.ExportDataMetadata'); | ||
this.descriptors.longrunning = { | ||
@@ -230,2 +234,4 @@ createInstance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createInstanceResponse.decode.bind(createInstanceResponse), createInstanceMetadata.decode.bind(createInstanceMetadata)), | ||
deleteInstance: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteInstanceResponse.decode.bind(deleteInstanceResponse), deleteInstanceMetadata.decode.bind(deleteInstanceMetadata)), | ||
importData: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importDataResponse.decode.bind(importDataResponse), importDataMetadata.decode.bind(importDataMetadata)), | ||
exportData: new this._gaxModule.LongrunningDescriptor(this.operationsClient, exportDataResponse.decode.bind(exportDataResponse), exportDataMetadata.decode.bind(exportDataMetadata)), | ||
}; | ||
@@ -271,2 +277,4 @@ // Put together the default options sent with requests. | ||
'deleteInstance', | ||
'importData', | ||
'exportData', | ||
]; | ||
@@ -486,2 +494,78 @@ for (const methodName of parallelstoreStubMethods) { | ||
} | ||
importData(request, optionsOrCallback, callback) { | ||
var _a; | ||
request = request || {}; | ||
let options; | ||
if (typeof optionsOrCallback === 'function' && callback === undefined) { | ||
callback = optionsOrCallback; | ||
options = {}; | ||
} | ||
else { | ||
options = optionsOrCallback; | ||
} | ||
options = options || {}; | ||
options.otherArgs = options.otherArgs || {}; | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
this._gaxModule.routingHeader.fromParams({ | ||
name: (_a = request.name) !== null && _a !== void 0 ? _a : '', | ||
}); | ||
this.initialize(); | ||
return this.innerApiCalls.importData(request, options, callback); | ||
} | ||
/** | ||
* Check the status of the long running operation returned by `importData()`. | ||
* @param {String} name | ||
* The operation name that will be passed. | ||
* @returns {Promise} - The promise which resolves to an object. | ||
* The decoded operation object has result and metadata field to get information from. | ||
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } | ||
* for more details and examples. | ||
* @example <caption>include:samples/generated/v1beta/parallelstore.import_data.js</caption> | ||
* region_tag:parallelstore_v1beta_generated_Parallelstore_ImportData_async | ||
*/ | ||
async checkImportDataProgress(name) { | ||
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name }); | ||
const [operation] = await this.operationsClient.getOperation(request); | ||
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importData, this._gaxModule.createDefaultBackoffSettings()); | ||
return decodeOperation; | ||
} | ||
exportData(request, optionsOrCallback, callback) { | ||
var _a; | ||
request = request || {}; | ||
let options; | ||
if (typeof optionsOrCallback === 'function' && callback === undefined) { | ||
callback = optionsOrCallback; | ||
options = {}; | ||
} | ||
else { | ||
options = optionsOrCallback; | ||
} | ||
options = options || {}; | ||
options.otherArgs = options.otherArgs || {}; | ||
options.otherArgs.headers = options.otherArgs.headers || {}; | ||
options.otherArgs.headers['x-goog-request-params'] = | ||
this._gaxModule.routingHeader.fromParams({ | ||
name: (_a = request.name) !== null && _a !== void 0 ? _a : '', | ||
}); | ||
this.initialize(); | ||
return this.innerApiCalls.exportData(request, options, callback); | ||
} | ||
/** | ||
* Check the status of the long running operation returned by `exportData()`. | ||
* @param {String} name | ||
* The operation name that will be passed. | ||
* @returns {Promise} - The promise which resolves to an object. | ||
* The decoded operation object has result and metadata field to get information from. | ||
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } | ||
* for more details and examples. | ||
* @example <caption>include:samples/generated/v1beta/parallelstore.export_data.js</caption> | ||
* region_tag:parallelstore_v1beta_generated_Parallelstore_ExportData_async | ||
*/ | ||
async checkExportDataProgress(name) { | ||
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name }); | ||
const [operation] = await this.operationsClient.getOperation(request); | ||
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.exportData, this._gaxModule.createDefaultBackoffSettings()); | ||
return decodeOperation; | ||
} | ||
listInstances(request, optionsOrCallback, callback) { | ||
@@ -488,0 +572,0 @@ var _a; |
# Changelog | ||
## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/parallelstore-v0.2.0...parallelstore-v0.3.0) (2024-05-02) | ||
### Features | ||
* **parallelstore/v1beta:** [parallelstore] add ImportData and ExportData RPCs ([#5292](https://github.com/googleapis/google-cloud-node/issues/5292)) ([e769b8b](https://github.com/googleapis/google-cloud-node/commit/e769b8b67f6193a0624a7621b9522eedac86ed40)) | ||
## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/parallelstore-v0.1.0...parallelstore-v0.2.0) (2024-04-05) | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "@google-cloud/parallelstore", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Parallelstore API client for Node.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -126,3 +126,5 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
| Parallelstore.delete_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.delete_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.delete_instance.js,packages/google-cloud-parallelstore/samples/README.md) | | ||
| Parallelstore.export_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js,packages/google-cloud-parallelstore/samples/README.md) | | ||
| Parallelstore.get_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.get_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.get_instance.js,packages/google-cloud-parallelstore/samples/README.md) | | ||
| Parallelstore.import_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js,packages/google-cloud-parallelstore/samples/README.md) | | ||
| Parallelstore.list_instances | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.list_instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.list_instances.js,packages/google-cloud-parallelstore/samples/README.md) | | ||
@@ -129,0 +131,0 @@ | Parallelstore.update_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.update_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.update_instance.js,packages/google-cloud-parallelstore/samples/README.md) | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2213870
37884
201