Service describing handlers for resources v1
Package
@google-cloud/lustreConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of LustreClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
get apiEndpoint(): string;The DNS address for this API service.
apiEndpoint
static get apiEndpoint(): string;The DNS address for this API service - same as servicePath.
auth
auth: gax.GoogleAuth;descriptors
descriptors: Descriptors;iamClient
iamClient: IamClient;innerApiCalls
innerApiCalls: {
[name: string]: Function;
};locationsClient
locationsClient: LocationsClient;lustreStub
lustreStub?: Promise<{
[name: string]: Function;
}>;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.
universeDomain
get universeDomain(): string;warn
warn: (code: string, message: string, warnType?: string) => void;Methods
cancelOperation(request, optionsOrCallback, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | 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.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
|
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. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
checkCreateDirectoryPolicyProgress(name)
checkCreateDirectoryPolicyProgress(name: string): Promise<LROperation<protos.google.cloud.lustre.v1.DirectoryPolicy, protos.google.cloud.lustre.v1.OperationMetadata>>;Check the status of the long running operation returned by createDirectoryPolicy().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.lustre.v1.DirectoryPolicy, protos.google.cloud.lustre.v1.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 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 parent instance.
* It must be in the format of
* `projects/{project}/locations/{location}/instances/{instance}`.
*/
// const parent = 'abc123'
/**
* Required. The ID for the DirectoryPolicy to create.
*/
// const directoryPolicyId = 'abc123'
/**
* Required. The directory policy to create.
*/
// const directoryPolicy = {}
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callCreateDirectoryPolicy() {
// Construct request
const request = {
parent,
directoryPolicyId,
directoryPolicy,
};
// Run request
const [operation] = await lustreClient.createDirectoryPolicy(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateDirectoryPolicy();
checkCreateInstanceProgress(name)
checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.lustre.v1.Instance, protos.google.cloud.lustre.v1.OperationMetadata>>;Check the status of the long running operation returned by createInstance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.lustre.v1.Instance, protos.google.cloud.lustre.v1.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 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}/locations/{location}`. Locations map to Google Cloud
* zones; for example, `us-west1-b`.
*/
// const parent = 'abc123'
/**
* Required. The name of the Managed Lustre instance.
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
*/
// const instanceId = 'abc123'
/**
* Required. The resource being created
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
};
// Run request
const [operation] = await lustreClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
checkCreateMirrorProgress(name)
checkCreateMirrorProgress(name: string): Promise<LROperation<protos.google.cloud.lustre.v1.Mirror, protos.google.cloud.lustre.v1.CreateMirrorMetadata>>;Check the status of the long running operation returned by createMirror().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.lustre.v1.Mirror, protos.google.cloud.lustre.v1.CreateMirrorMetadata>> |
{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 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. Parent instance resource where the mirror will be created, in the
* format: `projects/{project}/locations/{location}/instances/{instance}`
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the mirror.
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
* The ID cannot be changed after the mirror is created.
*/
// const mirrorId = 'abc123'
/**
* Required. The mirror to create.
*/
// const mirror = {}
/**
* Optional. The unique ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server guarantees that a
* request doesn't result in creation of duplicate mirrors for at least 60
* minutes.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate mirrors.
* The request ID must be a valid UUID version 4 with the exception that zero
* UUID is not supported (`00000000-0000-0000-0000-000000000000`).
* This request is only idempotent if a `request_id` is provided.
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callCreateMirror() {
// Construct request
const request = {
parent,
mirrorId,
mirror,
};
// Run request
const [operation] = await lustreClient.createMirror(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateMirror();
checkDeleteDirectoryPolicyProgress(name)
checkDeleteDirectoryPolicyProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.lustre.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteDirectoryPolicy().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.lustre.v1.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 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 directory policy.
* DirectoryPolicy names have the form
* `projects/{project}/locations/{location}/instances/{instance}/directoryPolicies/{id}`.
*/
// const name = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callDeleteDirectoryPolicy() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await lustreClient.deleteDirectoryPolicy(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteDirectoryPolicy();
checkDeleteInstanceProgress(name)
checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.lustre.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteInstance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.lustre.v1.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 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 to delete, in the format
* `projects/{projectId}/locations/{location}/instances/{instanceId}`.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. If set to true, any sub-resources from this instance will also be
* deleted. Otherwise, the request will only work if the instance has no
* sub-resources.
*/
// const force = true
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callDeleteInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await lustreClient.deleteInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInstance();
checkDeleteMirrorProgress(name)
checkDeleteMirrorProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.lustre.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteMirror().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.lustre.v1.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 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. Name of the mirror to delete, in the format:
* `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
*/
// const name = 'abc123'
/**
* Optional. The unique ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server guarantees that a
* request doesn't result in the same delete request being executed for at
* least 60 minutes.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request.
* The request ID must be a valid UUID version 4 with the exception that zero
* UUID is not supported (`00000000-0000-0000-0000-000000000000`).
* This request is only idempotent if a `request_id` is provided.
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callDeleteMirror() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await lustreClient.deleteMirror(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteMirror();
checkExportDataProgress(name)
checkExportDataProgress(name: string): Promise<LROperation<protos.google.cloud.lustre.v1.ExportDataResponse, protos.google.cloud.lustre.v1.ExportDataMetadata>>;Check the status of the long running operation returned by exportData().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.lustre.v1.ExportDataResponse, protos.google.cloud.lustre.v1.ExportDataMetadata>> |
{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 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.
*/
/**
* The root directory path to the Managed Lustre file system. Must start
* with `/`. Default is `/`.
*/
// const lustrePath = {}
/**
* The URI to a Cloud Storage bucket, or a path within a bucket, using
* the format `gs://checkImportDataProgress(name)
checkImportDataProgress(name: string): Promise<LROperation<protos.google.cloud.lustre.v1.ImportDataResponse, protos.google.cloud.lustre.v1.ImportDataMetadata>>;Check the status of the long running operation returned by importData().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.lustre.v1.ImportDataResponse, protos.google.cloud.lustre.v1.ImportDataMetadata>> |
{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 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.
*/
/**
* The Cloud Storage source bucket and, optionally, path inside the bucket.
* If a path inside the bucket is specified, it must end with a forward
* slash (`/`).
*/
// const gcsPath = {}
/**
* Lustre path destination.
*/
// const lustrePath = {}
/**
* Required. The name of the Managed Lustre instance in the format
* `projects/{project}/locations/{location}/instances/{instance}`.
*/
// const name = 'abc123'
/**
* Optional. UUID to identify requests.
*/
// const requestId = 'abc123'
/**
* Optional. User-specified service account used to perform the transfer.
* If unspecified, the default Managed Lustre service agent will be used.
* Use one of the following formats:
* * `{EMAIL_ADDRESS_OR_UNIQUE_ID}`
* * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
* * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
*/
// const serviceAccount = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callImportData() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await lustreClient.importData(request);
const [response] = await operation.promise();
console.log(response);
}
callImportData();
checkRescheduleMaintenanceProgress(name)
checkRescheduleMaintenanceProgress(name: string): Promise<LROperation<protos.google.cloud.lustre.v1.Instance, protos.google.cloud.lustre.v1.OperationMetadata>>;Check the status of the long running operation returned by rescheduleMaintenance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.lustre.v1.Instance, protos.google.cloud.lustre.v1.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 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. Format:
* projects/{project}/locations/{location}/instances/{instance}
*/
// const name = 'abc123'
/**
* Required. The desired reschedule settings.
*/
// const reschedule = {}
/**
* Optional. A unique identifier for this request. A random UUID is
* recommended. This request is only idempotent if a `request_id` is provided.
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callRescheduleMaintenance() {
// Construct request
const request = {
name,
reschedule,
};
// Run request
const [operation] = await lustreClient.rescheduleMaintenance(request);
const [response] = await operation.promise();
console.log(response);
}
callRescheduleMaintenance();
checkUpdateInstanceProgress(name)
checkUpdateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.lustre.v1.Instance, protos.google.cloud.lustre.v1.OperationMetadata>>;Check the status of the long running operation returned by updateInstance().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.lustre.v1.Instance, protos.google.cloud.lustre.v1.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 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.
*/
/**
* Optional. Specifies the fields to be overwritten in the instance resource
* by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If no
* mask is provided then all fields present in the request are
* overwritten.
*/
// const updateMask = {}
/**
* Required. The resource name of the instance to update, in the format
* `projects/{projectId}/locations/{location}/instances/{instanceId}`.
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callUpdateInstance() {
// Construct request
const request = {
instance,
};
// Run request
const [operation] = await lustreClient.updateInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateInstance();
checkUpdateMirrorProgress(name)
checkUpdateMirrorProgress(name: string): Promise<LROperation<protos.google.cloud.lustre.v1.Mirror, protos.google.cloud.lustre.v1.OperationMetadata>>;Check the status of the long running operation returned by updateMirror().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.lustre.v1.Mirror, protos.google.cloud.lustre.v1.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 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. Mirror to update. The mirror's `name` field is used to identify
* the mirror to update, in the format:
* `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
*/
// const mirror = {}
/**
* Optional. Fields specified in the update_mask are relative to the resource,
* not the full request. A field will be overwritten if it is in the mask. If
* no mask is provided then all fields present in the request are overwritten.
*/
// const updateMask = {}
/**
* Optional. The unique ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server guarantees that a
* request doesn't result in the same update request being executed for at
* least 60 minutes.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request.
* The request ID must be a valid UUID version 4 with the exception that zero
* UUID is not supported (`00000000-0000-0000-0000-000000000000`).
* This request is only idempotent if a `request_id` is provided.
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callUpdateMirror() {
// Construct request
const request = {
mirror,
};
// Run request
const [operation] = await lustreClient.updateMirror(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateMirror();
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.
| Returns | |
|---|---|
| Type | Description |
Promise<void> |
{Promise} A promise that resolves when the client is closed. |
createDirectoryPolicy(request, options)
createDirectoryPolicy(request?: protos.google.cloud.lustre.v1.ICreateDirectoryPolicyRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Creates a directory policy resource.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateDirectoryPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.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 parent instance.
* It must be in the format of
* `projects/{project}/locations/{location}/instances/{instance}`.
*/
// const parent = 'abc123'
/**
* Required. The ID for the DirectoryPolicy to create.
*/
// const directoryPolicyId = 'abc123'
/**
* Required. The directory policy to create.
*/
// const directoryPolicy = {}
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callCreateDirectoryPolicy() {
// Construct request
const request = {
parent,
directoryPolicyId,
directoryPolicy,
};
// Run request
const [operation] = await lustreClient.createDirectoryPolicy(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateDirectoryPolicy();
createDirectoryPolicy(request, options, callback)
createDirectoryPolicy(request: protos.google.cloud.lustre.v1.ICreateDirectoryPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateDirectoryPolicyRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createDirectoryPolicy(request, callback)
createDirectoryPolicy(request: protos.google.cloud.lustre.v1.ICreateDirectoryPolicyRequest, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateDirectoryPolicyRequest
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createInstance(request, options)
createInstance(request?: protos.google.cloud.lustre.v1.ICreateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Creates a new instance in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.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}/locations/{location}`. Locations map to Google Cloud
* zones; for example, `us-west1-b`.
*/
// const parent = 'abc123'
/**
* Required. The name of the Managed Lustre instance.
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
*/
// const instanceId = 'abc123'
/**
* Required. The resource being created
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
};
// Run request
const [operation] = await lustreClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
createInstance(request, options, callback)
createInstance(request: protos.google.cloud.lustre.v1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createInstance(request, callback)
createInstance(request: protos.google.cloud.lustre.v1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createMirror(request, options)
createMirror(request?: protos.google.cloud.lustre.v1.ICreateMirrorRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.ICreateMirrorMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Creates a new mirror in a given instance.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateMirrorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.ICreateMirrorMetadata>,
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. Parent instance resource where the mirror will be created, in the
* format: `projects/{project}/locations/{location}/instances/{instance}`
*/
// const parent = 'abc123'
/**
* Required. The ID to use for the mirror.
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
* The ID cannot be changed after the mirror is created.
*/
// const mirrorId = 'abc123'
/**
* Required. The mirror to create.
*/
// const mirror = {}
/**
* Optional. The unique ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server guarantees that a
* request doesn't result in creation of duplicate mirrors for at least 60
* minutes.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate mirrors.
* The request ID must be a valid UUID version 4 with the exception that zero
* UUID is not supported (`00000000-0000-0000-0000-000000000000`).
* This request is only idempotent if a `request_id` is provided.
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callCreateMirror() {
// Construct request
const request = {
parent,
mirrorId,
mirror,
};
// Run request
const [operation] = await lustreClient.createMirror(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateMirror();
createMirror(request, options, callback)
createMirror(request: protos.google.cloud.lustre.v1.ICreateMirrorRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.ICreateMirrorMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateMirrorRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.ICreateMirrorMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createMirror(request, callback)
createMirror(request: protos.google.cloud.lustre.v1.ICreateMirrorRequest, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.ICreateMirrorMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateMirrorRequest
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.ICreateMirrorMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteDirectoryPolicy(request, options)
deleteDirectoryPolicy(request?: protos.google.cloud.lustre.v1.IDeleteDirectoryPolicyRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a directory policy resource.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteDirectoryPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.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 directory policy.
* DirectoryPolicy names have the form
* `projects/{project}/locations/{location}/instances/{instance}/directoryPolicies/{id}`.
*/
// const name = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callDeleteDirectoryPolicy() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await lustreClient.deleteDirectoryPolicy(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteDirectoryPolicy();
deleteDirectoryPolicy(request, options, callback)
deleteDirectoryPolicy(request: protos.google.cloud.lustre.v1.IDeleteDirectoryPolicyRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteDirectoryPolicyRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteDirectoryPolicy(request, callback)
deleteDirectoryPolicy(request: protos.google.cloud.lustre.v1.IDeleteDirectoryPolicyRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteDirectoryPolicyRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteInstance(request, options)
deleteInstance(request?: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a single instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.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 to delete, in the format
* `projects/{projectId}/locations/{location}/instances/{instanceId}`.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. If set to true, any sub-resources from this instance will also be
* deleted. Otherwise, the request will only work if the instance has no
* sub-resources.
*/
// const force = true
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callDeleteInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await lustreClient.deleteInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInstance();
deleteInstance(request, options, callback)
deleteInstance(request: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteInstance(request, callback)
deleteInstance(request: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteInstanceRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteMirror(request, options)
deleteMirror(request?: protos.google.cloud.lustre.v1.IDeleteMirrorRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a single mirror.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteMirrorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.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. Name of the mirror to delete, in the format:
* `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
*/
// const name = 'abc123'
/**
* Optional. The unique ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server guarantees that a
* request doesn't result in the same delete request being executed for at
* least 60 minutes.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request.
* The request ID must be a valid UUID version 4 with the exception that zero
* UUID is not supported (`00000000-0000-0000-0000-000000000000`).
* This request is only idempotent if a `request_id` is provided.
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callDeleteMirror() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await lustreClient.deleteMirror(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteMirror();
deleteMirror(request, options, callback)
deleteMirror(request: protos.google.cloud.lustre.v1.IDeleteMirrorRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteMirrorRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteMirror(request, callback)
deleteMirror(request: protos.google.cloud.lustre.v1.IDeleteMirrorRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteMirrorRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteOperation(request, optionsOrCallback, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: 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.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
|
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. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
directoryPolicyPath(project, location, instance, directoryPolicy)
directoryPolicyPath(project: string, location: string, instance: string, directoryPolicy: string): string;Return a fully-qualified directoryPolicy resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
instance |
string
|
directoryPolicy |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
exportData(request, options)
exportData(request?: protos.google.cloud.lustre.v1.IExportDataRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.lustre.v1.IExportDataResponse, protos.google.cloud.lustre.v1.IExportDataMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Exports data from a Managed Lustre instance to Cloud Storage.
| Parameters | |
|---|---|
| Name | Description |
request |
IExportDataRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.lustre.v1.IExportDataResponse, protos.google.cloud.lustre.v1.IExportDataMetadata>,
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.
*/
/**
* The root directory path to the Managed Lustre file system. Must start
* with `/`. Default is `/`.
*/
// const lustrePath = {}
/**
* The URI to a Cloud Storage bucket, or a path within a bucket, using
* the format `gs://exportData(request, options, callback)
exportData(request: protos.google.cloud.lustre.v1.IExportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IExportDataResponse, protos.google.cloud.lustre.v1.IExportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IExportDataRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IExportDataResponse, protos.google.cloud.lustre.v1.IExportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
exportData(request, callback)
exportData(request: protos.google.cloud.lustre.v1.IExportDataRequest, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IExportDataResponse, protos.google.cloud.lustre.v1.IExportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IExportDataRequest
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IExportDataResponse, protos.google.cloud.lustre.v1.IExportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getDirectoryPolicy(request, options)
getDirectoryPolicy(request?: protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest, options?: CallOptions): Promise<[
protos.google.cloud.lustre.v1.IDirectoryPolicy,
protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest | undefined,
{} | undefined
]>;Gets details of a single directory policy.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetDirectoryPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.lustre.v1.IDirectoryPolicy,
protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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 directory policy.
* DirectoryPolicy names have the form
* `projects/{project}/locations/{location}/instances/{instance}/directoryPolicies/{id}`.
*/
// const name = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callGetDirectoryPolicy() {
// Construct request
const request = {
name,
};
// Run request
const response = await lustreClient.getDirectoryPolicy(request);
console.log(response);
}
callGetDirectoryPolicy();
getDirectoryPolicy(request, options, callback)
getDirectoryPolicy(request: protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetDirectoryPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getDirectoryPolicy(request, callback)
getDirectoryPolicy(request: protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest, callback: Callback<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetDirectoryPolicyRequest
|
callback |
Callback<protos.google.cloud.lustre.v1.IDirectoryPolicy, protos.google.cloud.lustre.v1.IGetDirectoryPolicyRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getIamPolicy(request, options, callback)
getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
| Parameters | |
|---|---|
| Name | Description |
request |
IamProtos.google.iam.v1.GetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | 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 . |
| Returns | |
|---|---|
| Type | Description |
Promise<[google.iam.v1.Policy]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
getInstance(request, options)
getInstance(request?: protos.google.cloud.lustre.v1.IGetInstanceRequest, options?: CallOptions): Promise<[
protos.google.cloud.lustre.v1.IInstance,
protos.google.cloud.lustre.v1.IGetInstanceRequest | undefined,
{} | undefined
]>;Gets details of a single instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.lustre.v1.IInstance,
protos.google.cloud.lustre.v1.IGetInstanceRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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/{projectId}/locations/{location}/instances/{instanceId}`.
*/
// const name = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callGetInstance() {
// Construct request
const request = {
name,
};
// Run request
const response = await lustreClient.getInstance(request);
console.log(response);
}
callGetInstance();
getInstance(request, options, callback)
getInstance(request: protos.google.cloud.lustre.v1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetInstanceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getInstance(request, callback)
getInstance(request: protos.google.cloud.lustre.v1.IGetInstanceRequest, callback: Callback<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetInstanceRequest
|
callback |
Callback<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| 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.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.location.ILocation> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
const [response] = await client.getLocation(request);
getMirror(request, options)
getMirror(request?: protos.google.cloud.lustre.v1.IGetMirrorRequest, options?: CallOptions): Promise<[
protos.google.cloud.lustre.v1.IMirror,
protos.google.cloud.lustre.v1.IGetMirrorRequest | undefined,
{} | undefined
]>;Gets details of a single mirror.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetMirrorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.lustre.v1.IMirror,
protos.google.cloud.lustre.v1.IGetMirrorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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. Name of the mirror to retrieve, in the format:
* `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
*/
// const name = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callGetMirror() {
// Construct request
const request = {
name,
};
// Run request
const response = await lustreClient.getMirror(request);
console.log(response);
}
callGetMirror();
getMirror(request, options, callback)
getMirror(request: protos.google.cloud.lustre.v1.IGetMirrorRequest, options: CallOptions, callback: Callback<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IGetMirrorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetMirrorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IGetMirrorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getMirror(request, callback)
getMirror(request: protos.google.cloud.lustre.v1.IGetMirrorRequest, callback: Callback<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IGetMirrorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetMirrorRequest
|
callback |
Callback<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IGetMirrorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getOperation(request, optionsOrCallback, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: 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.
| Parameters | |
|---|---|
| Name | Description |
request |
GetOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
|
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 . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| 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>;| Returns | |
|---|---|
| Type | Description |
Promise<string> |
|
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;| Parameter | |
|---|---|
| Name | Description |
callback |
Callback<string, undefined, undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
importData(request, options)
importData(request?: protos.google.cloud.lustre.v1.IImportDataRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.lustre.v1.IImportDataResponse, protos.google.cloud.lustre.v1.IImportDataMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Imports data from Cloud Storage to a Managed Lustre instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IImportDataRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.lustre.v1.IImportDataResponse, protos.google.cloud.lustre.v1.IImportDataMetadata>,
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.
*/
/**
* The Cloud Storage source bucket and, optionally, path inside the bucket.
* If a path inside the bucket is specified, it must end with a forward
* slash (`/`).
*/
// const gcsPath = {}
/**
* Lustre path destination.
*/
// const lustrePath = {}
/**
* Required. The name of the Managed Lustre instance in the format
* `projects/{project}/locations/{location}/instances/{instance}`.
*/
// const name = 'abc123'
/**
* Optional. UUID to identify requests.
*/
// const requestId = 'abc123'
/**
* Optional. User-specified service account used to perform the transfer.
* If unspecified, the default Managed Lustre service agent will be used.
* Use one of the following formats:
* * `{EMAIL_ADDRESS_OR_UNIQUE_ID}`
* * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
* * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
*/
// const serviceAccount = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callImportData() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await lustreClient.importData(request);
const [response] = await operation.promise();
console.log(response);
}
callImportData();
importData(request, options, callback)
importData(request: protos.google.cloud.lustre.v1.IImportDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IImportDataResponse, protos.google.cloud.lustre.v1.IImportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IImportDataRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IImportDataResponse, protos.google.cloud.lustre.v1.IImportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
importData(request, callback)
importData(request: protos.google.cloud.lustre.v1.IImportDataRequest, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IImportDataResponse, protos.google.cloud.lustre.v1.IImportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IImportDataRequest
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IImportDataResponse, protos.google.cloud.lustre.v1.IImportDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| 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.
| Returns | |
|---|---|
| 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.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
instance |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
listDirectoryPolicies(request, options)
listDirectoryPolicies(request?: protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, options?: CallOptions): Promise<[
protos.google.cloud.lustre.v1.IDirectoryPolicy[],
protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest | null,
protos.google.cloud.lustre.v1.IListDirectoryPoliciesResponse
]>;Gets details of multiple directory policies under a given instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDirectoryPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.lustre.v1.IDirectoryPolicy[],
protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest | null,
protos.google.cloud.lustre.v1.IListDirectoryPoliciesResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listDirectoryPolicies(request, options, callback)
listDirectoryPolicies(request: protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, protos.google.cloud.lustre.v1.IListDirectoryPoliciesResponse | null | undefined, protos.google.cloud.lustre.v1.IDirectoryPolicy>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListDirectoryPoliciesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, protos.google.cloud.lustre.v1.IListDirectoryPoliciesResponse | null | undefined, protos.google.cloud.lustre.v1.IDirectoryPolicy>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listDirectoryPolicies(request, callback)
listDirectoryPolicies(request: protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, callback: PaginationCallback<protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, protos.google.cloud.lustre.v1.IListDirectoryPoliciesResponse | null | undefined, protos.google.cloud.lustre.v1.IDirectoryPolicy>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListDirectoryPoliciesRequest
|
callback |
PaginationCallback<protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, protos.google.cloud.lustre.v1.IListDirectoryPoliciesResponse | null | undefined, protos.google.cloud.lustre.v1.IDirectoryPolicy>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listDirectoryPoliciesAsync(request, options)
listDirectoryPoliciesAsync(request?: protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.lustre.v1.IDirectoryPolicy>;Equivalent to listDirectoryPolicies, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDirectoryPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.lustre.v1.IDirectoryPolicy> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 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 parent instance.
* It must be in the format of
* `projects/{project}/locations/{location}/instances/{instance}`.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server might return fewer items than
* requested. If unspecified, the server will pick an appropriate default. The
* maximum value is 1000; values above 1000 will be coerced to 1000.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListDirectoryPolicies`
* call. Provide this to retrieve the subsequent page. When paginating, all
* other parameters provided to `ListDirectoryPolicies` must match the call
* that provided the page token.
*/
// const pageToken = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callListDirectoryPolicies() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = lustreClient.listDirectoryPoliciesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDirectoryPolicies();
listDirectoryPoliciesStream(request, options)
listDirectoryPoliciesStream(request?: protos.google.cloud.lustre.v1.IListDirectoryPoliciesRequest, options?: CallOptions): Transform;Equivalent to listDirectoryPolicies, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDirectoryPoliciesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing 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.lustre.v1.IListInstancesRequest, options?: CallOptions): Promise<[
protos.google.cloud.lustre.v1.IInstance[],
protos.google.cloud.lustre.v1.IListInstancesRequest | null,
protos.google.cloud.lustre.v1.IListInstancesResponse
]>;Lists instances in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.lustre.v1.IInstance[],
protos.google.cloud.lustre.v1.IListInstancesRequest | null,
protos.google.cloud.lustre.v1.IListInstancesResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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.lustre.v1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.lustre.v1.IListInstancesRequest, protos.google.cloud.lustre.v1.IListInstancesResponse | null | undefined, protos.google.cloud.lustre.v1.IInstance>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.lustre.v1.IListInstancesRequest, protos.google.cloud.lustre.v1.IListInstancesResponse | null | undefined, protos.google.cloud.lustre.v1.IInstance>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listInstances(request, callback)
listInstances(request: protos.google.cloud.lustre.v1.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.lustre.v1.IListInstancesRequest, protos.google.cloud.lustre.v1.IListInstancesResponse | null | undefined, protos.google.cloud.lustre.v1.IInstance>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
|
callback |
PaginationCallback<protos.google.cloud.lustre.v1.IListInstancesRequest, protos.google.cloud.lustre.v1.IListInstancesResponse | null | undefined, protos.google.cloud.lustre.v1.IInstance>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listInstancesAsync(request, options)
listInstancesAsync(request?: protos.google.cloud.lustre.v1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.lustre.v1.IInstance>;Equivalent to listInstances, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.lustre.v1.IInstance> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 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 a list of
* instances, in the format `projects/{projectId}/locations/{location}`.
* To retrieve instance information for all locations, use "-" as the value
* of `{location}`.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server might return fewer items than
* requested. If unspecified, the server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Desired order of results.
*/
// const orderBy = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callListInstances() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = lustreClient.listInstancesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListInstances();
listInstancesStream(request, options)
listInstancesStream(request?: protos.google.cloud.lustre.v1.IListInstancesRequest, options?: CallOptions): Transform;Equivalent to listInstances, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing 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.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<google.cloud.location.ILocation> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listMirrors(request, options)
listMirrors(request?: protos.google.cloud.lustre.v1.IListMirrorsRequest, options?: CallOptions): Promise<[
protos.google.cloud.lustre.v1.IMirror[],
protos.google.cloud.lustre.v1.IListMirrorsRequest | null,
protos.google.cloud.lustre.v1.IListMirrorsResponse
]>;Gets details of multiple mirrors under a given instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IListMirrorsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.lustre.v1.IMirror[],
protos.google.cloud.lustre.v1.IListMirrorsRequest | null,
protos.google.cloud.lustre.v1.IListMirrorsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listMirrors(request, options, callback)
listMirrors(request: protos.google.cloud.lustre.v1.IListMirrorsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.lustre.v1.IListMirrorsRequest, protos.google.cloud.lustre.v1.IListMirrorsResponse | null | undefined, protos.google.cloud.lustre.v1.IMirror>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListMirrorsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.lustre.v1.IListMirrorsRequest, protos.google.cloud.lustre.v1.IListMirrorsResponse | null | undefined, protos.google.cloud.lustre.v1.IMirror>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listMirrors(request, callback)
listMirrors(request: protos.google.cloud.lustre.v1.IListMirrorsRequest, callback: PaginationCallback<protos.google.cloud.lustre.v1.IListMirrorsRequest, protos.google.cloud.lustre.v1.IListMirrorsResponse | null | undefined, protos.google.cloud.lustre.v1.IMirror>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListMirrorsRequest
|
callback |
PaginationCallback<protos.google.cloud.lustre.v1.IListMirrorsRequest, protos.google.cloud.lustre.v1.IListMirrorsResponse | null | undefined, protos.google.cloud.lustre.v1.IMirror>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listMirrorsAsync(request, options)
listMirrorsAsync(request?: protos.google.cloud.lustre.v1.IListMirrorsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.lustre.v1.IMirror>;Equivalent to listMirrors, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListMirrorsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.lustre.v1.IMirror> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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 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. Parent instance resource where the mirrors will be listed, in the
* format: `projects/{project}/locations/{location}/instances/{instance}`
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. The server might return fewer items than
* requested. If unspecified, the default page size is 10. The maximum value
* is 1000.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListMirrors` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListMirrors` must match
* the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. Desired order of results.
*/
// const orderBy = 'abc123'
/**
* Optional. Filtering results.
*/
// const filter = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callListMirrors() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = lustreClient.listMirrorsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListMirrors();
listMirrorsStream(request, options)
listMirrorsStream(request?: protos.google.cloud.lustre.v1.IListMirrorsRequest, options?: CallOptions): Transform;Equivalent to listMirrors, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListMirrorsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing 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 |
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;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.
| Parameters | |
|---|---|
| Name | Description |
request |
ListOperationsRequest
The request object that will be sent. |
options |
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.longrunning.IOperation> |
{Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
matchDirectoryPolicyFromDirectoryPolicyName(directoryPolicyName)
matchDirectoryPolicyFromDirectoryPolicyName(directoryPolicyName: string): string | number;Parse the directory_policy from DirectoryPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
directoryPolicyName |
string
A fully-qualified path representing DirectoryPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the directory_policy. |
matchInstanceFromDirectoryPolicyName(directoryPolicyName)
matchInstanceFromDirectoryPolicyName(directoryPolicyName: string): string | number;Parse the instance from DirectoryPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
directoryPolicyName |
string
A fully-qualified path representing DirectoryPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the instance. |
matchInstanceFromInstanceName(instanceName)
matchInstanceFromInstanceName(instanceName: string): string | number;Parse the instance from Instance resource.
| Parameter | |
|---|---|
| Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the instance. |
matchInstanceFromMirrorName(mirrorName)
matchInstanceFromMirrorName(mirrorName: string): string | number;Parse the instance from Mirror resource.
| Parameter | |
|---|---|
| Name | Description |
mirrorName |
string
A fully-qualified path representing Mirror resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the instance. |
matchLocationFromDirectoryPolicyName(directoryPolicyName)
matchLocationFromDirectoryPolicyName(directoryPolicyName: string): string | number;Parse the location from DirectoryPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
directoryPolicyName |
string
A fully-qualified path representing DirectoryPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromInstanceName(instanceName)
matchLocationFromInstanceName(instanceName: string): string | number;Parse the location from Instance resource.
| Parameter | |
|---|---|
| Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromMirrorName(mirrorName)
matchLocationFromMirrorName(mirrorName: string): string | number;Parse the location from Mirror resource.
| Parameter | |
|---|---|
| Name | Description |
mirrorName |
string
A fully-qualified path representing Mirror resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchMirrorFromMirrorName(mirrorName)
matchMirrorFromMirrorName(mirrorName: string): string | number;Parse the mirror from Mirror resource.
| Parameter | |
|---|---|
| Name | Description |
mirrorName |
string
A fully-qualified path representing Mirror resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the mirror. |
matchProjectFromDirectoryPolicyName(directoryPolicyName)
matchProjectFromDirectoryPolicyName(directoryPolicyName: string): string | number;Parse the project from DirectoryPolicy resource.
| Parameter | |
|---|---|
| Name | Description |
directoryPolicyName |
string
A fully-qualified path representing DirectoryPolicy resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromInstanceName(instanceName)
matchProjectFromInstanceName(instanceName: string): string | number;Parse the project from Instance resource.
| Parameter | |
|---|---|
| Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromMirrorName(mirrorName)
matchProjectFromMirrorName(mirrorName: string): string | number;Parse the project from Mirror resource.
| Parameter | |
|---|---|
| Name | Description |
mirrorName |
string
A fully-qualified path representing Mirror resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
mirrorPath(project, location, instance, mirror)
mirrorPath(project: string, location: string, instance: string, mirror: string): string;Return a fully-qualified mirror resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
instance |
string
|
mirror |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
rescheduleMaintenance(request, options)
rescheduleMaintenance(request?: protos.google.cloud.lustre.v1.IRescheduleMaintenanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Reschedules a planned maintenance event for a specific instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleMaintenanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.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. Format:
* projects/{project}/locations/{location}/instances/{instance}
*/
// const name = 'abc123'
/**
* Required. The desired reschedule settings.
*/
// const reschedule = {}
/**
* Optional. A unique identifier for this request. A random UUID is
* recommended. This request is only idempotent if a `request_id` is provided.
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callRescheduleMaintenance() {
// Construct request
const request = {
name,
reschedule,
};
// Run request
const [operation] = await lustreClient.rescheduleMaintenance(request);
const [response] = await operation.promise();
console.log(response);
}
callRescheduleMaintenance();
rescheduleMaintenance(request, options, callback)
rescheduleMaintenance(request: protos.google.cloud.lustre.v1.IRescheduleMaintenanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleMaintenanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
rescheduleMaintenance(request, callback)
rescheduleMaintenance(request: protos.google.cloud.lustre.v1.IRescheduleMaintenanceRequest, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRescheduleMaintenanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
setIamPolicy(request, options, callback)
setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
| Parameters | |
|---|---|
| Name | Description |
request |
IamProtos.google.iam.v1.SetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | 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 . |
| Returns | |
|---|---|
| Type | Description |
Promise<[google.iam.v1.Policy]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
testIamPermissions(request, options, callback)
testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
| Parameters | |
|---|---|
| Name | Description |
request |
IamProtos.google.iam.v1.TestIamPermissionsRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | 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 . |
| Returns | |
|---|---|
| Type | Description |
Promise<[google.iam.v1.TestIamPermissionsResponse]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
updateInstance(request, options)
updateInstance(request?: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the parameters of a single instance.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.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.
*/
/**
* Optional. Specifies the fields to be overwritten in the instance resource
* by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If no
* mask is provided then all fields present in the request are
* overwritten.
*/
// const updateMask = {}
/**
* Required. The resource name of the instance to update, in the format
* `projects/{projectId}/locations/{location}/instances/{instanceId}`.
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callUpdateInstance() {
// Construct request
const request = {
instance,
};
// Run request
const [operation] = await lustreClient.updateInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateInstance();
updateInstance(request, options, callback)
updateInstance(request: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateInstance(request, callback)
updateInstance(request: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IInstance, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateMirror(request, options)
updateMirror(request?: protos.google.cloud.lustre.v1.IUpdateMirrorRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the parameters of a single mirror.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateMirrorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.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. Mirror to update. The mirror's `name` field is used to identify
* the mirror to update, in the format:
* `projects/{project}/locations/{location}/instances/{instance}/mirrors/{mirror}`
*/
// const mirror = {}
/**
* Optional. Fields specified in the update_mask are relative to the resource,
* not the full request. A field will be overwritten if it is in the mask. If
* no mask is provided then all fields present in the request are overwritten.
*/
// const updateMask = {}
/**
* Optional. The unique ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server guarantees that a
* request doesn't result in the same update request being executed for at
* least 60 minutes.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request.
* The request ID must be a valid UUID version 4 with the exception that zero
* UUID is not supported (`00000000-0000-0000-0000-000000000000`).
* This request is only idempotent if a `request_id` is provided.
*/
// const requestId = 'abc123'
// Imports the Lustre library
const {LustreClient} = require('@google-cloud/lustre').v1;
// Instantiates a client
const lustreClient = new LustreClient();
async function callUpdateMirror() {
// Construct request
const request = {
mirror,
};
// Run request
const [operation] = await lustreClient.updateMirror(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateMirror();
updateMirror(request, options, callback)
updateMirror(request: protos.google.cloud.lustre.v1.IUpdateMirrorRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateMirrorRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateMirror(request, callback)
updateMirror(request: protos.google.cloud.lustre.v1.IUpdateMirrorRequest, callback: Callback<LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateMirrorRequest
|
callback |
Callback<LROperation<protos.google.cloud.lustre.v1.IMirror, protos.google.cloud.lustre.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|