Configures and manages Filestore resources.
Filestore Manager v1beta1.
The file.googleapis.com
service implements the Filestore API and defines the following model for managing resources: * The service works with a collection of cloud projects, named: /projects/*
* Each project has a collection of available locations, named: /locations/*
* Each location has a collection of instances and backups, named: /instances/*
and /backups/*
respectively. * As such, Filestore instances are resources of the form: /projects/{project_id}/locations/{location_id}/instances/{instance_id}
backups are resources of the form: /projects/{project_id}/locations/{location_id}/backup/{backup_id}
Note that location_id can represent a GCP zone
or region
depending on the resource. for example: A zonal Filestore instance: * projects/my-project/locations/us-central1-c/instances/my-basic-tier-filer
A regional Filestore instance: * projects/my-project/locations/us-central1/instances/my-enterprise-filer
v1beta1
Package
@google-cloud/filestoreConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of CloudFilestoreManagerClient.
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
cloudFilestoreManagerStub
cloudFilestoreManagerStub?: Promise<{
[name: string]: Function;
}>;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
locationsClient
locationsClient: LocationsClient;
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
backupPath(project, location, backup)
backupPath(project: string, location: string, backup: string): string;
Return a fully-qualified backup resource name string.
Name | Description |
project |
string
|
location |
string
|
backup |
string
|
Type | Description |
string | {string} Resource name string. |
cancelOperation(request, options, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
Name | Description |
request |
protos.google.longrunning.CancelOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See [gax.CallOptions]https://googleapis.github.io/gax-nodejs/global.html#CallOptions for the details. |
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
checkCreateBackupProgress(name)
checkCreateBackupProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Backup, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by createBackup()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Backup, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The backup's project and location, in the format
* `projects/{project_id}/locations/{location}`. In Filestore,
* backup locations map to GCP regions, for example **us-west1**.
*/
// const parent = 'abc123'
/**
* Required. A backup resource google.cloud.filestore.v1beta1.Backup
*/
// const backup = {}
/**
* Required. The ID to use for the backup.
* The ID must be unique within the specified project and location.
* This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
*/
// const backupId = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callCreateBackup() {
// Construct request
const request = {
parent,
backup,
backupId,
};
// Run request
const [operation] = await filestoreClient.createBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateBackup();
checkCreateInstanceProgress(name)
checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Instance, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by createInstance()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Instance, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The instance's project and location, in the format
* `projects/{project_id}/locations/{location}`. In Filestore,
* locations map to GCP zones, for example **us-west1-b**.
*/
// const parent = 'abc123'
/**
* Required. The ID of the instance to create.
* The ID must be unique within the specified project and location.
* This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
*/
// const instanceId = 'abc123'
/**
* Required. An instance resource google.cloud.filestore.v1beta1.Instance
*/
// const instance = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
};
// Run request
const [operation] = await filestoreClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
checkCreateShareProgress(name)
checkCreateShareProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Share, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by createShare()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Share, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Filestore Instance to create the share for, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the share.
* The ID must be unique within the specified instance.
* This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
*/
// const shareId = 'abc123'
/**
* Required. A share resource
*/
// const share = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callCreateShare() {
// Construct request
const request = {
parent,
shareId,
share,
};
// Run request
const [operation] = await filestoreClient.createShare(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateShare();
checkCreateSnapshotProgress(name)
checkCreateSnapshotProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Snapshot, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by createSnapshot()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Snapshot, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Filestore Instance to create the snapshots of, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the snapshot.
* The ID must be unique within the specified instance.
* This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
*/
// const snapshotId = 'abc123'
/**
* Required. A snapshot resource
*/
// const snapshot = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callCreateSnapshot() {
// Construct request
const request = {
parent,
snapshotId,
snapshot,
};
// Run request
const [operation] = await filestoreClient.createSnapshot(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateSnapshot();
checkDeleteBackupProgress(name)
checkDeleteBackupProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by deleteBackup()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The backup resource name, in the format
* `projects/{project_id}/locations/{location}/backups/{backup_id}`
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callDeleteBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await filestoreClient.deleteBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackup();
checkDeleteInstanceProgress(name)
checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by deleteInstance()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The instance resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
*/
// const name = 'abc123'
/**
* If set to true, any snapshots of the instance will also be deleted.
* (Otherwise, the request will only work if the instance has no snapshots.)
*/
// const force = true
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callDeleteInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await filestoreClient.deleteInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInstance();
checkDeleteShareProgress(name)
checkDeleteShareProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by deleteShare()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The share resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}/share/{share_id}`
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callDeleteShare() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await filestoreClient.deleteShare(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteShare();
checkDeleteSnapshotProgress(name)
checkDeleteSnapshotProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by deleteSnapshot()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The snapshot resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callDeleteSnapshot() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await filestoreClient.deleteSnapshot(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteSnapshot();
checkRestoreInstanceProgress(name)
checkRestoreInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Instance, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by restoreInstance()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Instance, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the instance, in the format
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
*/
// const name = 'abc123'
/**
* Required. Name of the file share in the Filestore instance that the snapshot
* is being restored to.
*/
// const fileShare = 'abc123'
/**
* The resource name of the snapshot, in the format
* `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
*/
// const sourceSnapshot = 'abc123'
/**
* The resource name of the backup, in the format
* `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
*/
// const sourceBackup = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callRestoreInstance() {
// Construct request
const request = {
name,
fileShare,
};
// Run request
const [operation] = await filestoreClient.restoreInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callRestoreInstance();
checkRevertInstanceProgress(name)
checkRevertInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Instance, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by revertInstance()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Instance, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. projects/{project_id}/locations/{location_id}/instances/{instance_id}.
* The resource name of the instance, in the format
*/
// const name = 'abc123'
/**
* Required. The snapshot resource ID, in the format 'my-snapshot', where the specified
* ID is the {snapshot_id} of the fully qualified name like
* projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
*/
// const targetSnapshotId = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callRevertInstance() {
// Construct request
const request = {
name,
targetSnapshotId,
};
// Run request
const [operation] = await filestoreClient.revertInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callRevertInstance();
checkUpdateBackupProgress(name)
checkUpdateBackupProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Backup, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by updateBackup()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Backup, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. A backup resource google.cloud.filestore.v1beta1.Backup
*/
// const backup = {}
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field.
*/
// const updateMask = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callUpdateBackup() {
// Construct request
const request = {
backup,
updateMask,
};
// Run request
const [operation] = await filestoreClient.updateBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackup();
checkUpdateInstanceProgress(name)
checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Instance, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by updateInstance()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Instance, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field. The elements of the repeated paths field may only include these
* fields:
* * "description"
* * "file_shares"
* * "labels"
*/
// const updateMask = {}
/**
* Required. Only fields specified in update_mask are updated.
*/
// const instance = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callUpdateInstance() {
// Construct request
const request = {
updateMask,
instance,
};
// Run request
const [operation] = await filestoreClient.updateInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateInstance();
checkUpdateShareProgress(name)
checkUpdateShareProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Share, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by updateShare()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Share, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. A share resource.
* Only fields specified in update_mask are updated.
*/
// const share = {}
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field.
* The elements of the repeated paths field may only include these fields:
* * "description"
* * "capacity_gb"
* * "labels"
* * "nfs_export_options"
*/
// const updateMask = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callUpdateShare() {
// Construct request
const request = {
share,
updateMask,
};
// Run request
const [operation] = await filestoreClient.updateShare(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateShare();
checkUpdateSnapshotProgress(name)
checkUpdateSnapshotProgress(name: string): Promise<LROperation<protos.google.cloud.filestore.v1beta1.Snapshot, protos.google.cloud.common.OperationMetadata>>;
Check the status of the long running operation returned by updateSnapshot()
.
Name | Description |
name |
string
The operation name that will be passed. |
Type | Description |
Promise<LROperation<protos.google.cloud.filestore.v1beta1.Snapshot, protos.google.cloud.common.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field.
*/
// const updateMask = {}
/**
* Required. A snapshot resource
*/
// const snapshot = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callUpdateSnapshot() {
// Construct request
const request = {
updateMask,
snapshot,
};
// Run request
const [operation] = await filestoreClient.updateSnapshot(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateSnapshot();
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createBackup(request, options)
createBackup(request?: protos.google.cloud.filestore.v1beta1.ICreateBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a backup.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The backup's project and location, in the format
* `projects/{project_id}/locations/{location}`. In Filestore,
* backup locations map to GCP regions, for example **us-west1**.
*/
// const parent = 'abc123'
/**
* Required. A backup resource google.cloud.filestore.v1beta1.Backup
*/
// const backup = {}
/**
* Required. The ID to use for the backup.
* The ID must be unique within the specified project and location.
* This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
*/
// const backupId = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callCreateBackup() {
// Construct request
const request = {
parent,
backup,
backupId,
};
// Run request
const [operation] = await filestoreClient.createBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateBackup();
createBackup(request, options, callback)
createBackup(request: protos.google.cloud.filestore.v1beta1.ICreateBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createBackup(request, callback)
createBackup(request: protos.google.cloud.filestore.v1beta1.ICreateBackupRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateBackupRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createInstance(request, options)
createInstance(request?: protos.google.cloud.filestore.v1beta1.ICreateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates an instance. When creating from a backup, the capacity of the new instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The instance's project and location, in the format
* `projects/{project_id}/locations/{location}`. In Filestore,
* locations map to GCP zones, for example **us-west1-b**.
*/
// const parent = 'abc123'
/**
* Required. The ID of the instance to create.
* The ID must be unique within the specified project and location.
* This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
*/
// const instanceId = 'abc123'
/**
* Required. An instance resource google.cloud.filestore.v1beta1.Instance
*/
// const instance = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
};
// Run request
const [operation] = await filestoreClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
createInstance(request, options, callback)
createInstance(request: protos.google.cloud.filestore.v1beta1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createInstance(request, callback)
createInstance(request: protos.google.cloud.filestore.v1beta1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createShare(request, options)
createShare(request?: protos.google.cloud.filestore.v1beta1.ICreateShareRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a share.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateShareRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Filestore Instance to create the share for, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the share.
* The ID must be unique within the specified instance.
* This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
*/
// const shareId = 'abc123'
/**
* Required. A share resource
*/
// const share = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callCreateShare() {
// Construct request
const request = {
parent,
shareId,
share,
};
// Run request
const [operation] = await filestoreClient.createShare(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateShare();
createShare(request, options, callback)
createShare(request: protos.google.cloud.filestore.v1beta1.ICreateShareRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateShareRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createShare(request, callback)
createShare(request: protos.google.cloud.filestore.v1beta1.ICreateShareRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateShareRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createSnapshot(request, options)
createSnapshot(request?: protos.google.cloud.filestore.v1beta1.ICreateSnapshotRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a snapshot.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateSnapshotRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The Filestore Instance to create the snapshots of, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the snapshot.
* The ID must be unique within the specified instance.
* This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
*/
// const snapshotId = 'abc123'
/**
* Required. A snapshot resource
*/
// const snapshot = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callCreateSnapshot() {
// Construct request
const request = {
parent,
snapshotId,
snapshot,
};
// Run request
const [operation] = await filestoreClient.createSnapshot(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateSnapshot();
createSnapshot(request, options, callback)
createSnapshot(request: protos.google.cloud.filestore.v1beta1.ICreateSnapshotRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateSnapshotRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
createSnapshot(request, callback)
createSnapshot(request: protos.google.cloud.filestore.v1beta1.ICreateSnapshotRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.ICreateSnapshotRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteBackup(request, options)
deleteBackup(request?: protos.google.cloud.filestore.v1beta1.IDeleteBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a backup.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The backup resource name, in the format
* `projects/{project_id}/locations/{location}/backups/{backup_id}`
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callDeleteBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await filestoreClient.deleteBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackup();
deleteBackup(request, options, callback)
deleteBackup(request: protos.google.cloud.filestore.v1beta1.IDeleteBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteBackup(request, callback)
deleteBackup(request: protos.google.cloud.filestore.v1beta1.IDeleteBackupRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteBackupRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteInstance(request, options)
deleteInstance(request?: protos.google.cloud.filestore.v1beta1.IDeleteInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes an instance.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The instance resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`
*/
// const name = 'abc123'
/**
* If set to true, any snapshots of the instance will also be deleted.
* (Otherwise, the request will only work if the instance has no snapshots.)
*/
// const force = true
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callDeleteInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await filestoreClient.deleteInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInstance();
deleteInstance(request, options, callback)
deleteInstance(request: protos.google.cloud.filestore.v1beta1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteInstance(request, callback)
deleteInstance(request: protos.google.cloud.filestore.v1beta1.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteInstanceRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteOperation(request, options, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
Name | Description |
request |
protos.google.longrunning.DeleteOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See [gax.CallOptions]https://googleapis.github.io/gax-nodejs/global.html#CallOptions for the details. |
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
deleteShare(request, options)
deleteShare(request?: protos.google.cloud.filestore.v1beta1.IDeleteShareRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a share.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteShareRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The share resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}/share/{share_id}`
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callDeleteShare() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await filestoreClient.deleteShare(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteShare();
deleteShare(request, options, callback)
deleteShare(request: protos.google.cloud.filestore.v1beta1.IDeleteShareRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteShareRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteShare(request, callback)
deleteShare(request: protos.google.cloud.filestore.v1beta1.IDeleteShareRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteShareRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteSnapshot(request, options)
deleteSnapshot(request?: protos.google.cloud.filestore.v1beta1.IDeleteSnapshotRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a snapshot.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteSnapshotRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The snapshot resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callDeleteSnapshot() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await filestoreClient.deleteSnapshot(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteSnapshot();
deleteSnapshot(request, options, callback)
deleteSnapshot(request: protos.google.cloud.filestore.v1beta1.IDeleteSnapshotRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteSnapshotRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
deleteSnapshot(request, callback)
deleteSnapshot(request: protos.google.cloud.filestore.v1beta1.IDeleteSnapshotRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IDeleteSnapshotRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getBackup(request, options)
getBackup(request?: protos.google.cloud.filestore.v1beta1.IGetBackupRequest, options?: CallOptions): Promise<[
protos.google.cloud.filestore.v1beta1.IBackup,
protos.google.cloud.filestore.v1beta1.IGetBackupRequest | undefined,
{} | undefined
]>;
Gets the details of a specific backup.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.filestore.v1beta1.IGetBackupRequest | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Backup]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The backup resource name, in the format
* `projects/{project_id}/locations/{location}/backups/{backup_id}`.
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callGetBackup() {
// Construct request
const request = {
name,
};
// Run request
const response = await filestoreClient.getBackup(request);
console.log(response);
}
callGetBackup();
getBackup(request, options, callback)
getBackup(request: protos.google.cloud.filestore.v1beta1.IGetBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.filestore.v1beta1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetBackupRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.filestore.v1beta1.IGetBackupRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getBackup(request, callback)
getBackup(request: protos.google.cloud.filestore.v1beta1.IGetBackupRequest, callback: Callback<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.filestore.v1beta1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetBackupRequest
|
callback |
Callback<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.filestore.v1beta1.IGetBackupRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getInstance(request, options)
getInstance(request?: protos.google.cloud.filestore.v1beta1.IGetInstanceRequest, options?: CallOptions): Promise<[
protos.google.cloud.filestore.v1beta1.IInstance,
protos.google.cloud.filestore.v1beta1.IGetInstanceRequest | undefined,
{} | undefined
]>;
Gets the details of a specific instance.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.filestore.v1beta1.IGetInstanceRequest | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Instance]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The instance resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`.
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callGetInstance() {
// Construct request
const request = {
name,
};
// Run request
const response = await filestoreClient.getInstance(request);
console.log(response);
}
callGetInstance();
getInstance(request, options, callback)
getInstance(request: protos.google.cloud.filestore.v1beta1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.filestore.v1beta1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetInstanceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.filestore.v1beta1.IGetInstanceRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getInstance(request, callback)
getInstance(request: protos.google.cloud.filestore.v1beta1.IGetInstanceRequest, callback: Callback<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.filestore.v1beta1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetInstanceRequest
|
callback |
Callback<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.filestore.v1beta1.IGetInstanceRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getLocation(request, options, callback)
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
Gets information about a location.
Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
Type | Description |
Promise<LocationProtos.google.cloud.location.ILocation> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Location]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
const [response] = await client.getLocation(request);
getOperation(request, options, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
Name | Description |
request |
protos.google.longrunning.GetOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See [gax.CallOptions]https://googleapis.github.io/gax-nodejs/global.html#CallOptions for the details. |
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing [google.longrunning.Operation]. {Promise} - The promise which resolves to an array. The first element of the array is an object representing [google.longrunning.Operation]. The promise has a method named "cancel" which cancels the ongoing API call. |
Type | Description |
Promise<[protos.google.longrunning.Operation]> |
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Type | Description |
void |
getShare(request, options)
getShare(request?: protos.google.cloud.filestore.v1beta1.IGetShareRequest, options?: CallOptions): Promise<[
protos.google.cloud.filestore.v1beta1.IShare,
protos.google.cloud.filestore.v1beta1.IGetShareRequest | undefined,
{} | undefined
]>;
Gets the details of a specific share.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetShareRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.filestore.v1beta1.IGetShareRequest | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Share]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The share resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}/shares/{share_id}`
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callGetShare() {
// Construct request
const request = {
name,
};
// Run request
const response = await filestoreClient.getShare(request);
console.log(response);
}
callGetShare();
getShare(request, options, callback)
getShare(request: protos.google.cloud.filestore.v1beta1.IGetShareRequest, options: CallOptions, callback: Callback<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.filestore.v1beta1.IGetShareRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetShareRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.filestore.v1beta1.IGetShareRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getShare(request, callback)
getShare(request: protos.google.cloud.filestore.v1beta1.IGetShareRequest, callback: Callback<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.filestore.v1beta1.IGetShareRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetShareRequest
|
callback |
Callback<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.filestore.v1beta1.IGetShareRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getSnapshot(request, options)
getSnapshot(request?: protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest, options?: CallOptions): Promise<[
protos.google.cloud.filestore.v1beta1.ISnapshot,
protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest | undefined,
{} | undefined
]>;
Gets the details of a specific snapshot.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Snapshot]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The snapshot resource name, in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`
*/
// const name = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callGetSnapshot() {
// Construct request
const request = {
name,
};
// Run request
const response = await filestoreClient.getSnapshot(request);
console.log(response);
}
callGetSnapshot();
getSnapshot(request, options, callback)
getSnapshot(request: protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest, options: CallOptions, callback: Callback<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
getSnapshot(request, callback)
getSnapshot(request: protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest, callback: Callback<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest
|
callback |
Callback<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.filestore.v1beta1.IGetSnapshotRequest | null | undefined, {} | null | undefined>
|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Type | Description |
Promise<{ [name: string]: Function; }> | {Promise} A promise that resolves to an authenticated service stub. |
instancePath(project, location, instance)
instancePath(project: string, location: string, instance: string): string;
Return a fully-qualified instance resource name string.
Name | Description |
project |
string
|
location |
string
|
instance |
string
|
Type | Description |
string | {string} Resource name string. |
listBackups(request, options)
listBackups(request?: protos.google.cloud.filestore.v1beta1.IListBackupsRequest, options?: CallOptions): Promise<[
protos.google.cloud.filestore.v1beta1.IBackup[],
protos.google.cloud.filestore.v1beta1.IListBackupsRequest | null,
protos.google.cloud.filestore.v1beta1.IListBackupsResponse
]>;
Lists all backups in a project for either a specified location or for all locations.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.filestore.v1beta1.IBackup[], protos.google.cloud.filestore.v1beta1.IListBackupsRequest | null, protos.google.cloud.filestore.v1beta1.IListBackupsResponse ]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [Backup]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listBackups(request, options, callback)
listBackups(request: protos.google.cloud.filestore.v1beta1.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.filestore.v1beta1.IListBackupsRequest, protos.google.cloud.filestore.v1beta1.IListBackupsResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IBackup>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListBackupsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.filestore.v1beta1.IListBackupsRequest, protos.google.cloud.filestore.v1beta1.IListBackupsResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IBackup>
|
Type | Description |
void |
listBackups(request, callback)
listBackups(request: protos.google.cloud.filestore.v1beta1.IListBackupsRequest, callback: PaginationCallback<protos.google.cloud.filestore.v1beta1.IListBackupsRequest, protos.google.cloud.filestore.v1beta1.IListBackupsResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IBackup>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListBackupsRequest
|
callback |
PaginationCallback<protos.google.cloud.filestore.v1beta1.IListBackupsRequest, protos.google.cloud.filestore.v1beta1.IListBackupsResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IBackup>
|
Type | Description |
void |
listBackupsAsync(request, options)
listBackupsAsync(request?: protos.google.cloud.filestore.v1beta1.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.filestore.v1beta1.IBackup>;
Equivalent to listBackups
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.filestore.v1beta1.IBackup> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Backup]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve backup information,
* in the format `projects/{project_id}/locations/{location}`.
* In Filestore, backup locations map to GCP regions,
* for example **us-west1**.
* To retrieve backup information for all locations, use "-" for the
* `{location}` value.
*/
// const parent = 'abc123'
/**
* The maximum number of items to return.
*/
// const pageSize = 1234
/**
* The next_page_token value to use if there are additional
* results to retrieve for this list request.
*/
// const pageToken = 'abc123'
/**
* Sort results. Supported values are "name", "name desc" or "" (unsorted).
*/
// const orderBy = 'abc123'
/**
* List filter.
*/
// const filter = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callListBackups() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await filestoreClient.listBackupsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackups();
listBackupsStream(request, options)
listBackupsStream(request?: protos.google.cloud.filestore.v1beta1.IListBackupsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Backup] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listInstances(request, options)
listInstances(request?: protos.google.cloud.filestore.v1beta1.IListInstancesRequest, options?: CallOptions): Promise<[
protos.google.cloud.filestore.v1beta1.IInstance[],
protos.google.cloud.filestore.v1beta1.IListInstancesRequest | null,
protos.google.cloud.filestore.v1beta1.IListInstancesResponse
]>;
Lists all instances in a project for either a specified location or for all locations.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.filestore.v1beta1.IInstance[], protos.google.cloud.filestore.v1beta1.IListInstancesRequest | null, protos.google.cloud.filestore.v1beta1.IListInstancesResponse ]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [Instance]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listInstances(request, options, callback)
listInstances(request: protos.google.cloud.filestore.v1beta1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.filestore.v1beta1.IListInstancesRequest, protos.google.cloud.filestore.v1beta1.IListInstancesResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IInstance>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListInstancesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.filestore.v1beta1.IListInstancesRequest, protos.google.cloud.filestore.v1beta1.IListInstancesResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IInstance>
|
Type | Description |
void |
listInstances(request, callback)
listInstances(request: protos.google.cloud.filestore.v1beta1.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.filestore.v1beta1.IListInstancesRequest, protos.google.cloud.filestore.v1beta1.IListInstancesResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IInstance>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListInstancesRequest
|
callback |
PaginationCallback<protos.google.cloud.filestore.v1beta1.IListInstancesRequest, protos.google.cloud.filestore.v1beta1.IListInstancesResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IInstance>
|
Type | Description |
void |
listInstancesAsync(request, options)
listInstancesAsync(request?: protos.google.cloud.filestore.v1beta1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.filestore.v1beta1.IInstance>;
Equivalent to listInstances
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.filestore.v1beta1.IInstance> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Instance]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve instance information,
* in the format `projects/{project_id}/locations/{location}`. In Cloud
* Filestore, locations map to GCP zones, for example **us-west1-b**. To
* retrieve instance information for all locations, use "-" for the
* `{location}` value.
*/
// const parent = 'abc123'
/**
* The maximum number of items to return.
*/
// const pageSize = 1234
/**
* The next_page_token value to use if there are additional
* results to retrieve for this list request.
*/
// const pageToken = 'abc123'
/**
* Sort results. Supported values are "name", "name desc" or "" (unsorted).
*/
// const orderBy = 'abc123'
/**
* List filter.
*/
// const filter = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callListInstances() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await filestoreClient.listInstancesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListInstances();
listInstancesStream(request, options)
listInstancesStream(request?: protos.google.cloud.filestore.v1beta1.IListInstancesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Instance] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
Lists information about the supported locations for this service. Returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<LocationProtos.google.cloud.location.ILocation> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Location]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED
. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
Name | Description |
request |
protos.google.longrunning.ListOperationsRequest
The request object that will be sent. |
options |
gax.CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See [gax.CallOptions]https://googleapis.github.io/gax-nodejs/global.html#CallOptions for the details. |
Type | Description |
AsyncIterable<protos.google.longrunning.ListOperationsResponse> | {Object} An iterable Object that conforms to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
listShares(request, options)
listShares(request?: protos.google.cloud.filestore.v1beta1.IListSharesRequest, options?: CallOptions): Promise<[
protos.google.cloud.filestore.v1beta1.IShare[],
protos.google.cloud.filestore.v1beta1.IListSharesRequest | null,
protos.google.cloud.filestore.v1beta1.IListSharesResponse
]>;
Lists all shares for a specified instance.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSharesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.filestore.v1beta1.IShare[], protos.google.cloud.filestore.v1beta1.IListSharesRequest | null, protos.google.cloud.filestore.v1beta1.IListSharesResponse ]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [Share]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listShares(request, options, callback)
listShares(request: protos.google.cloud.filestore.v1beta1.IListSharesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.filestore.v1beta1.IListSharesRequest, protos.google.cloud.filestore.v1beta1.IListSharesResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IShare>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSharesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.filestore.v1beta1.IListSharesRequest, protos.google.cloud.filestore.v1beta1.IListSharesResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IShare>
|
Type | Description |
void |
listShares(request, callback)
listShares(request: protos.google.cloud.filestore.v1beta1.IListSharesRequest, callback: PaginationCallback<protos.google.cloud.filestore.v1beta1.IListSharesRequest, protos.google.cloud.filestore.v1beta1.IListSharesResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IShare>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSharesRequest
|
callback |
PaginationCallback<protos.google.cloud.filestore.v1beta1.IListSharesRequest, protos.google.cloud.filestore.v1beta1.IListSharesResponse | null | undefined, protos.google.cloud.filestore.v1beta1.IShare>
|
Type | Description |
void |
listSharesAsync(request, options)
listSharesAsync(request?: protos.google.cloud.filestore.v1beta1.IListSharesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.filestore.v1beta1.IShare>;
Equivalent to listShares
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSharesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.filestore.v1beta1.IShare> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Share]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The instance for which to retrieve share information,
* in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`.
*/
// const parent = 'abc123'
/**
* The maximum number of items to return.
*/
// const pageSize = 1234
/**
* The next_page_token value to use if there are additional
* results to retrieve for this list request.
*/
// const pageToken = 'abc123'
/**
* Sort results. Supported values are "name", "name desc" or "" (unsorted).
*/
// const orderBy = 'abc123'
/**
* List filter.
*/
// const filter = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callListShares() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await filestoreClient.listSharesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListShares();
listSharesStream(request, options)
listSharesStream(request?: protos.google.cloud.filestore.v1beta1.IListSharesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSharesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Share] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listSnapshots(request, options)
listSnapshots(request?: protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, options?: CallOptions): Promise<[
protos.google.cloud.filestore.v1beta1.ISnapshot[],
protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest | null,
protos.google.cloud.filestore.v1beta1.IListSnapshotsResponse
]>;
Lists all snapshots in a project for either a specified location or for all locations.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.filestore.v1beta1.ISnapshot[], protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest | null, protos.google.cloud.filestore.v1beta1.IListSnapshotsResponse ]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [Snapshot]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listSnapshots(request, options, callback)
listSnapshots(request: protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, protos.google.cloud.filestore.v1beta1.IListSnapshotsResponse | null | undefined, protos.google.cloud.filestore.v1beta1.ISnapshot>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, protos.google.cloud.filestore.v1beta1.IListSnapshotsResponse | null | undefined, protos.google.cloud.filestore.v1beta1.ISnapshot>
|
Type | Description |
void |
listSnapshots(request, callback)
listSnapshots(request: protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, callback: PaginationCallback<protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, protos.google.cloud.filestore.v1beta1.IListSnapshotsResponse | null | undefined, protos.google.cloud.filestore.v1beta1.ISnapshot>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest
|
callback |
PaginationCallback<protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, protos.google.cloud.filestore.v1beta1.IListSnapshotsResponse | null | undefined, protos.google.cloud.filestore.v1beta1.ISnapshot>
|
Type | Description |
void |
listSnapshotsAsync(request, options)
listSnapshotsAsync(request?: protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.filestore.v1beta1.ISnapshot>;
Equivalent to listSnapshots
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.filestore.v1beta1.ISnapshot> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Snapshot]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The instance for which to retrieve snapshot information,
* in the format
* `projects/{project_id}/locations/{location}/instances/{instance_id}`.
*/
// const parent = 'abc123'
/**
* The maximum number of items to return.
*/
// const pageSize = 1234
/**
* The next_page_token value to use if there are additional
* results to retrieve for this list request.
*/
// const pageToken = 'abc123'
/**
* Sort results. Supported values are "name", "name desc" or "" (unsorted).
*/
// const orderBy = 'abc123'
/**
* List filter.
*/
// const filter = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callListSnapshots() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await filestoreClient.listSnapshotsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListSnapshots();
listSnapshotsStream(request, options)
listSnapshotsStream(request?: protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IListSnapshotsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [Snapshot] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Name | Description |
project |
string
|
location |
string
|
Type | Description |
string | {string} Resource name string. |
matchBackupFromBackupName(backupName)
matchBackupFromBackupName(backupName: string): string | number;
Parse the backup from Backup resource.
Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
Type | Description |
string | number | {string} A string representing the backup. |
matchInstanceFromInstanceName(instanceName)
matchInstanceFromInstanceName(instanceName: string): string | number;
Parse the instance from Instance resource.
Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
Type | Description |
string | number | {string} A string representing the instance. |
matchInstanceFromShareName(shareName)
matchInstanceFromShareName(shareName: string): string | number;
Parse the instance from Share resource.
Name | Description |
shareName |
string
A fully-qualified path representing Share resource. |
Type | Description |
string | number | {string} A string representing the instance. |
matchInstanceFromSnapshotName(snapshotName)
matchInstanceFromSnapshotName(snapshotName: string): string | number;
Parse the instance from Snapshot resource.
Name | Description |
snapshotName |
string
A fully-qualified path representing Snapshot resource. |
Type | Description |
string | number | {string} A string representing the instance. |
matchLocationFromBackupName(backupName)
matchLocationFromBackupName(backupName: string): string | number;
Parse the location from Backup resource.
Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromInstanceName(instanceName)
matchLocationFromInstanceName(instanceName: string): string | number;
Parse the location from Instance resource.
Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromShareName(shareName)
matchLocationFromShareName(shareName: string): string | number;
Parse the location from Share resource.
Name | Description |
shareName |
string
A fully-qualified path representing Share resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromSnapshotName(snapshotName)
matchLocationFromSnapshotName(snapshotName: string): string | number;
Parse the location from Snapshot resource.
Name | Description |
snapshotName |
string
A fully-qualified path representing Snapshot resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromBackupName(backupName)
matchProjectFromBackupName(backupName: string): string | number;
Parse the project from Backup resource.
Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromInstanceName(instanceName)
matchProjectFromInstanceName(instanceName: string): string | number;
Parse the project from Instance resource.
Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromShareName(shareName)
matchProjectFromShareName(shareName: string): string | number;
Parse the project from Share resource.
Name | Description |
shareName |
string
A fully-qualified path representing Share resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromSnapshotName(snapshotName)
matchProjectFromSnapshotName(snapshotName: string): string | number;
Parse the project from Snapshot resource.
Name | Description |
snapshotName |
string
A fully-qualified path representing Snapshot resource. |
Type | Description |
string | number | {string} A string representing the project. |
matchShareFromShareName(shareName)
matchShareFromShareName(shareName: string): string | number;
Parse the share from Share resource.
Name | Description |
shareName |
string
A fully-qualified path representing Share resource. |
Type | Description |
string | number | {string} A string representing the share. |
matchSnapshotFromSnapshotName(snapshotName)
matchSnapshotFromSnapshotName(snapshotName: string): string | number;
Parse the snapshot from Snapshot resource.
Name | Description |
snapshotName |
string
A fully-qualified path representing Snapshot resource. |
Type | Description |
string | number | {string} A string representing the snapshot. |
restoreInstance(request, options)
restoreInstance(request?: protos.google.cloud.filestore.v1beta1.IRestoreInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Restores an existing instance's file share from a backup.
The capacity of the instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IRestoreInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the instance, in the format
* `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
*/
// const name = 'abc123'
/**
* Required. Name of the file share in the Filestore instance that the snapshot
* is being restored to.
*/
// const fileShare = 'abc123'
/**
* The resource name of the snapshot, in the format
* `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
*/
// const sourceSnapshot = 'abc123'
/**
* The resource name of the backup, in the format
* `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
*/
// const sourceBackup = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callRestoreInstance() {
// Construct request
const request = {
name,
fileShare,
};
// Run request
const [operation] = await filestoreClient.restoreInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callRestoreInstance();
restoreInstance(request, options, callback)
restoreInstance(request: protos.google.cloud.filestore.v1beta1.IRestoreInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IRestoreInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
restoreInstance(request, callback)
restoreInstance(request: protos.google.cloud.filestore.v1beta1.IRestoreInstanceRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IRestoreInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
revertInstance(request, options)
revertInstance(request?: protos.google.cloud.filestore.v1beta1.IRevertInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Revert an existing instance's file system to a specified snapshot.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IRevertInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. projects/{project_id}/locations/{location_id}/instances/{instance_id}.
* The resource name of the instance, in the format
*/
// const name = 'abc123'
/**
* Required. The snapshot resource ID, in the format 'my-snapshot', where the specified
* ID is the {snapshot_id} of the fully qualified name like
* projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
*/
// const targetSnapshotId = 'abc123'
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callRevertInstance() {
// Construct request
const request = {
name,
targetSnapshotId,
};
// Run request
const [operation] = await filestoreClient.revertInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callRevertInstance();
revertInstance(request, options, callback)
revertInstance(request: protos.google.cloud.filestore.v1beta1.IRevertInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IRevertInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
revertInstance(request, callback)
revertInstance(request: protos.google.cloud.filestore.v1beta1.IRevertInstanceRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IRevertInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
sharePath(project, location, instance, share)
sharePath(project: string, location: string, instance: string, share: string): string;
Return a fully-qualified share resource name string.
Name | Description |
project |
string
|
location |
string
|
instance |
string
|
share |
string
|
Type | Description |
string | {string} Resource name string. |
snapshotPath(project, location, instance, snapshot)
snapshotPath(project: string, location: string, instance: string, snapshot: string): string;
Return a fully-qualified snapshot resource name string.
Name | Description |
project |
string
|
location |
string
|
instance |
string
|
snapshot |
string
|
Type | Description |
string | {string} Resource name string. |
updateBackup(request, options)
updateBackup(request?: protos.google.cloud.filestore.v1beta1.IUpdateBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates the settings of a specific backup.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. A backup resource google.cloud.filestore.v1beta1.Backup
*/
// const backup = {}
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field.
*/
// const updateMask = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callUpdateBackup() {
// Construct request
const request = {
backup,
updateMask,
};
// Run request
const [operation] = await filestoreClient.updateBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackup();
updateBackup(request, options, callback)
updateBackup(request: protos.google.cloud.filestore.v1beta1.IUpdateBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
updateBackup(request, callback)
updateBackup(request: protos.google.cloud.filestore.v1beta1.IUpdateBackupRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateBackupRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IBackup, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
updateInstance(request, options)
updateInstance(request?: protos.google.cloud.filestore.v1beta1.IUpdateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates the settings of a specific instance.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field. The elements of the repeated paths field may only include these
* fields:
* * "description"
* * "file_shares"
* * "labels"
*/
// const updateMask = {}
/**
* Required. Only fields specified in update_mask are updated.
*/
// const instance = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callUpdateInstance() {
// Construct request
const request = {
updateMask,
instance,
};
// Run request
const [operation] = await filestoreClient.updateInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateInstance();
updateInstance(request, options, callback)
updateInstance(request: protos.google.cloud.filestore.v1beta1.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
updateInstance(request, callback)
updateInstance(request: protos.google.cloud.filestore.v1beta1.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IInstance, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
updateShare(request, options)
updateShare(request?: protos.google.cloud.filestore.v1beta1.IUpdateShareRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates the settings of a specific share.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateShareRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. A share resource.
* Only fields specified in update_mask are updated.
*/
// const share = {}
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field.
* The elements of the repeated paths field may only include these fields:
* * "description"
* * "capacity_gb"
* * "labels"
* * "nfs_export_options"
*/
// const updateMask = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callUpdateShare() {
// Construct request
const request = {
share,
updateMask,
};
// Run request
const [operation] = await filestoreClient.updateShare(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateShare();
updateShare(request, options, callback)
updateShare(request: protos.google.cloud.filestore.v1beta1.IUpdateShareRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateShareRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
updateShare(request, callback)
updateShare(request: protos.google.cloud.filestore.v1beta1.IUpdateShareRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateShareRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.IShare, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
updateSnapshot(request, options)
updateSnapshot(request?: protos.google.cloud.filestore.v1beta1.IUpdateSnapshotRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates the settings of a specific snapshot.
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateSnapshotRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field.
*/
// const updateMask = {}
/**
* Required. A snapshot resource
*/
// const snapshot = {}
// Imports the Filestore library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore').v1beta1;
// Instantiates a client
const filestoreClient = new CloudFilestoreManagerClient();
async function callUpdateSnapshot() {
// Construct request
const request = {
updateMask,
snapshot,
};
// Run request
const [operation] = await filestoreClient.updateSnapshot(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateSnapshot();
updateSnapshot(request, options, callback)
updateSnapshot(request: protos.google.cloud.filestore.v1beta1.IUpdateSnapshotRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateSnapshotRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |
updateSnapshot(request, callback)
updateSnapshot(request: protos.google.cloud.filestore.v1beta1.IUpdateSnapshotRequest, callback: Callback<LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Name | Description |
request |
protos.google.cloud.filestore.v1beta1.IUpdateSnapshotRequest
|
callback |
Callback<LROperation<protos.google.cloud.filestore.v1beta1.ISnapshot, protos.google.cloud.common.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Type | Description |
void |