Class v1.GSuiteAddOnsClient (2.1.0)

A service for managing Google Workspace add-ons deployments.

A Google Workspace add-on is a third-party embedded component that can be installed in Google Workspace Applications like Gmail, Calendar, Drive, and the Google Docs, Sheets, and Slides editors. Google Workspace add-ons can display UI cards, receive contextual information from the host application, and perform actions in the host application (See: https://developers.google.com/gsuite/add-ons/overview for more information).

A Google Workspace add-on deployment resource specifies metadata about the add-on, including a specification of the entry points in the host application that trigger add-on executions (see: https://developers.google.com/gsuite/add-ons/concepts/gsuite-manifests). Add-on deployments defined via the Google Workspace add-ons API define their entrypoints using HTTPS URLs (See: https://developers.google.com/gsuite/add-ons/guides/alternate-runtimes),

A Google Workspace add-on deployment can be installed in developer mode, which allows an add-on developer to test the experience an end-user would see when installing and running the add-on in their G Suite applications. When running in developer mode, more detailed error messages are exposed in the add-on UI to aid in debugging.

A Google Workspace add-on deployment can be published to Google Workspace Marketplace, which allows other Google Workspace users to discover and install the add-on. See: https://developers.google.com/gsuite/add-ons/how-tos/publish-add-on-overview for details. v1

Package

@google-cloud/gsuiteaddons

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of GSuiteAddOnsClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof 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 GSuiteAddOnsClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

gSuiteAddOnsStub

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

innerApiCalls

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

pathTemplates

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

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

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

Methods

authorizationPath(project)

authorizationPath(project: string): string;

Return a fully-qualified authorization resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

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

createDeployment(request, options)

createDeployment(request?: protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gsuiteaddons.v1.IDeployment,
        protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest | undefined,
        {} | undefined
    ]>;

Creates a deployment with the specified name and configuration.

Parameters
Name Description
request ICreateDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Deployment. Please see the documentation 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 project in which to create the deployment.
   *  Example: `projects/my_project`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The id to use for this deployment.  The full name of the created
   *  resource will be `projects/

createDeployment(request, options, callback)

createDeployment(request: protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createDeployment(request, callback)

createDeployment(request: protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateDeploymentRequest
callback Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.ICreateDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteDeployment(request, options)

deleteDeployment(request?: protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest | undefined,
        {} | undefined
    ]>;

Deletes the deployment with the given name.

Parameters
Name Description
request IDeleteDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation 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. The full resource name of the deployment to delete.
   *  Example:  `projects/my_project/deployments/my_deployment`.
   */
  // const name = 'abc123'
  /**
   *  The etag of the deployment to delete.
   *  If this is provided, it must match the server's etag.
   */
  // const etag = 'abc123'

  // Imports the Gsuiteaddons library
  const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1;

  // Instantiates a client
  const gsuiteaddonsClient = new GSuiteAddOnsClient();

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

    // Run request
    const response = await gsuiteaddonsClient.deleteDeployment(request);
    console.log(response);
  }

  callDeleteDeployment();

deleteDeployment(request, options, callback)

deleteDeployment(request: protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDeploymentRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteDeployment(request, callback)

deleteDeployment(request: protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteDeploymentRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IDeleteDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deploymentPath(project, deployment)

deploymentPath(project: string, deployment: string): string;

Return a fully-qualified deployment resource name string.

Parameters
Name Description
project string
deployment string
Returns
Type Description
string

{string} Resource name string.

getAuthorization(request, options)

getAuthorization(request?: protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gsuiteaddons.v1.IAuthorization,
        protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest | undefined,
        {} | undefined
    ]>;

Gets the authorization information for deployments in a given project.

Parameters
Name Description
request IGetAuthorizationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gsuiteaddons.v1.IAuthorization, protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Authorization. Please see the documentation 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 project for which to get the Google Workspace add-ons
   *  authorization information.
   *  Example: `projects/my_project/authorization`.
   */
  // const name = 'abc123'

  // Imports the Gsuiteaddons library
  const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1;

  // Instantiates a client
  const gsuiteaddonsClient = new GSuiteAddOnsClient();

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

    // Run request
    const response = await gsuiteaddonsClient.getAuthorization(request);
    console.log(response);
  }

  callGetAuthorization();

getAuthorization(request, options, callback)

getAuthorization(request: protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest, options: CallOptions, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IAuthorization, protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAuthorizationRequest
options CallOptions
callback Callback<protos.google.cloud.gsuiteaddons.v1.IAuthorization, protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getAuthorization(request, callback)

getAuthorization(request: protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IAuthorization, protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAuthorizationRequest
callback Callback<protos.google.cloud.gsuiteaddons.v1.IAuthorization, protos.google.cloud.gsuiteaddons.v1.IGetAuthorizationRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDeployment(request, options)

getDeployment(request?: protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gsuiteaddons.v1.IDeployment,
        protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest | undefined,
        {} | undefined
    ]>;

Gets the deployment with the specified name.

Parameters
Name Description
request IGetDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Deployment. Please see the documentation 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. The full resource name of the deployment to get.
   *  Example:  `projects/my_project/deployments/my_deployment`.
   */
  // const name = 'abc123'

  // Imports the Gsuiteaddons library
  const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1;

  // Instantiates a client
  const gsuiteaddonsClient = new GSuiteAddOnsClient();

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

    // Run request
    const response = await gsuiteaddonsClient.getDeployment(request);
    console.log(response);
  }

  callGetDeployment();

getDeployment(request, options, callback)

getDeployment(request: protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getDeployment(request, callback)

getDeployment(request: protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetDeploymentRequest
callback Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getInstallStatus(request, options)

getInstallStatus(request?: protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gsuiteaddons.v1.IInstallStatus,
        protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest | undefined,
        {} | undefined
    ]>;

Fetches the install status of a developer mode deployment.

Parameters
Name Description
request IGetInstallStatusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gsuiteaddons.v1.IInstallStatus, protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing InstallStatus. Please see the documentation 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. The full resource name of the deployment.
   *  Example:  `projects/my_project/deployments/my_deployment/installStatus`.
   */
  // const name = 'abc123'

  // Imports the Gsuiteaddons library
  const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1;

  // Instantiates a client
  const gsuiteaddonsClient = new GSuiteAddOnsClient();

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

    // Run request
    const response = await gsuiteaddonsClient.getInstallStatus(request);
    console.log(response);
  }

  callGetInstallStatus();

getInstallStatus(request, options, callback)

getInstallStatus(request: protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest, options: CallOptions, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IInstallStatus, protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetInstallStatusRequest
options CallOptions
callback Callback<protos.google.cloud.gsuiteaddons.v1.IInstallStatus, protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getInstallStatus(request, callback)

getInstallStatus(request: protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IInstallStatus, protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetInstallStatusRequest
callback Callback<protos.google.cloud.gsuiteaddons.v1.IInstallStatus, protos.google.cloud.gsuiteaddons.v1.IGetInstallStatusRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

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

installDeployment(request, options)

installDeployment(request?: protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest | undefined,
        {} | undefined
    ]>;
Parameters
Name Description
request IInstallDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation 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. The full resource name of the deployment to install.
   *  Example:  `projects/my_project/deployments/my_deployment`.
   */
  // const name = 'abc123'

  // Imports the Gsuiteaddons library
  const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1;

  // Instantiates a client
  const gsuiteaddonsClient = new GSuiteAddOnsClient();

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

    // Run request
    const response = await gsuiteaddonsClient.installDeployment(request);
    console.log(response);
  }

  callInstallDeployment();

installDeployment(request, options, callback)

installDeployment(request: protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IInstallDeploymentRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

installDeployment(request, callback)

installDeployment(request: protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IInstallDeploymentRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IInstallDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

installStatusPath(project, deployment)

installStatusPath(project: string, deployment: string): string;

Return a fully-qualified installStatus resource name string.

Parameters
Name Description
project string
deployment string
Returns
Type Description
string

{string} Resource name string.

listDeployments(request, options)

listDeployments(request?: protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gsuiteaddons.v1.IDeployment[],
        protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest | null,
        protos.google.cloud.gsuiteaddons.v1.IListDeploymentsResponse
    ]>;

Lists all deployments in a particular project.

Parameters
Name Description
request IListDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gsuiteaddons.v1.IDeployment[], protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest | null, protos.google.cloud.gsuiteaddons.v1.IListDeploymentsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Deployment. 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 listDeploymentsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listDeployments(request, options, callback)

listDeployments(request: protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, protos.google.cloud.gsuiteaddons.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.gsuiteaddons.v1.IDeployment>): void;
Parameters
Name Description
request IListDeploymentsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, protos.google.cloud.gsuiteaddons.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.gsuiteaddons.v1.IDeployment>
Returns
Type Description
void

listDeployments(request, callback)

listDeployments(request: protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, callback: PaginationCallback<protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, protos.google.cloud.gsuiteaddons.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.gsuiteaddons.v1.IDeployment>): void;
Parameters
Name Description
request IListDeploymentsRequest
callback PaginationCallback<protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, protos.google.cloud.gsuiteaddons.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.gsuiteaddons.v1.IDeployment>
Returns
Type Description
void

listDeploymentsAsync(request, options)

listDeploymentsAsync(request?: protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gsuiteaddons.v1.IDeployment>;

Equivalent to listDeployments, but returns an iterable object.

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

Parameters
Name Description
request IListDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.gsuiteaddons.v1.IDeployment>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Deployment. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

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 project in which to create the deployment.
   *  Example: `projects/my_project`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of deployments to return. The service may return fewer
   *  than this value.
   *  If unspecified, at most 1000 deployments will be returned.
   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
   */
  // const pageSize = 1234
  /**
   *  A page token, received from a previous `ListDeployments` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListDeployments` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'

  // Imports the Gsuiteaddons library
  const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1;

  // Instantiates a client
  const gsuiteaddonsClient = new GSuiteAddOnsClient();

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

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

  callListDeployments();

listDeploymentsStream(request, options)

listDeploymentsStream(request?: protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest, options?: CallOptions): Transform;

Equivalent to listDeployments, but returns a NodeJS Stream object.

Parameters
Name Description
request IListDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Deployment 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 listDeploymentsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchDeploymentFromDeploymentName(deploymentName)

matchDeploymentFromDeploymentName(deploymentName: string): string | number;

Parse the deployment from Deployment resource.

Parameter
Name Description
deploymentName string

A fully-qualified path representing Deployment resource.

Returns
Type Description
string | number

{string} A string representing the deployment.

matchDeploymentFromInstallStatusName(installStatusName)

matchDeploymentFromInstallStatusName(installStatusName: string): string | number;

Parse the deployment from InstallStatus resource.

Parameter
Name Description
installStatusName string

A fully-qualified path representing InstallStatus resource.

Returns
Type Description
string | number

{string} A string representing the deployment.

matchProjectFromAuthorizationName(authorizationName)

matchProjectFromAuthorizationName(authorizationName: string): string | number;

Parse the project from Authorization resource.

Parameter
Name Description
authorizationName string

A fully-qualified path representing Authorization resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromDeploymentName(deploymentName)

matchProjectFromDeploymentName(deploymentName: string): string | number;

Parse the project from Deployment resource.

Parameter
Name Description
deploymentName string

A fully-qualified path representing Deployment resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromInstallStatusName(installStatusName)

matchProjectFromInstallStatusName(installStatusName: string): string | number;

Parse the project from InstallStatus resource.

Parameter
Name Description
installStatusName string

A fully-qualified path representing InstallStatus resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

replaceDeployment(request, options)

replaceDeployment(request?: protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.gsuiteaddons.v1.IDeployment,
        protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest | undefined,
        {} | undefined
    ]>;

Creates or replaces a deployment with the specified name.

Parameters
Name Description
request IReplaceDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Deployment. Please see the documentation 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. The deployment to create or replace.
   */
  // const deployment = {}

  // Imports the Gsuiteaddons library
  const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1;

  // Instantiates a client
  const gsuiteaddonsClient = new GSuiteAddOnsClient();

  async function callReplaceDeployment() {
    // Construct request
    const request = {
      deployment,
    };

    // Run request
    const response = await gsuiteaddonsClient.replaceDeployment(request);
    console.log(response);
  }

  callReplaceDeployment();

replaceDeployment(request, options, callback)

replaceDeployment(request: protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IReplaceDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

replaceDeployment(request, callback)

replaceDeployment(request: protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest, callback: Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IReplaceDeploymentRequest
callback Callback<protos.google.cloud.gsuiteaddons.v1.IDeployment, protos.google.cloud.gsuiteaddons.v1.IReplaceDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

uninstallDeployment(request, options)

uninstallDeployment(request?: protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest | undefined,
        {} | undefined
    ]>;
Parameters
Name Description
request IUninstallDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation 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. The full resource name of the deployment to install.
   *  Example:  `projects/my_project/deployments/my_deployment`.
   */
  // const name = 'abc123'

  // Imports the Gsuiteaddons library
  const {GSuiteAddOnsClient} = require('@google-cloud/gsuiteaddons').v1;

  // Instantiates a client
  const gsuiteaddonsClient = new GSuiteAddOnsClient();

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

    // Run request
    const response = await gsuiteaddonsClient.uninstallDeployment(request);
    console.log(response);
  }

  callUninstallDeployment();

uninstallDeployment(request, options, callback)

uninstallDeployment(request: protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUninstallDeploymentRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

uninstallDeployment(request, callback)

uninstallDeployment(request: protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUninstallDeploymentRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.gsuiteaddons.v1.IUninstallDeploymentRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void