Class v1.EnvironmentsClient (3.2.0)

Managed Apache Airflow Environments. v1

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 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: 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;

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.

universeDomain

get universeDomain(): string;

warn

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

Methods

cancelOperation(request, options, callback)

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

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

Parameters
NameDescription
request CancelOperationRequest

The request object that will be sent.

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

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

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

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

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

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

checkCreateEnvironmentProgress(name)

checkCreateEnvironmentProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1.Environment, protos.google.cloud.orchestration.airflow.service.v1.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.v1.Environment, protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

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').v1;

  // 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();

checkDatabaseFailoverProgress(name)

checkDatabaseFailoverProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse, protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse, protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

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.
   */
  /**
   *  Target environment:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'

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

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

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

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

  callDatabaseFailover();

checkDeleteEnvironmentProgress(name)

checkDeleteEnvironmentProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.orchestration.airflow.service.v1.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.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

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').v1;

  // 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();

checkLoadSnapshotProgress(name)

checkLoadSnapshotProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

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 target environment in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'
  /**
   *  A Cloud Storage path to a snapshot to load, e.g.:
   *  "gs://my-bucket/snapshots/project_location_environment_timestamp".
   */
  // const snapshotPath = 'abc123'
  /**
   *  Whether or not to skip installing Pypi packages when loading the
   *  environment's state.
   */
  // const skipPypiPackagesInstallation = true
  /**
   *  Whether or not to skip setting environment variables when loading the
   *  environment's state.
   */
  // const skipEnvironmentVariablesSetting = true
  /**
   *  Whether or not to skip setting Airflow overrides when loading the
   *  environment's state.
   */
  // const skipAirflowOverridesSetting = true
  /**
   *  Whether or not to skip copying Cloud Storage data when loading the
   *  environment's state.
   */
  // const skipGcsDataCopying = true

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

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

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

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

  callLoadSnapshot();

checkSaveSnapshotProgress(name)

checkSaveSnapshotProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

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 source environment in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'
  /**
   *  Location in a Cloud Storage where the snapshot is going to be stored, e.g.:
   *  "gs://my-bucket/snapshots".
   */
  // const snapshotLocation = 'abc123'

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

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

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

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

  callSaveSnapshot();

checkUpdateEnvironmentProgress(name)

checkUpdateEnvironmentProgress(name: string): Promise<LROperation<protos.google.cloud.orchestration.airflow.service.v1.Environment, protos.google.cloud.orchestration.airflow.service.v1.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.v1.Environment, protos.google.cloud.orchestration.airflow.service.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

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
   *  numpy, the `updateMask` parameter would include the following two
   *  `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
   *  "config.softwareConfig.pypiPackages.numpy". 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 numpy 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. Supported for Cloud Composer environments in versions
   *        composer-1.*.*-airflow-*.*.*.
   *  * `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.
   *  * `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. Supported for Cloud
   *        Composer environments in versions composer-1.*.*-airflow-2.*.*.
   *  * `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. Supported for Cloud Composer
   *        environments in versions composer-1.*.*-airflow-*.*.*.
   *  * `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. Supported for Cloud Composer environments
   *        in versions composer-1.*.*-airflow-*.*.*.
   */
  // const updateMask = {}

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

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

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

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

  callUpdateEnvironment();

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.v1.ICreateEnvironmentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Create a new environment.

Parameters
NameDescription
request 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.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation 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').v1;

  // 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.v1.ICreateEnvironmentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateEnvironmentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEnvironment(request, callback)

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

createUserWorkloadsConfigMap(request, options)

createUserWorkloadsConfigMap(request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap,
        (protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest | undefined),
        {} | undefined
    ]>;

Creates a user workloads ConfigMap.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request ICreateUserWorkloadsConfigMapRequest

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.v1.IUserWorkloadsConfigMap, (protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing UserWorkloadsConfigMap. 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 environment name to create a ConfigMap for, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const parent = 'abc123'
  /**
   *  Required. User workloads ConfigMap to create.
   */
  // const userWorkloadsConfigMap = {}

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

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

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

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

  callCreateUserWorkloadsConfigMap();

createUserWorkloadsConfigMap(request, options, callback)

createUserWorkloadsConfigMap(request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateUserWorkloadsConfigMapRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createUserWorkloadsConfigMap(request, callback)

createUserWorkloadsConfigMap(request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateUserWorkloadsConfigMapRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createUserWorkloadsSecret(request, options)

createUserWorkloadsSecret(request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret,
        (protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest | undefined),
        {} | undefined
    ]>;

Creates a user workloads Secret.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request ICreateUserWorkloadsSecretRequest

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.v1.IUserWorkloadsSecret, (protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing UserWorkloadsSecret. 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 environment name to create a Secret for, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const parent = 'abc123'
  /**
   *  Required. User workloads Secret to create.
   */
  // const userWorkloadsSecret = {}

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

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

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

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

  callCreateUserWorkloadsSecret();

createUserWorkloadsSecret(request, options, callback)

createUserWorkloadsSecret(request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateUserWorkloadsSecretRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createUserWorkloadsSecret(request, callback)

createUserWorkloadsSecret(request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateUserWorkloadsSecretRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

databaseFailover(request, options)

databaseFailover(request?: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Triggers database failover (only for highly resilient environments).

Parameters
NameDescription
request IDatabaseFailoverRequest

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.v1.IDatabaseFailoverResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation 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.
   */
  /**
   *  Target environment:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'

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

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

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

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

  callDatabaseFailover();

databaseFailover(request, options, callback)

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

databaseFailover(request, callback)

databaseFailover(request: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDatabaseFailoverRequest
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteEnvironment(request, options)

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

Delete an environment.

Parameters
NameDescription
request 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.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation 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').v1;

  // 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.v1.IDeleteEnvironmentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteEnvironmentRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteEnvironment(request, callback)

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

deleteOperation(request, options, callback)

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

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

Parameters
NameDescription
request DeleteOperationRequest

The request object that will be sent.

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

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

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

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

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

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

deleteUserWorkloadsConfigMap(request, options)

deleteUserWorkloadsConfigMap(request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest | undefined),
        {} | undefined
    ]>;

Deletes a user workloads ConfigMap.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IDeleteUserWorkloadsConfigMapRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

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

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

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

  callDeleteUserWorkloadsConfigMap();

deleteUserWorkloadsConfigMap(request, options, callback)

deleteUserWorkloadsConfigMap(request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteUserWorkloadsConfigMapRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteUserWorkloadsConfigMap(request, callback)

deleteUserWorkloadsConfigMap(request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteUserWorkloadsConfigMapRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteUserWorkloadsSecret(request, options)

deleteUserWorkloadsSecret(request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest | undefined),
        {} | undefined
    ]>;

Deletes a user workloads Secret.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IDeleteUserWorkloadsSecretRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

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

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

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

  callDeleteUserWorkloadsSecret();

deleteUserWorkloadsSecret(request, options, callback)

deleteUserWorkloadsSecret(request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteUserWorkloadsSecretRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteUserWorkloadsSecret(request, callback)

deleteUserWorkloadsSecret(request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteUserWorkloadsSecretRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest | 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.

executeAirflowCommand(request, options)

executeAirflowCommand(request?: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse,
        (protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest | undefined),
        {} | undefined
    ]>;

Executes Airflow CLI command.

Parameters
NameDescription
request IExecuteAirflowCommandRequest

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.v1.IExecuteAirflowCommandResponse, (protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ExecuteAirflowCommandResponse. 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.
   */
  /**
   *  The resource name of the environment in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
   */
  // const environment = 'abc123'
  /**
   *  Airflow command.
   */
  // const command = 'abc123'
  /**
   *  Airflow subcommand.
   */
  // const subcommand = 'abc123'
  /**
   *  Parameters for the Airflow command/subcommand as an array of arguments.
   *  It may contain positional arguments like `["my-dag-id"]`, key-value
   *  parameters like `["--foo=bar"]` or `["--foo","bar"]`,
   *  or other flags like `["-f"]`.
   */
  // const parameters = ['abc','def']

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

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

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

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

  callExecuteAirflowCommand();

executeAirflowCommand(request, options, callback)

executeAirflowCommand(request: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExecuteAirflowCommandRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

executeAirflowCommand(request, callback)

executeAirflowCommand(request: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExecuteAirflowCommandRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

fetchDatabaseProperties(request, options)

fetchDatabaseProperties(request?: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse,
        (protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest | undefined),
        {} | undefined
    ]>;

Fetches database properties.

Parameters
NameDescription
request IFetchDatabasePropertiesRequest

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.v1.IFetchDatabasePropertiesResponse, (protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest | undefined), {} | undefined ]>

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

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

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

  async function callFetchDatabaseProperties() {
    // Construct request
    const request = {
      environment,
    };

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

  callFetchDatabaseProperties();

fetchDatabaseProperties(request, options, callback)

fetchDatabaseProperties(request: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IFetchDatabasePropertiesRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

fetchDatabaseProperties(request, callback)

fetchDatabaseProperties(request: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IFetchDatabasePropertiesRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEnvironment(request, options)

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

Get an existing environment.

Parameters
NameDescription
request 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.v1.IEnvironment, (protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

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').v1;

  // 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.v1.IGetEnvironmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetEnvironmentRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEnvironment(request, callback)

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

getOperation(request, options, callback)

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

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

Parameters
NameDescription
request GetOperationRequest

The request object that will be sent.

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

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

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

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

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example

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

getProjectId()

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

getProjectId(callback)

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

getUserWorkloadsConfigMap(request, options)

getUserWorkloadsConfigMap(request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap,
        (protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest | undefined),
        {} | undefined
    ]>;

Gets an existing user workloads ConfigMap.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IGetUserWorkloadsConfigMapRequest

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.v1.IUserWorkloadsConfigMap, (protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest | undefined), {} | undefined ]>

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

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

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

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

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

  callGetUserWorkloadsConfigMap();

getUserWorkloadsConfigMap(request, options, callback)

getUserWorkloadsConfigMap(request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetUserWorkloadsConfigMapRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getUserWorkloadsConfigMap(request, callback)

getUserWorkloadsConfigMap(request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetUserWorkloadsConfigMapRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getUserWorkloadsSecret(request, options)

getUserWorkloadsSecret(request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret,
        (protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest | undefined),
        {} | undefined
    ]>;

Gets an existing user workloads Secret. Values of the "data" field in the response are cleared.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IGetUserWorkloadsSecretRequest

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.v1.IUserWorkloadsSecret, (protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest | undefined), {} | undefined ]>

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

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

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

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

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

  callGetUserWorkloadsSecret();

getUserWorkloadsSecret(request, options, callback)

getUserWorkloadsSecret(request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetUserWorkloadsSecretRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getUserWorkloadsSecret(request, callback)

getUserWorkloadsSecret(request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetUserWorkloadsSecretRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

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

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

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

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

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

listEnvironments(request, options)

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

List environments.

Parameters
NameDescription
request 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.v1.IEnvironment[], protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest | null, protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listEnvironmentsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listEnvironments(request, options, callback)

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

listEnvironments(request, callback)

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

listEnvironmentsAsync(request, options)

listEnvironmentsAsync(request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1.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 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.v1.IEnvironment>

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

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').v1;

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

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

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

  callListEnvironments();

listEnvironmentsStream(request, options)

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

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

Parameters
NameDescription
request 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 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 for more details and examples.

listOperationsAsync(request, options)

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

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

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

Parameters
NameDescription
request ListOperationsRequest

The request object that will be sent.

options CallOptions

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

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

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

Example

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

listUserWorkloadsConfigMaps(request, options)

listUserWorkloadsConfigMaps(request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[],
        protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest | null,
        protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse
    ]>;

Lists user workloads ConfigMaps.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IListUserWorkloadsConfigMapsRequest

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.v1.IUserWorkloadsConfigMap[], protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest | null, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse ]>

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

listUserWorkloadsConfigMaps(request, options, callback)

listUserWorkloadsConfigMaps(request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>): void;
Parameters
NameDescription
request IListUserWorkloadsConfigMapsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>
Returns
TypeDescription
void

listUserWorkloadsConfigMaps(request, callback)

listUserWorkloadsConfigMaps(request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>): void;
Parameters
NameDescription
request IListUserWorkloadsConfigMapsRequest
callback PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>
Returns
TypeDescription
void

listUserWorkloadsConfigMapsAsync(request, options)

listUserWorkloadsConfigMapsAsync(request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>;

Equivalent to listUserWorkloadsConfigMaps, but returns an iterable object.

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

Parameters
NameDescription
request IListUserWorkloadsConfigMapsRequest

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.v1.IUserWorkloadsConfigMap>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing UserWorkloadsConfigMap. 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. List ConfigMaps in the given environment, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of ConfigMaps to return.
   */
  // const pageSize = 1234
  /**
   *  Optional. 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').v1;

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

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

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

  callListUserWorkloadsConfigMaps();

listUserWorkloadsConfigMapsStream(request, options)

listUserWorkloadsConfigMapsStream(request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListUserWorkloadsConfigMapsRequest

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 UserWorkloadsConfigMap 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 listUserWorkloadsConfigMapsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listUserWorkloadsSecrets(request, options)

listUserWorkloadsSecrets(request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[],
        protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest | null,
        protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse
    ]>;

Lists user workloads Secrets.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IListUserWorkloadsSecretsRequest

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.v1.IUserWorkloadsSecret[], protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest | null, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse ]>

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

listUserWorkloadsSecrets(request, options, callback)

listUserWorkloadsSecrets(request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>): void;
Parameters
NameDescription
request IListUserWorkloadsSecretsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>
Returns
TypeDescription
void

listUserWorkloadsSecrets(request, callback)

listUserWorkloadsSecrets(request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>): void;
Parameters
NameDescription
request IListUserWorkloadsSecretsRequest
callback PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>
Returns
TypeDescription
void

listUserWorkloadsSecretsAsync(request, options)

listUserWorkloadsSecretsAsync(request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>;

Equivalent to listUserWorkloadsSecrets, but returns an iterable object.

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

Parameters
NameDescription
request IListUserWorkloadsSecretsRequest

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.v1.IUserWorkloadsSecret>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing UserWorkloadsSecret. 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. List Secrets in the given environment, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of Secrets to return.
   */
  // const pageSize = 1234
  /**
   *  Optional. 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').v1;

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

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

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

  callListUserWorkloadsSecrets();

listUserWorkloadsSecretsStream(request, options)

listUserWorkloadsSecretsStream(request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListUserWorkloadsSecretsRequest

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 UserWorkloadsSecret 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 listUserWorkloadsSecretsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listWorkloads(request, options)

listWorkloads(request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[],
        protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest | null,
        protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse
    ]>;

Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IListWorkloadsRequest

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.v1.ListWorkloadsResponse.IComposerWorkload[], protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest | null, protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listWorkloadsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listWorkloads(request, options, callback)

listWorkloads(request: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>): void;
Parameters
NameDescription
request IListWorkloadsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>
Returns
TypeDescription
void

listWorkloads(request, callback)

listWorkloads(request: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>): void;
Parameters
NameDescription
request IListWorkloadsRequest
callback PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>
Returns
TypeDescription
void

listWorkloadsAsync(request, options)

listWorkloadsAsync(request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>;

Equivalent to listWorkloads, but returns an iterable object.

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

Parameters
NameDescription
request IListWorkloadsRequest

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.v1.ListWorkloadsResponse.IComposerWorkload>

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

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 environment name to get workloads for, in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of environments to return.
   */
  // const pageSize = 1234
  /**
   *  Optional. The next_page_token value returned from a previous List request,
   *  if any.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The list filter.
   *  Currently only supports equality on the type field. The value of a field
   *  specified in the filter expression must be one ComposerWorkloadType enum
   *  option. It's possible to get multiple types using "OR" operator, e.g.:
   *  "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are
   *  returned.
   */
  // const filter = 'abc123'

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

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

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

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

  callListWorkloads();

listWorkloadsStream(request, options)

listWorkloadsStream(request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListWorkloadsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listWorkloadsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

loadSnapshot(request, options)

loadSnapshot(request?: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Loads a snapshot of a Cloud Composer environment.

As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.

Parameters
NameDescription
request ILoadSnapshotRequest

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.v1.ILoadSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation 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 target environment in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'
  /**
   *  A Cloud Storage path to a snapshot to load, e.g.:
   *  "gs://my-bucket/snapshots/project_location_environment_timestamp".
   */
  // const snapshotPath = 'abc123'
  /**
   *  Whether or not to skip installing Pypi packages when loading the
   *  environment's state.
   */
  // const skipPypiPackagesInstallation = true
  /**
   *  Whether or not to skip setting environment variables when loading the
   *  environment's state.
   */
  // const skipEnvironmentVariablesSetting = true
  /**
   *  Whether or not to skip setting Airflow overrides when loading the
   *  environment's state.
   */
  // const skipAirflowOverridesSetting = true
  /**
   *  Whether or not to skip copying Cloud Storage data when loading the
   *  environment's state.
   */
  // const skipGcsDataCopying = true

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

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

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

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

  callLoadSnapshot();

loadSnapshot(request, options, callback)

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

loadSnapshot(request, callback)

loadSnapshot(request: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ILoadSnapshotRequest
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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.

matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName)

matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string): string | number;

Parse the environment from UserWorkloadsConfigMap resource.

Parameter
NameDescription
userWorkloadsConfigMapName string

A fully-qualified path representing UserWorkloadsConfigMap resource.

Returns
TypeDescription
string | number

{string} A string representing the environment.

matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName)

matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string): string | number;

Parse the environment from UserWorkloadsSecret resource.

Parameter
NameDescription
userWorkloadsSecretName string

A fully-qualified path representing UserWorkloadsSecret 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.

matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName)

matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string): string | number;

Parse the location from UserWorkloadsConfigMap resource.

Parameter
NameDescription
userWorkloadsConfigMapName string

A fully-qualified path representing UserWorkloadsConfigMap resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName)

matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string): string | number;

Parse the location from UserWorkloadsSecret resource.

Parameter
NameDescription
userWorkloadsSecretName string

A fully-qualified path representing UserWorkloadsSecret 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.

matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName)

matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string): string | number;

Parse the project from UserWorkloadsConfigMap resource.

Parameter
NameDescription
userWorkloadsConfigMapName string

A fully-qualified path representing UserWorkloadsConfigMap resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName)

matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string): string | number;

Parse the project from UserWorkloadsSecret resource.

Parameter
NameDescription
userWorkloadsSecretName string

A fully-qualified path representing UserWorkloadsSecret resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName)

matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string): string | number;

Parse the user_workloads_config_map from UserWorkloadsConfigMap resource.

Parameter
NameDescription
userWorkloadsConfigMapName string

A fully-qualified path representing UserWorkloadsConfigMap resource.

Returns
TypeDescription
string | number

{string} A string representing the user_workloads_config_map.

matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName)

matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string): string | number;

Parse the user_workloads_secret from UserWorkloadsSecret resource.

Parameter
NameDescription
userWorkloadsSecretName string

A fully-qualified path representing UserWorkloadsSecret resource.

Returns
TypeDescription
string | number

{string} A string representing the user_workloads_secret.

pollAirflowCommand(request, options)

pollAirflowCommand(request?: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse,
        (protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest | undefined),
        {} | undefined
    ]>;

Polls Airflow CLI command execution and fetches logs.

Parameters
NameDescription
request IPollAirflowCommandRequest

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.v1.IPollAirflowCommandResponse, (protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

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 in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'
  /**
   *  The unique ID of the command execution.
   */
  // const executionId = 'abc123'
  /**
   *  The name of the pod where the command is executed.
   */
  // const pod = 'abc123'
  /**
   *  The namespace of the pod where the command is executed.
   */
  // const podNamespace = 'abc123'
  /**
   *  Line number from which new logs should be fetched.
   */
  // const nextLineNumber = 1234

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

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

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

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

  callPollAirflowCommand();

pollAirflowCommand(request, options, callback)

pollAirflowCommand(request: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IPollAirflowCommandRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

pollAirflowCommand(request, callback)

pollAirflowCommand(request: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IPollAirflowCommandRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

saveSnapshot(request, options)

saveSnapshot(request?: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a snapshots of a Cloud Composer environment.

As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.

Parameters
NameDescription
request ISaveSnapshotRequest

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.v1.ISaveSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation 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 source environment in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
   */
  // const environment = 'abc123'
  /**
   *  Location in a Cloud Storage where the snapshot is going to be stored, e.g.:
   *  "gs://my-bucket/snapshots".
   */
  // const snapshotLocation = 'abc123'

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

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

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

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

  callSaveSnapshot();

saveSnapshot(request, options, callback)

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

saveSnapshot(request, callback)

saveSnapshot(request: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ISaveSnapshotRequest
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopAirflowCommand(request, options)

stopAirflowCommand(request?: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse,
        (protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest | undefined),
        {} | undefined
    ]>;

Stops Airflow CLI command execution.

Parameters
NameDescription
request IStopAirflowCommandRequest

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.v1.IStopAirflowCommandResponse, (protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing StopAirflowCommandResponse. 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.
   */
  /**
   *  The resource name of the environment in the form:
   *  "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
   */
  // const environment = 'abc123'
  /**
   *  The unique ID of the command execution.
   */
  // const executionId = 'abc123'
  /**
   *  The name of the pod where the command is executed.
   */
  // const pod = 'abc123'
  /**
   *  The namespace of the pod where the command is executed.
   */
  // const podNamespace = 'abc123'
  /**
   *  If true, the execution is terminated forcefully (SIGKILL). If false, the
   *  execution is stopped gracefully, giving it time for cleanup.
   */
  // const force = true

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

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

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

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

  callStopAirflowCommand();

stopAirflowCommand(request, options, callback)

stopAirflowCommand(request: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IStopAirflowCommandRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopAirflowCommand(request, callback)

stopAirflowCommand(request: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IStopAirflowCommandRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateEnvironment(request, options)

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

Update an environment.

Parameters
NameDescription
request 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.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation 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
   *  numpy, the `updateMask` parameter would include the following two
   *  `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
   *  "config.softwareConfig.pypiPackages.numpy". 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 numpy 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. Supported for Cloud Composer environments in versions
   *        composer-1.*.*-airflow-*.*.*.
   *  * `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.
   *  * `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. Supported for Cloud
   *        Composer environments in versions composer-1.*.*-airflow-2.*.*.
   *  * `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. Supported for Cloud Composer
   *        environments in versions composer-1.*.*-airflow-*.*.*.
   *  * `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. Supported for Cloud Composer environments
   *        in versions composer-1.*.*-airflow-*.*.*.
   */
  // const updateMask = {}

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

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

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

    // 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.v1.IUpdateEnvironmentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateEnvironmentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, protos.google.cloud.orchestration.airflow.service.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateEnvironment(request, callback)

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

updateUserWorkloadsConfigMap(request, options)

updateUserWorkloadsConfigMap(request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap,
        (protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest | undefined),
        {} | undefined
    ]>;

Updates a user workloads ConfigMap.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IUpdateUserWorkloadsConfigMapRequest

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.v1.IUserWorkloadsConfigMap, (protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing UserWorkloadsConfigMap. 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.
   */
  /**
   *  Optional. User workloads ConfigMap to override.
   */
  // const userWorkloadsConfigMap = {}

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

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

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

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

  callUpdateUserWorkloadsConfigMap();

updateUserWorkloadsConfigMap(request, options, callback)

updateUserWorkloadsConfigMap(request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateUserWorkloadsConfigMapRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateUserWorkloadsConfigMap(request, callback)

updateUserWorkloadsConfigMap(request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateUserWorkloadsConfigMapRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateUserWorkloadsSecret(request, options)

updateUserWorkloadsSecret(request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, options?: CallOptions): Promise<[
        protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret,
        (protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest | undefined),
        {} | undefined
    ]>;

Updates a user workloads Secret.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

Parameters
NameDescription
request IUpdateUserWorkloadsSecretRequest

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.v1.IUserWorkloadsSecret, (protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing UserWorkloadsSecret. 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.
   */
  /**
   *  Optional. User workloads Secret to override.
   */
  // const userWorkloadsSecret = {}

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

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

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

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

  callUpdateUserWorkloadsSecret();

updateUserWorkloadsSecret(request, options, callback)

updateUserWorkloadsSecret(request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, options: CallOptions, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateUserWorkloadsSecretRequest
options CallOptions
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateUserWorkloadsSecret(request, callback)

updateUserWorkloadsSecret(request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, callback: Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IUpdateUserWorkloadsSecretRequest
callback Callback<protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

userWorkloadsConfigMapPath(project, location, environment, userWorkloadsConfigMap)

userWorkloadsConfigMapPath(project: string, location: string, environment: string, userWorkloadsConfigMap: string): string;

Return a fully-qualified userWorkloadsConfigMap resource name string.

Parameters
NameDescription
project string
location string
environment string
userWorkloadsConfigMap string
Returns
TypeDescription
string

{string} Resource name string.

userWorkloadsSecretPath(project, location, environment, userWorkloadsSecret)

userWorkloadsSecretPath(project: string, location: string, environment: string, userWorkloadsSecret: string): string;

Return a fully-qualified userWorkloadsSecret resource name string.

Parameters
NameDescription
project string
location string
environment string
userWorkloadsSecret string
Returns
TypeDescription
string

{string} Resource name string.