Class v1.WorkstationsClient (0.1.1)

Service for interacting with Cloud Workstations. v1

Package

@google-cloud/workstations

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of WorkstationsClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new WorkstationsClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

workstationsStub

workstationsStub?: Promise<{
        [name: string]: Function;
    }>;

Methods

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
NameDescription
request protos.google.longrunning.CancelOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkCreateWorkstationClusterProgress(name)

checkCreateWorkstationClusterProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationCluster, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by createWorkstationCluster().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationCluster, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID to use for the workstation cluster.
   */
  // const workstationClusterId = 'abc123'
  /**
   *  Required. Workstation cluster to create.
   */
  // const workstationCluster = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callCreateWorkstationCluster() {
    // Construct request
    const request = {
      parent,
      workstationClusterId,
      workstationCluster,
    };

    // Run request
    const [operation] = await workstationsClient.createWorkstationCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateWorkstationCluster();

checkCreateWorkstationConfigProgress(name)

checkCreateWorkstationConfigProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationConfig, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by createWorkstationConfig().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationConfig, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID to use for the config.
   */
  // const workstationConfigId = 'abc123'
  /**
   *  Required. Config to create.
   */
  // const workstationConfig = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callCreateWorkstationConfig() {
    // Construct request
    const request = {
      parent,
      workstationConfigId,
      workstationConfig,
    };

    // Run request
    const [operation] = await workstationsClient.createWorkstationConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateWorkstationConfig();

checkCreateWorkstationProgress(name)

checkCreateWorkstationProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by createWorkstation().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID to use for the workstation.
   */
  // const workstationId = 'abc123'
  /**
   *  Required. Workstation to create.
   */
  // const workstation = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callCreateWorkstation() {
    // Construct request
    const request = {
      parent,
      workstationId,
      workstation,
    };

    // Run request
    const [operation] = await workstationsClient.createWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateWorkstation();

checkDeleteWorkstationClusterProgress(name)

checkDeleteWorkstationClusterProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationCluster, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteWorkstationCluster().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationCluster, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 workstation cluster to delete.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the
   *  workstation cluster on the server does not have this etag.
   */
  // const etag = 'abc123'
  /**
   *  If set, any workstation configurations and workstations in the
   *  workstation cluster are also deleted. Otherwise, the request only
   *  works if the workstation cluster has no configurations or workstations.
   */
  // const force = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callDeleteWorkstationCluster() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.deleteWorkstationCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteWorkstationCluster();

checkDeleteWorkstationConfigProgress(name)

checkDeleteWorkstationConfigProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationConfig, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteWorkstationConfig().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationConfig, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 config to delete.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the config on
   *  the server does not have this etag.
   */
  // const etag = 'abc123'
  /**
   *  If set, any Workstations in the config will also be deleted. Otherwise,
   *  the request will work only if the config has no workstations.
   */
  // const force = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callDeleteWorkstationConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.deleteWorkstationConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteWorkstationConfig();

checkDeleteWorkstationProgress(name)

checkDeleteWorkstationProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteWorkstation().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 workstation to delete.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the
   *  workstation on the server does not have this etag.
   */
  // const etag = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callDeleteWorkstation() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.deleteWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteWorkstation();

checkStartWorkstationProgress(name)

checkStartWorkstationProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by startWorkstation().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 workstation to start.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the
   *  workstation on the server does not have this etag.
   */
  // const etag = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callStartWorkstation() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.startWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callStartWorkstation();

checkStopWorkstationProgress(name)

checkStopWorkstationProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by stopWorkstation().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 workstation to stop.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the
   *  workstation on the server does not have this etag.
   */
  // const etag = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callStopWorkstation() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.stopWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callStopWorkstation();

checkUpdateWorkstationClusterProgress(name)

checkUpdateWorkstationClusterProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationCluster, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateWorkstationCluster().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationCluster, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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. Workstation cluster to update.
   */
  // const workstationCluster = {}
  /**
   *  Required. Mask that specifies which fields in the workstation cluster
   *  should be updated.
   */
  // const updateMask = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, and the workstation cluster is not found, a new workstation
   *  cluster will be created. In this situation, update_mask is ignored.
   */
  // const allowMissing = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callUpdateWorkstationCluster() {
    // Construct request
    const request = {
      workstationCluster,
      updateMask,
    };

    // Run request
    const [operation] = await workstationsClient.updateWorkstationCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateWorkstationCluster();

checkUpdateWorkstationConfigProgress(name)

checkUpdateWorkstationConfigProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationConfig, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateWorkstationConfig().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.WorkstationConfig, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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. Config to update.
   */
  // const workstationConfig = {}
  /**
   *  Required. Mask specifying which fields in the config should be updated.
   */
  // const updateMask = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, and the config is not found, a new config will be created.
   *  In this situation, update_mask is ignored.
   */
  // const allowMissing = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callUpdateWorkstationConfig() {
    // Construct request
    const request = {
      workstationConfig,
      updateMask,
    };

    // Run request
    const [operation] = await workstationsClient.updateWorkstationConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateWorkstationConfig();

checkUpdateWorkstationProgress(name)

checkUpdateWorkstationProgress(name: string): Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateWorkstation().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.workstations.v1.Workstation, protos.google.cloud.workstations.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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. Workstation to update.
   */
  // const workstation = {}
  /**
   *  Required. Mask specifying which fields in the config should be updated.
   */
  // const updateMask = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, and the config is not found, a new config will be created.
   *  In this situation, update_mask is ignored.
   */
  // const allowMissing = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callUpdateWorkstation() {
    // Construct request
    const request = {
      workstation,
      updateMask,
    };

    // Run request
    const [operation] = await workstationsClient.updateWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateWorkstation();

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
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createWorkstation(request, options)

createWorkstation(request?: protos.google.cloud.workstations.v1.ICreateWorkstationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new workstation.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID to use for the workstation.
   */
  // const workstationId = 'abc123'
  /**
   *  Required. Workstation to create.
   */
  // const workstation = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callCreateWorkstation() {
    // Construct request
    const request = {
      parent,
      workstationId,
      workstation,
    };

    // Run request
    const [operation] = await workstationsClient.createWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateWorkstation();

createWorkstation(request, options, callback)

createWorkstation(request: protos.google.cloud.workstations.v1.ICreateWorkstationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createWorkstation(request, callback)

createWorkstation(request: protos.google.cloud.workstations.v1.ICreateWorkstationRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createWorkstationCluster(request, options)

createWorkstationCluster(request?: protos.google.cloud.workstations.v1.ICreateWorkstationClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new workstation cluster.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID to use for the workstation cluster.
   */
  // const workstationClusterId = 'abc123'
  /**
   *  Required. Workstation cluster to create.
   */
  // const workstationCluster = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callCreateWorkstationCluster() {
    // Construct request
    const request = {
      parent,
      workstationClusterId,
      workstationCluster,
    };

    // Run request
    const [operation] = await workstationsClient.createWorkstationCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateWorkstationCluster();

createWorkstationCluster(request, options, callback)

createWorkstationCluster(request: protos.google.cloud.workstations.v1.ICreateWorkstationClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createWorkstationCluster(request, callback)

createWorkstationCluster(request: protos.google.cloud.workstations.v1.ICreateWorkstationClusterRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationClusterRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createWorkstationConfig(request, options)

createWorkstationConfig(request?: protos.google.cloud.workstations.v1.ICreateWorkstationConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new workstation configuration.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID to use for the config.
   */
  // const workstationConfigId = 'abc123'
  /**
   *  Required. Config to create.
   */
  // const workstationConfig = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callCreateWorkstationConfig() {
    // Construct request
    const request = {
      parent,
      workstationConfigId,
      workstationConfig,
    };

    // Run request
    const [operation] = await workstationsClient.createWorkstationConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateWorkstationConfig();

createWorkstationConfig(request, options, callback)

createWorkstationConfig(request: protos.google.cloud.workstations.v1.ICreateWorkstationConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createWorkstationConfig(request, callback)

createWorkstationConfig(request: protos.google.cloud.workstations.v1.ICreateWorkstationConfigRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.ICreateWorkstationConfigRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
request protos.google.longrunning.DeleteOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

deleteWorkstation(request, options)

deleteWorkstation(request?: protos.google.cloud.workstations.v1.IDeleteWorkstationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes the specified workstation.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 workstation to delete.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the
   *  workstation on the server does not have this etag.
   */
  // const etag = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callDeleteWorkstation() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.deleteWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteWorkstation();

deleteWorkstation(request, options, callback)

deleteWorkstation(request: protos.google.cloud.workstations.v1.IDeleteWorkstationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteWorkstation(request, callback)

deleteWorkstation(request: protos.google.cloud.workstations.v1.IDeleteWorkstationRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteWorkstationCluster(request, options)

deleteWorkstationCluster(request?: protos.google.cloud.workstations.v1.IDeleteWorkstationClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes the specified workstation cluster.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 workstation cluster to delete.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the
   *  workstation cluster on the server does not have this etag.
   */
  // const etag = 'abc123'
  /**
   *  If set, any workstation configurations and workstations in the
   *  workstation cluster are also deleted. Otherwise, the request only
   *  works if the workstation cluster has no configurations or workstations.
   */
  // const force = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callDeleteWorkstationCluster() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.deleteWorkstationCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteWorkstationCluster();

deleteWorkstationCluster(request, options, callback)

deleteWorkstationCluster(request: protos.google.cloud.workstations.v1.IDeleteWorkstationClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteWorkstationCluster(request, callback)

deleteWorkstationCluster(request: protos.google.cloud.workstations.v1.IDeleteWorkstationClusterRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationClusterRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteWorkstationConfig(request, options)

deleteWorkstationConfig(request?: protos.google.cloud.workstations.v1.IDeleteWorkstationConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes the specified workstation configuration.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 config to delete.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the config on
   *  the server does not have this etag.
   */
  // const etag = 'abc123'
  /**
   *  If set, any Workstations in the config will also be deleted. Otherwise,
   *  the request will work only if the config has no workstations.
   */
  // const force = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callDeleteWorkstationConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.deleteWorkstationConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteWorkstationConfig();

deleteWorkstationConfig(request, options, callback)

deleteWorkstationConfig(request: protos.google.cloud.workstations.v1.IDeleteWorkstationConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteWorkstationConfig(request, callback)

deleteWorkstationConfig(request: protos.google.cloud.workstations.v1.IDeleteWorkstationConfigRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IDeleteWorkstationConfigRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

generateAccessToken(request, options)

generateAccessToken(request?: protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IGenerateAccessTokenResponse,
        (protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest | undefined),
        {} | undefined
    ]>;

Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IGenerateAccessTokenResponse, (protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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.
   */
  /**
   *  Desired expiration time of the access token. This value must
   *  be at most 24 hours in the future. If a value is not specified, the
   *  token's expiration time will be set to a default value of 1 hour in the
   *  future.
   */
  // const expireTime = {}
  /**
   *  Desired lifetime duration of the access token. This value must
   *  be at most 24 hours. If a value is not specified, the token's lifetime
   *  will be set to a default value of 1 hour.
   */
  // const ttl = {}
  /**
   *  Required. Name of the workstation for which the access token should be
   *  generated.
   */
  // const workstation = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callGenerateAccessToken() {
    // Construct request
    const request = {
      workstation,
    };

    // Run request
    const response = await workstationsClient.generateAccessToken(request);
    console.log(response);
  }

  callGenerateAccessToken();

generateAccessToken(request, options, callback)

generateAccessToken(request: protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest, options: CallOptions, callback: Callback<protos.google.cloud.workstations.v1.IGenerateAccessTokenResponse, protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest
options CallOptions
callback Callback<protos.google.cloud.workstations.v1.IGenerateAccessTokenResponse, protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

generateAccessToken(request, callback)

generateAccessToken(request: protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest, callback: Callback<protos.google.cloud.workstations.v1.IGenerateAccessTokenResponse, protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest
callback Callback<protos.google.cloud.workstations.v1.IGenerateAccessTokenResponse, protos.google.cloud.workstations.v1.IGenerateAccessTokenRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.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<IamProtos.google.iam.v1.Policy, IamProtos.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
TypeDescription
Promise<IamProtos.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.

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
NameDescription
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
Promise<LocationProtos.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

const [response] = await client.getLocation(request);

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
NameDescription
request protos.google.longrunning.GetOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {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
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getWorkstation(request, options)

getWorkstation(request?: protos.google.cloud.workstations.v1.IGetWorkstationRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IWorkstation,
        protos.google.cloud.workstations.v1.IGetWorkstationRequest | undefined,
        {} | undefined
    ]>;

Returns the requested workstation.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IGetWorkstationRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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 requested resource.
   */
  // const name = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callGetWorkstation() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await workstationsClient.getWorkstation(request);
    console.log(response);
  }

  callGetWorkstation();

getWorkstation(request, options, callback)

getWorkstation(request: protos.google.cloud.workstations.v1.IGetWorkstationRequest, options: CallOptions, callback: Callback<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IGetWorkstationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationRequest
options CallOptions
callback Callback<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IGetWorkstationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkstation(request, callback)

getWorkstation(request: protos.google.cloud.workstations.v1.IGetWorkstationRequest, callback: Callback<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IGetWorkstationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationRequest
callback Callback<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IGetWorkstationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkstationCluster(request, options)

getWorkstationCluster(request?: protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IWorkstationCluster,
        (protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest | undefined),
        {} | undefined
    ]>;

Returns the requested workstation cluster.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IWorkstationCluster, (protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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 requested resource.
   */
  // const name = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callGetWorkstationCluster() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await workstationsClient.getWorkstationCluster(request);
    console.log(response);
  }

  callGetWorkstationCluster();

getWorkstationCluster(request, options, callback)

getWorkstationCluster(request: protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest, options: CallOptions, callback: Callback<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest
options CallOptions
callback Callback<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkstationCluster(request, callback)

getWorkstationCluster(request: protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest, callback: Callback<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest
callback Callback<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IGetWorkstationClusterRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkstationConfig(request, options)

getWorkstationConfig(request?: protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IWorkstationConfig,
        (protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest | undefined),
        {} | undefined
    ]>;

Returns the requested workstation configuration.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IWorkstationConfig, (protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * 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 requested resource.
   */
  // const name = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callGetWorkstationConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await workstationsClient.getWorkstationConfig(request);
    console.log(response);
  }

  callGetWorkstationConfig();

getWorkstationConfig(request, options, callback)

getWorkstationConfig(request: protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest
options CallOptions
callback Callback<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getWorkstationConfig(request, callback)

getWorkstationConfig(request: protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest, callback: Callback<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest
callback Callback<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IGetWorkstationConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

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
NameDescription
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<LocationProtos.google.cloud.location.ILocation>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
NameDescription
request protos.google.longrunning.ListOperationsRequest

The request object that will be sent.

options gax.CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listUsableWorkstationConfigs(request, options)

listUsableWorkstationConfigs(request?: protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IWorkstationConfig[],
        protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest | null,
        protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsResponse
    ]>;

Returns all workstation configurations in the specified cluster on which the caller has the "workstations.workstation.create" permission.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IWorkstationConfig[], protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest | null, protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsResponse ]>

{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 listUsableWorkstationConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listUsableWorkstationConfigs(request, options, callback)

listUsableWorkstationConfigs(request: protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationConfig>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationConfig>
Returns
TypeDescription
void

listUsableWorkstationConfigs(request, callback)

listUsableWorkstationConfigs(request: protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationConfig>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest
callback PaginationCallback<protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationConfig>
Returns
TypeDescription
void

listUsableWorkstationConfigsAsync(request, options)

listUsableWorkstationConfigsAsync(request?: protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.workstations.v1.IWorkstationConfig>;

Equivalent to listUsableWorkstationConfigs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.workstations.v1.IWorkstationConfig>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callListUsableWorkstationConfigs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await workstationsClient.listUsableWorkstationConfigsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListUsableWorkstationConfigs();

listUsableWorkstationConfigsStream(request, options)

listUsableWorkstationConfigsStream(request?: protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 listUsableWorkstationConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listUsableWorkstations(request, options)

listUsableWorkstations(request?: protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IWorkstation[],
        protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest | null,
        protos.google.cloud.workstations.v1.IListUsableWorkstationsResponse
    ]>;

Returns all Workstations using the specified config on which the caller has the "workstations.workstations.use" permission.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IWorkstation[], protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest | null, protos.google.cloud.workstations.v1.IListUsableWorkstationsResponse ]>

{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 listUsableWorkstationsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listUsableWorkstations(request, options, callback)

listUsableWorkstations(request: protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, protos.google.cloud.workstations.v1.IListUsableWorkstationsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstation>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, protos.google.cloud.workstations.v1.IListUsableWorkstationsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstation>
Returns
TypeDescription
void

listUsableWorkstations(request, callback)

listUsableWorkstations(request: protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, protos.google.cloud.workstations.v1.IListUsableWorkstationsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstation>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest
callback PaginationCallback<protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, protos.google.cloud.workstations.v1.IListUsableWorkstationsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstation>
Returns
TypeDescription
void

listUsableWorkstationsAsync(request, options)

listUsableWorkstationsAsync(request?: protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.workstations.v1.IWorkstation>;

Equivalent to listUsableWorkstations, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.workstations.v1.IWorkstation>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callListUsableWorkstations() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await workstationsClient.listUsableWorkstationsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListUsableWorkstations();

listUsableWorkstationsStream(request, options)

listUsableWorkstationsStream(request?: protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListUsableWorkstationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 listUsableWorkstationsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listWorkstationClusters(request, options)

listWorkstationClusters(request?: protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IWorkstationCluster[],
        protos.google.cloud.workstations.v1.IListWorkstationClustersRequest | null,
        protos.google.cloud.workstations.v1.IListWorkstationClustersResponse
    ]>;

Returns all workstation clusters in the specified location.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IWorkstationCluster[], protos.google.cloud.workstations.v1.IListWorkstationClustersRequest | null, protos.google.cloud.workstations.v1.IListWorkstationClustersResponse ]>

{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 listWorkstationClustersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listWorkstationClusters(request, options, callback)

listWorkstationClusters(request: protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, protos.google.cloud.workstations.v1.IListWorkstationClustersResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationCluster>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationClustersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, protos.google.cloud.workstations.v1.IListWorkstationClustersResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationCluster>
Returns
TypeDescription
void

listWorkstationClusters(request, callback)

listWorkstationClusters(request: protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, protos.google.cloud.workstations.v1.IListWorkstationClustersResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationCluster>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationClustersRequest
callback PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, protos.google.cloud.workstations.v1.IListWorkstationClustersResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationCluster>
Returns
TypeDescription
void

listWorkstationClustersAsync(request, options)

listWorkstationClustersAsync(request?: protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.workstations.v1.IWorkstationCluster>;

Equivalent to listWorkstationClusters, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.workstations.v1.IWorkstationCluster>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callListWorkstationClusters() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await workstationsClient.listWorkstationClustersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListWorkstationClusters();

listWorkstationClustersStream(request, options)

listWorkstationClustersStream(request?: protos.google.cloud.workstations.v1.IListWorkstationClustersRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationClustersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 listWorkstationClustersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listWorkstationConfigs(request, options)

listWorkstationConfigs(request?: protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IWorkstationConfig[],
        protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest | null,
        protos.google.cloud.workstations.v1.IListWorkstationConfigsResponse
    ]>;

Returns all WorkstationConfigs in the specified cluster.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IWorkstationConfig[], protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest | null, protos.google.cloud.workstations.v1.IListWorkstationConfigsResponse ]>

{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 listWorkstationConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listWorkstationConfigs(request, options, callback)

listWorkstationConfigs(request: protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, protos.google.cloud.workstations.v1.IListWorkstationConfigsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationConfig>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, protos.google.cloud.workstations.v1.IListWorkstationConfigsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationConfig>
Returns
TypeDescription
void

listWorkstationConfigs(request, callback)

listWorkstationConfigs(request: protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, protos.google.cloud.workstations.v1.IListWorkstationConfigsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationConfig>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest
callback PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, protos.google.cloud.workstations.v1.IListWorkstationConfigsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstationConfig>
Returns
TypeDescription
void

listWorkstationConfigsAsync(request, options)

listWorkstationConfigsAsync(request?: protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.workstations.v1.IWorkstationConfig>;

Equivalent to listWorkstationConfigs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.workstations.v1.IWorkstationConfig>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callListWorkstationConfigs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await workstationsClient.listWorkstationConfigsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListWorkstationConfigs();

listWorkstationConfigsStream(request, options)

listWorkstationConfigsStream(request?: protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 listWorkstationConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listWorkstations(request, options)

listWorkstations(request?: protos.google.cloud.workstations.v1.IListWorkstationsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.workstations.v1.IWorkstation[],
        protos.google.cloud.workstations.v1.IListWorkstationsRequest | null,
        protos.google.cloud.workstations.v1.IListWorkstationsResponse
    ]>;

Returns all Workstations using the specified config.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.workstations.v1.IWorkstation[], protos.google.cloud.workstations.v1.IListWorkstationsRequest | null, protos.google.cloud.workstations.v1.IListWorkstationsResponse ]>

{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 listWorkstationsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listWorkstations(request, options, callback)

listWorkstations(request: protos.google.cloud.workstations.v1.IListWorkstationsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationsRequest, protos.google.cloud.workstations.v1.IListWorkstationsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstation>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationsRequest, protos.google.cloud.workstations.v1.IListWorkstationsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstation>
Returns
TypeDescription
void

listWorkstations(request, callback)

listWorkstations(request: protos.google.cloud.workstations.v1.IListWorkstationsRequest, callback: PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationsRequest, protos.google.cloud.workstations.v1.IListWorkstationsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstation>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationsRequest
callback PaginationCallback<protos.google.cloud.workstations.v1.IListWorkstationsRequest, protos.google.cloud.workstations.v1.IListWorkstationsResponse | null | undefined, protos.google.cloud.workstations.v1.IWorkstation>
Returns
TypeDescription
void

listWorkstationsAsync(request, options)

listWorkstationsAsync(request?: protos.google.cloud.workstations.v1.IListWorkstationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.workstations.v1.IWorkstation>;

Equivalent to listWorkstations, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.workstations.v1.IWorkstation>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * 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 resource name.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callListWorkstations() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await workstationsClient.listWorkstationsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListWorkstations();

listWorkstationsStream(request, options)

listWorkstationsStream(request?: protos.google.cloud.workstations.v1.IListWorkstationsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IListWorkstationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 listWorkstationsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromWorkstationClusterName(workstationClusterName)

matchLocationFromWorkstationClusterName(workstationClusterName: string): string | number;

Parse the location from WorkstationCluster resource.

Parameter
NameDescription
workstationClusterName string

A fully-qualified path representing WorkstationCluster resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromWorkstationConfigName(workstationConfigName)

matchLocationFromWorkstationConfigName(workstationConfigName: string): string | number;

Parse the location from WorkstationConfig resource.

Parameter
NameDescription
workstationConfigName string

A fully-qualified path representing WorkstationConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromWorkstationName(workstationName)

matchLocationFromWorkstationName(workstationName: string): string | number;

Parse the location from Workstation resource.

Parameter
NameDescription
workstationName string

A fully-qualified path representing Workstation resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromWorkstationClusterName(workstationClusterName)

matchProjectFromWorkstationClusterName(workstationClusterName: string): string | number;

Parse the project from WorkstationCluster resource.

Parameter
NameDescription
workstationClusterName string

A fully-qualified path representing WorkstationCluster resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromWorkstationConfigName(workstationConfigName)

matchProjectFromWorkstationConfigName(workstationConfigName: string): string | number;

Parse the project from WorkstationConfig resource.

Parameter
NameDescription
workstationConfigName string

A fully-qualified path representing WorkstationConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromWorkstationName(workstationName)

matchProjectFromWorkstationName(workstationName: string): string | number;

Parse the project from Workstation resource.

Parameter
NameDescription
workstationName string

A fully-qualified path representing Workstation resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchWorkstationClusterFromWorkstationClusterName(workstationClusterName)

matchWorkstationClusterFromWorkstationClusterName(workstationClusterName: string): string | number;

Parse the workstation_cluster from WorkstationCluster resource.

Parameter
NameDescription
workstationClusterName string

A fully-qualified path representing WorkstationCluster resource.

Returns
TypeDescription
string | number

{string} A string representing the workstation_cluster.

matchWorkstationClusterFromWorkstationConfigName(workstationConfigName)

matchWorkstationClusterFromWorkstationConfigName(workstationConfigName: string): string | number;

Parse the workstation_cluster from WorkstationConfig resource.

Parameter
NameDescription
workstationConfigName string

A fully-qualified path representing WorkstationConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the workstation_cluster.

matchWorkstationClusterFromWorkstationName(workstationName)

matchWorkstationClusterFromWorkstationName(workstationName: string): string | number;

Parse the workstation_cluster from Workstation resource.

Parameter
NameDescription
workstationName string

A fully-qualified path representing Workstation resource.

Returns
TypeDescription
string | number

{string} A string representing the workstation_cluster.

matchWorkstationConfigFromWorkstationConfigName(workstationConfigName)

matchWorkstationConfigFromWorkstationConfigName(workstationConfigName: string): string | number;

Parse the workstation_config from WorkstationConfig resource.

Parameter
NameDescription
workstationConfigName string

A fully-qualified path representing WorkstationConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the workstation_config.

matchWorkstationConfigFromWorkstationName(workstationName)

matchWorkstationConfigFromWorkstationName(workstationName: string): string | number;

Parse the workstation_config from Workstation resource.

Parameter
NameDescription
workstationName string

A fully-qualified path representing Workstation resource.

Returns
TypeDescription
string | number

{string} A string representing the workstation_config.

matchWorkstationFromWorkstationName(workstationName)

matchWorkstationFromWorkstationName(workstationName: string): string | number;

Parse the workstation from Workstation resource.

Parameter
NameDescription
workstationName string

A fully-qualified path representing Workstation resource.

Returns
TypeDescription
string | number

{string} A string representing the workstation.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

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
NameDescription
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.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<IamProtos.google.iam.v1.Policy, IamProtos.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
TypeDescription
Promise<IamProtos.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.

startWorkstation(request, options)

startWorkstation(request?: protos.google.cloud.workstations.v1.IStartWorkstationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Starts running a workstation so that users can connect to it.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IStartWorkstationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 workstation to start.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the
   *  workstation on the server does not have this etag.
   */
  // const etag = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callStartWorkstation() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.startWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callStartWorkstation();

startWorkstation(request, options, callback)

startWorkstation(request: protos.google.cloud.workstations.v1.IStartWorkstationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IStartWorkstationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startWorkstation(request, callback)

startWorkstation(request: protos.google.cloud.workstations.v1.IStartWorkstationRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IStartWorkstationRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopWorkstation(request, options)

stopWorkstation(request?: protos.google.cloud.workstations.v1.IStopWorkstationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Stops running a workstation, reducing costs.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IStopWorkstationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 workstation to stop.
   */
  // const name = 'abc123'
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, the request will be rejected if the latest version of the
   *  workstation on the server does not have this etag.
   */
  // const etag = 'abc123'

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callStopWorkstation() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await workstationsClient.stopWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callStopWorkstation();

stopWorkstation(request, options, callback)

stopWorkstation(request: protos.google.cloud.workstations.v1.IStopWorkstationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IStopWorkstationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopWorkstation(request, callback)

stopWorkstation(request: protos.google.cloud.workstations.v1.IStopWorkstationRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IStopWorkstationRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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
NameDescription
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.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<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.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
TypeDescription
Promise<IamProtos.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.

updateWorkstation(request, options)

updateWorkstation(request?: protos.google.cloud.workstations.v1.IUpdateWorkstationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates an existing workstation.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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. Workstation to update.
   */
  // const workstation = {}
  /**
   *  Required. Mask specifying which fields in the config should be updated.
   */
  // const updateMask = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, and the config is not found, a new config will be created.
   *  In this situation, update_mask is ignored.
   */
  // const allowMissing = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callUpdateWorkstation() {
    // Construct request
    const request = {
      workstation,
      updateMask,
    };

    // Run request
    const [operation] = await workstationsClient.updateWorkstation(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateWorkstation();

updateWorkstation(request, options, callback)

updateWorkstation(request: protos.google.cloud.workstations.v1.IUpdateWorkstationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateWorkstation(request, callback)

updateWorkstation(request: protos.google.cloud.workstations.v1.IUpdateWorkstationRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstation, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateWorkstationCluster(request, options)

updateWorkstationCluster(request?: protos.google.cloud.workstations.v1.IUpdateWorkstationClusterRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates an existing workstation cluster.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationClusterRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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. Workstation cluster to update.
   */
  // const workstationCluster = {}
  /**
   *  Required. Mask that specifies which fields in the workstation cluster
   *  should be updated.
   */
  // const updateMask = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, and the workstation cluster is not found, a new workstation
   *  cluster will be created. In this situation, update_mask is ignored.
   */
  // const allowMissing = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callUpdateWorkstationCluster() {
    // Construct request
    const request = {
      workstationCluster,
      updateMask,
    };

    // Run request
    const [operation] = await workstationsClient.updateWorkstationCluster(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateWorkstationCluster();

updateWorkstationCluster(request, options, callback)

updateWorkstationCluster(request: protos.google.cloud.workstations.v1.IUpdateWorkstationClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationClusterRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateWorkstationCluster(request, callback)

updateWorkstationCluster(request: protos.google.cloud.workstations.v1.IUpdateWorkstationClusterRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationClusterRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationCluster, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateWorkstationConfig(request, options)

updateWorkstationConfig(request?: protos.google.cloud.workstations.v1.IUpdateWorkstationConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates an existing workstation configuration.

Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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. Config to update.
   */
  // const workstationConfig = {}
  /**
   *  Required. Mask specifying which fields in the config should be updated.
   */
  // const updateMask = {}
  /**
   *  If set, validate the request and preview the review, but do not actually
   *  apply it.
   */
  // const validateOnly = true
  /**
   *  If set, and the config is not found, a new config will be created.
   *  In this situation, update_mask is ignored.
   */
  // const allowMissing = true

  // Imports the Workstations library
  const {WorkstationsClient} = require('@google-cloud/workstations').v1;

  // Instantiates a client
  const workstationsClient = new WorkstationsClient();

  async function callUpdateWorkstationConfig() {
    // Construct request
    const request = {
      workstationConfig,
      updateMask,
    };

    // Run request
    const [operation] = await workstationsClient.updateWorkstationConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateWorkstationConfig();

updateWorkstationConfig(request, options, callback)

updateWorkstationConfig(request: protos.google.cloud.workstations.v1.IUpdateWorkstationConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateWorkstationConfig(request, callback)

updateWorkstationConfig(request: protos.google.cloud.workstations.v1.IUpdateWorkstationConfigRequest, callback: Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.workstations.v1.IUpdateWorkstationConfigRequest
callback Callback<LROperation<protos.google.cloud.workstations.v1.IWorkstationConfig, protos.google.cloud.workstations.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

workstationClusterPath(project, location, workstationCluster)

workstationClusterPath(project: string, location: string, workstationCluster: string): string;

Return a fully-qualified workstationCluster resource name string.

Parameters
NameDescription
project string
location string
workstationCluster string
Returns
TypeDescription
string

{string} Resource name string.

workstationConfigPath(project, location, workstationCluster, workstationConfig)

workstationConfigPath(project: string, location: string, workstationCluster: string, workstationConfig: string): string;

Return a fully-qualified workstationConfig resource name string.

Parameters
NameDescription
project string
location string
workstationCluster string
workstationConfig string
Returns
TypeDescription
string

{string} Resource name string.

workstationPath(project, location, workstationCluster, workstationConfig, workstation)

workstationPath(project: string, location: string, workstationCluster: string, workstationConfig: string, workstation: string): string;

Return a fully-qualified workstation resource name string.

Parameters
NameDescription
project string
location string
workstationCluster string
workstationConfig string
workstation string
Returns
TypeDescription
string

{string} Resource name string.