Class v1beta1.EnvironmentsClient (2.1.2)

Managed Apache Airflow Environments. v1beta1

Package

@google-cloud/orchestration-airflow

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of EnvironmentsClient.

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 EnvironmentsClient({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;

environmentsStub

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

innerApiCalls

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

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

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

Methods

checkCheckUpgradeProgress(name)

checkCheckUpgradeProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse, protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The resource name of the environment to check upgrade for, in the
   *  form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'
  /**
   *  The version of the software running in the environment.
   *  This encapsulates both the version of Cloud Composer functionality and the
   *  version of Apache Airflow. It must match the regular expression
   *  `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
   *  When used as input, the server also checks if the provided version is
   *  supported and denies the request for an unsupported version.
   *  The Cloud Composer portion of the version is a
   *  semantic version (https://semver.org) or `latest`. When the patch version
   *  is omitted, the current Cloud Composer patch version is selected.
   *  When `latest` is provided instead of an explicit version number,
   *  the server replaces `latest` with the current Cloud Composer version
   *  and stores that version number in the same field.
   *  The portion of the image version that follows `airflow-` is an
   *  official Apache Airflow repository
   *  release name (https://github.com/apache/incubator-airflow/releases).
   *  See also Version List 
   *  (/composer/docs/concepts/versioning/composer-versions).
   */
  // const imageVersion = 'abc123'

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callCheckUpgrade() {
    // Construct request
    const request = {
    };

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

  callCheckUpgrade();

checkCreateEnvironmentProgress(name)

checkCreateEnvironmentProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The parent must be of the form
   *  "projects/{projectId}/locations/{locationId}".
   */
  // const parent = 'abc123'
  /**
   *  The environment to create.
   */
  // const environment = {}

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callCreateEnvironment() {
    // Construct request
    const request = {
    };

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

  callCreateEnvironment();

checkDeleteEnvironmentProgress(name)

checkDeleteEnvironmentProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The environment to delete, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const name = 'abc123'

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callDeleteEnvironment() {
    // Construct request
    const request = {
    };

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

  callDeleteEnvironment();

checkRestartWebServerProgress(name)

checkRestartWebServerProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The resource name of the environment to restart the web server for, in the
   *  form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const name = 'abc123'

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callRestartWebServer() {
    // Construct request
    const request = {
    };

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

  callRestartWebServer();

checkUpdateEnvironmentProgress(name)

checkUpdateEnvironmentProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, protos.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.Environment, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The relative resource name of the environment to update, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const name = 'abc123'
  /**
   *  A patch environment. Fields specified by the `updateMask` will be copied
   *  from the patch environment into the environment under update.
   */
  // const environment = {}
  /**
   *  Required. A comma-separated list of paths, relative to `Environment`, of
   *  fields to update.
   *  For example, to set the version of scikit-learn to install in the
   *  environment to 0.19.0 and to remove an existing installation of
   *  argparse, the `updateMask` parameter would include the following two
   *  `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
   *  "config.softwareConfig.pypiPackages.argparse". The included patch
   *  environment would specify the scikit-learn version as follows:
   *      {
   *        "config":{
   *          "softwareConfig":{
   *            "pypiPackages":{
   *              "scikit-learn":"==0.19.0"
   *            }
   *          }
   *        }
   *      }
   *  Note that in the above example, any existing PyPI packages
   *  other than scikit-learn and argparse will be unaffected.
   *  Only one update type may be included in a single request's `updateMask`.
   *  For example, one cannot update both the PyPI packages and
   *  labels in the same request. However, it is possible to update multiple
   *  members of a map field simultaneously in the same request. For example,
   *  to set the labels "label1" and "label2" while clearing "label3" (assuming
   *  it already exists), one can
   *  provide the paths "labels.label1", "labels.label2", and "labels.label3"
   *  and populate the patch environment as follows:
   *      {
   *        "labels":{
   *          "label1":"new-label1-value"
   *          "label2":"new-label2-value"
   *        }
   *      }
   *  Note that in the above example, any existing labels that are not
   *  included in the `updateMask` will be unaffected.
   *  It is also possible to replace an entire map field by providing the
   *  map field's path in the `updateMask`. The new value of the field will
   *  be that which is provided in the patch environment. For example, to
   *  delete all pre-existing user-specified PyPI packages and
   *  install botocore at version 1.7.14, the `updateMask` would contain
   *  the path "config.softwareConfig.pypiPackages", and
   *  the patch environment would be the following:
   *      {
   *        "config":{
   *          "softwareConfig":{
   *            "pypiPackages":{
   *              "botocore":"==1.7.14"
   *            }
   *          }
   *        }
   *      }
   *  **Note:** Only the following fields can be updated:
   *  * `config.softwareConfig.pypiPackages`
   *      * Replace all custom custom PyPI packages. If a replacement
   *        package map is not included in `environment`, all custom
   *        PyPI packages are cleared. It is an error to provide both
   *        this mask and a mask specifying an individual package.
   *  * `config.softwareConfig.pypiPackages.`packagename
   *      * Update the custom PyPI package *packagename*,
   *        preserving other packages. To delete the package, include it in
   *        `updateMask`, and omit the mapping for it in
   *        `environment.config.softwareConfig.pypiPackages`. It is an error
   *        to provide both a mask of this form and the
   *        `config.softwareConfig.pypiPackages` mask.
   *  * `labels`
   *      * Replace all environment labels. If a replacement labels map is not
   *        included in `environment`, all labels are cleared. It is an error to
   *        provide both this mask and a mask specifying one or more individual
   *        labels.
   *  * `labels.`labelName
   *      * Set the label named *labelName*, while preserving other
   *        labels. To delete the label, include it in `updateMask` and omit its
   *        mapping in `environment.labels`. It is an error to provide both a
   *        mask of this form and the `labels` mask.
   *  * `config.nodeCount`
   *      * Horizontally scale the number of nodes in the environment. An integer
   *        greater than or equal to 3 must be provided in the `config.nodeCount`
   *        field. * `config.webServerNetworkAccessControl`
   *      * Replace the environment's current WebServerNetworkAccessControl.
   *  * `config.softwareConfig.airflowConfigOverrides`
   *      * Replace all Apache Airflow config overrides. If a replacement config
   *        overrides map is not included in `environment`, all config overrides
   *        are cleared.
   *        It is an error to provide both this mask and a mask specifying one or
   *        more individual config overrides.
   *  * `config.softwareConfig.airflowConfigOverrides.`section-name
   *      * Override the Apache Airflow config property *name* in the
   *        section named *section*, preserving other properties. To
   *        delete the property override, include it in `updateMask` and omit its
   *        mapping in
   *        `environment.config.softwareConfig.airflowConfigOverrides`.
   *        It is an error to provide both a mask of this form and the
   *        `config.softwareConfig.airflowConfigOverrides` mask.
   *  * `config.softwareConfig.envVariables`
   *      * Replace all environment variables. If a replacement environment
   *        variable map is not included in `environment`, all custom environment
   *        variables  are cleared.
   *        It is an error to provide both this mask and a mask specifying one or
   *        more individual environment variables.
   *  * `config.softwareConfig.imageVersion`
   *      * Upgrade the version of the environment in-place. Refer to
   *        `SoftwareConfig.image_version` for information on how to format the
   *        new image version. Additionally, the new image version cannot effect
   *        a version downgrade and must match the current image version's
   *        Composer major version and Airflow major and minor versions. Consult
   *        the Cloud Composer Version
   *        List (https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
   *        for valid values.
   *  * `config.softwareConfig.schedulerCount`
   *      * Horizontally scale the number of schedulers in Airflow. A positive
   *        integer not greater than the number of nodes must be provided in the
   *        `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
   *      * Cloud SQL machine type used by Airflow database.
   *        It has to be one of: db-n1-standard-2, db-n1-standard-4,
   *        db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
   *      * Machine type on which Airflow web server is running.
   *        It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
   *        or composer-n1-webserver-8. * `config.maintenanceWindow`
   *      * Maintenance window during which Cloud Composer components may be
   *        under maintenance.
   */
  // const updateMask = {}

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

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

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

  callUpdateEnvironment();

checkUpgrade(request, options)

checkUpgrade(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Check if an upgrade operation on the environment will succeed.

In case of problems detailed info can be found in the returned Operation.

Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The resource name of the environment to check upgrade for, in the
   *  form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'
  /**
   *  The version of the software running in the environment.
   *  This encapsulates both the version of Cloud Composer functionality and the
   *  version of Apache Airflow. It must match the regular expression
   *  `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
   *  When used as input, the server also checks if the provided version is
   *  supported and denies the request for an unsupported version.
   *  The Cloud Composer portion of the version is a
   *  semantic version (https://semver.org) or `latest`. When the patch version
   *  is omitted, the current Cloud Composer patch version is selected.
   *  When `latest` is provided instead of an explicit version number,
   *  the server replaces `latest` with the current Cloud Composer version
   *  and stores that version number in the same field.
   *  The portion of the image version that follows `airflow-` is an
   *  official Apache Airflow repository
   *  release name (https://github.com/apache/incubator-airflow/releases).
   *  See also Version List 
   *  (/composer/docs/concepts/versioning/composer-versions).
   */
  // const imageVersion = 'abc123'

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callCheckUpgrade() {
    // Construct request
    const request = {
    };

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

  callCheckUpgrade();

checkUpgrade(request, options, callback)

checkUpgrade(request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkUpgrade(request, callback)

checkUpgrade(request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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.

createEnvironment(request, options)

createEnvironment(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create a new environment.

Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The parent must be of the form
   *  "projects/{projectId}/locations/{locationId}".
   */
  // const parent = 'abc123'
  /**
   *  The environment to create.
   */
  // const environment = {}

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callCreateEnvironment() {
    // Construct request
    const request = {
    };

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

  callCreateEnvironment();

createEnvironment(request, options, callback)

createEnvironment(request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEnvironment(request, callback)

createEnvironment(request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteEnvironment(request, options)

deleteEnvironment(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Delete an environment.

Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The environment to delete, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const name = 'abc123'

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callDeleteEnvironment() {
    // Construct request
    const request = {
    };

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

  callDeleteEnvironment();

deleteEnvironment(request, options, callback)

deleteEnvironment(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteEnvironment(request, callback)

deleteEnvironment(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

environmentPath(project, location, environment)

environmentPath(project: string, location: string, environment: string): string;

Return a fully-qualified environment resource name string.

Parameters
NameDescription
project string
location string
environment string
Returns
TypeDescription
string

{string} Resource name string.

getEnvironment(request, options)

getEnvironment(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment,
        (protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest | undefined),
        {} | undefined
    ]>;

Get an existing environment.

Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, (protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Environment]. 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.
   */
  /**
   *  The resource name of the environment to get, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const name = 'abc123'

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callGetEnvironment() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await serviceClient.getEnvironment(request);
    console.log(response);
  }

  callGetEnvironment();

getEnvironment(request, options, callback)

getEnvironment(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEnvironment(request, callback)

getEnvironment(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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

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.

listEnvironments(request, options)

listEnvironments(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[],
        protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest | null,
        protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse
    ]>;

List environments.

Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[], protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest | null, protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Environment]. 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 listEnvironmentsAsync() 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.

listEnvironments(request, options, callback)

listEnvironments(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>
Returns
TypeDescription
void

listEnvironments(request, callback)

listEnvironments(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest
callback PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>
Returns
TypeDescription
void

listEnvironmentsAsync(request, options)

listEnvironmentsAsync(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>;

Equivalent to listEnvironments, 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.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>

{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 [Environment]. 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.
   */
  /**
   *  List environments in the given project and location, in the form:
   *  "projects/{projectId}/locations/{locationId}"
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of environments to return.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callListEnvironments() {
    // Construct request
    const request = {
    };

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

  callListEnvironments();

listEnvironmentsStream(request, options)

listEnvironmentsStream(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest

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 [Environment] 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 listEnvironmentsAsync() 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.

matchEnvironmentFromEnvironmentName(environmentName)

matchEnvironmentFromEnvironmentName(environmentName: string): string | number;

Parse the environment from Environment resource.

Parameter
NameDescription
environmentName string

A fully-qualified path representing Environment resource.

Returns
TypeDescription
string | number

{string} A string representing the environment.

matchLocationFromEnvironmentName(environmentName)

matchLocationFromEnvironmentName(environmentName: string): string | number;

Parse the location from Environment resource.

Parameter
NameDescription
environmentName string

A fully-qualified path representing Environment resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromEnvironmentName(environmentName)

matchProjectFromEnvironmentName(environmentName: string): string | number;

Parse the project from Environment resource.

Parameter
NameDescription
environmentName string

A fully-qualified path representing Environment resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

restartWebServer(request, options)

restartWebServer(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Restart Airflow web server.

Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The resource name of the environment to restart the web server for, in the
   *  form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const name = 'abc123'

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

  async function callRestartWebServer() {
    // Construct request
    const request = {
    };

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

  callRestartWebServer();

restartWebServer(request, options, callback)

restartWebServer(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

restartWebServer(request, callback)

restartWebServer(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateEnvironment(request, options)

updateEnvironment(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Update an environment.

Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.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.
   */
  /**
   *  The relative resource name of the environment to update, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const name = 'abc123'
  /**
   *  A patch environment. Fields specified by the `updateMask` will be copied
   *  from the patch environment into the environment under update.
   */
  // const environment = {}
  /**
   *  Required. A comma-separated list of paths, relative to `Environment`, of
   *  fields to update.
   *  For example, to set the version of scikit-learn to install in the
   *  environment to 0.19.0 and to remove an existing installation of
   *  argparse, the `updateMask` parameter would include the following two
   *  `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
   *  "config.softwareConfig.pypiPackages.argparse". The included patch
   *  environment would specify the scikit-learn version as follows:
   *      {
   *        "config":{
   *          "softwareConfig":{
   *            "pypiPackages":{
   *              "scikit-learn":"==0.19.0"
   *            }
   *          }
   *        }
   *      }
   *  Note that in the above example, any existing PyPI packages
   *  other than scikit-learn and argparse will be unaffected.
   *  Only one update type may be included in a single request's `updateMask`.
   *  For example, one cannot update both the PyPI packages and
   *  labels in the same request. However, it is possible to update multiple
   *  members of a map field simultaneously in the same request. For example,
   *  to set the labels "label1" and "label2" while clearing "label3" (assuming
   *  it already exists), one can
   *  provide the paths "labels.label1", "labels.label2", and "labels.label3"
   *  and populate the patch environment as follows:
   *      {
   *        "labels":{
   *          "label1":"new-label1-value"
   *          "label2":"new-label2-value"
   *        }
   *      }
   *  Note that in the above example, any existing labels that are not
   *  included in the `updateMask` will be unaffected.
   *  It is also possible to replace an entire map field by providing the
   *  map field's path in the `updateMask`. The new value of the field will
   *  be that which is provided in the patch environment. For example, to
   *  delete all pre-existing user-specified PyPI packages and
   *  install botocore at version 1.7.14, the `updateMask` would contain
   *  the path "config.softwareConfig.pypiPackages", and
   *  the patch environment would be the following:
   *      {
   *        "config":{
   *          "softwareConfig":{
   *            "pypiPackages":{
   *              "botocore":"==1.7.14"
   *            }
   *          }
   *        }
   *      }
   *  **Note:** Only the following fields can be updated:
   *  * `config.softwareConfig.pypiPackages`
   *      * Replace all custom custom PyPI packages. If a replacement
   *        package map is not included in `environment`, all custom
   *        PyPI packages are cleared. It is an error to provide both
   *        this mask and a mask specifying an individual package.
   *  * `config.softwareConfig.pypiPackages.`packagename
   *      * Update the custom PyPI package *packagename*,
   *        preserving other packages. To delete the package, include it in
   *        `updateMask`, and omit the mapping for it in
   *        `environment.config.softwareConfig.pypiPackages`. It is an error
   *        to provide both a mask of this form and the
   *        `config.softwareConfig.pypiPackages` mask.
   *  * `labels`
   *      * Replace all environment labels. If a replacement labels map is not
   *        included in `environment`, all labels are cleared. It is an error to
   *        provide both this mask and a mask specifying one or more individual
   *        labels.
   *  * `labels.`labelName
   *      * Set the label named *labelName*, while preserving other
   *        labels. To delete the label, include it in `updateMask` and omit its
   *        mapping in `environment.labels`. It is an error to provide both a
   *        mask of this form and the `labels` mask.
   *  * `config.nodeCount`
   *      * Horizontally scale the number of nodes in the environment. An integer
   *        greater than or equal to 3 must be provided in the `config.nodeCount`
   *        field. * `config.webServerNetworkAccessControl`
   *      * Replace the environment's current WebServerNetworkAccessControl.
   *  * `config.softwareConfig.airflowConfigOverrides`
   *      * Replace all Apache Airflow config overrides. If a replacement config
   *        overrides map is not included in `environment`, all config overrides
   *        are cleared.
   *        It is an error to provide both this mask and a mask specifying one or
   *        more individual config overrides.
   *  * `config.softwareConfig.airflowConfigOverrides.`section-name
   *      * Override the Apache Airflow config property *name* in the
   *        section named *section*, preserving other properties. To
   *        delete the property override, include it in `updateMask` and omit its
   *        mapping in
   *        `environment.config.softwareConfig.airflowConfigOverrides`.
   *        It is an error to provide both a mask of this form and the
   *        `config.softwareConfig.airflowConfigOverrides` mask.
   *  * `config.softwareConfig.envVariables`
   *      * Replace all environment variables. If a replacement environment
   *        variable map is not included in `environment`, all custom environment
   *        variables  are cleared.
   *        It is an error to provide both this mask and a mask specifying one or
   *        more individual environment variables.
   *  * `config.softwareConfig.imageVersion`
   *      * Upgrade the version of the environment in-place. Refer to
   *        `SoftwareConfig.image_version` for information on how to format the
   *        new image version. Additionally, the new image version cannot effect
   *        a version downgrade and must match the current image version's
   *        Composer major version and Airflow major and minor versions. Consult
   *        the Cloud Composer Version
   *        List (https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
   *        for valid values.
   *  * `config.softwareConfig.schedulerCount`
   *      * Horizontally scale the number of schedulers in Airflow. A positive
   *        integer not greater than the number of nodes must be provided in the
   *        `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
   *      * Cloud SQL machine type used by Airflow database.
   *        It has to be one of: db-n1-standard-2, db-n1-standard-4,
   *        db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
   *      * Machine type on which Airflow web server is running.
   *        It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
   *        or composer-n1-webserver-8. * `config.maintenanceWindow`
   *      * Maintenance window during which Cloud Composer components may be
   *        under maintenance.
   */
  // const updateMask = {}

  // Imports the Service library
  const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1;

  // Instantiates a client
  const serviceClient = new EnvironmentsClient();

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

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

  callUpdateEnvironment();

updateEnvironment(request, options, callback)

updateEnvironment(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateEnvironment(request, callback)

updateEnvironment(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void