Class v1.ConfigClient (0.2.0)

Infrastructure Manager is a managed service that automates the deployment and management of Google Cloud infrastructure resources. v1

Package

@google-cloud/config

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of ConfigClient.

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 ConfigClient({fallback: true}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

configStub

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

descriptors

descriptors: Descriptors;

iamClient

iamClient: IamClient;

innerApiCalls

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

locationsClient

locationsClient: LocationsClient;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

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

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

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

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: ''});

checkCreateDeploymentProgress(name)

checkCreateDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.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.
   */
  /**
   *  Required. The parent in whose context the Deployment is created. The parent
   *  value is in the format: 'projects/{project_id}/locations/{location}'.
   */
  // const parent = 'abc123'
  /**
   *  Required. The Deployment ID.
   */
  // const deploymentId = 'abc123'
  /**
   *  Required. Deployment google.cloud.config.v1.Deployment  resource to be
   *  created.
   */
  // const deployment = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

  async function callCreateDeployment() {
    // Construct request
    const request = {
      parent,
      deploymentId,
      deployment,
    };

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

  callCreateDeployment();

checkCreatePreviewProgress(name)

checkCreatePreviewProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Preview, protos.google.cloud.config.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.config.v1.Preview, protos.google.cloud.config.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.
   */
  /**
   *  Required. The parent in whose context the Preview is created. The parent
   *  value is in the format: 'projects/{project_id}/locations/{location}'.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The preview ID.
   */
  // const previewId = 'abc123'
  /**
   *  Required. Preview google.cloud.config.v1.Preview  resource to be created.
   */
  // const preview = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callCreatePreview();

checkDeleteDeploymentProgress(name)

checkDeleteDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.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.
   */
  /**
   *  Required. The name of the Deployment in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set to true, any revisions for this deployment will also be
   *  deleted. (Otherwise, the request will only work if the deployment has no
   *  revisions.)
   */
  // const force = true
  /**
   *  Optional. Policy on how resources actuated by the deployment should be
   *  deleted. If unspecified, the default behavior is to delete the underlying
   *  resources.
   */
  // const deletePolicy = {}

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callDeleteDeployment();

checkDeletePreviewProgress(name)

checkDeletePreviewProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Preview, protos.google.cloud.config.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.config.v1.Preview, protos.google.cloud.config.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.
   */
  /**
   *  Required. The name of the Preview in the format:
   *  'projects/{project_id}/locations/{location}/previews/{preview}'.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callDeletePreview();

checkLockDeploymentProgress(name)

checkLockDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.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.
   */
  /**
   *  Required. The name of the deployment in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callLockDeployment();

checkUnlockDeploymentProgress(name)

checkUnlockDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.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.
   */
  /**
   *  Required. The name of the deployment in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'
  /**
   *  Required. Lock ID of the lock file to be unlocked.
   */
  // const lockId = 1234

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callUnlockDeployment();

checkUpdateDeploymentProgress(name)

checkUpdateDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.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.
   */
  /**
   *  Optional. Field mask used to specify the fields to be overwritten in the
   *  Deployment resource by the update.
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask. If the
   *  user does not provide a mask then all fields will be overwritten.
   */
  // const updateMask = {}
  /**
   *  Required. Deployment google.cloud.config.v1.Deployment  to update.
   *  The deployment's `name` field is used to identify the resource to be
   *  updated. Format:
   *  `projects/{project}/locations/{location}/deployments/{deployment}`
   */
  // const deployment = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callUpdateDeployment();

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.

createDeployment(request, options)

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

Creates a .

Parameters
NameDescription
request ICreateDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.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.
   */
  /**
   *  Required. The parent in whose context the Deployment is created. The parent
   *  value is in the format: 'projects/{project_id}/locations/{location}'.
   */
  // const parent = 'abc123'
  /**
   *  Required. The Deployment ID.
   */
  // const deploymentId = 'abc123'
  /**
   *  Required. Deployment google.cloud.config.v1.Deployment  resource to be
   *  created.
   */
  // const deployment = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

  async function callCreateDeployment() {
    // Construct request
    const request = {
      parent,
      deploymentId,
      deployment,
    };

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

  callCreateDeployment();

createDeployment(request, options, callback)

createDeployment(request: protos.google.cloud.config.v1.ICreateDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateDeploymentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createDeployment(request, callback)

createDeployment(request: protos.google.cloud.config.v1.ICreateDeploymentRequest, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateDeploymentRequest
callback Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createPreview(request, options)

createPreview(request?: protos.google.cloud.config.v1.ICreatePreviewRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a .

Parameters
NameDescription
request ICreatePreviewRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.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.
   */
  /**
   *  Required. The parent in whose context the Preview is created. The parent
   *  value is in the format: 'projects/{project_id}/locations/{location}'.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The preview ID.
   */
  // const previewId = 'abc123'
  /**
   *  Required. Preview google.cloud.config.v1.Preview  resource to be created.
   */
  // const preview = {}
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callCreatePreview();

createPreview(request, options, callback)

createPreview(request: protos.google.cloud.config.v1.ICreatePreviewRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreatePreviewRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createPreview(request, callback)

createPreview(request: protos.google.cloud.config.v1.ICreatePreviewRequest, callback: Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreatePreviewRequest
callback Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDeployment(request, options)

deleteDeployment(request?: protos.google.cloud.config.v1.IDeleteDeploymentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a .

Parameters
NameDescription
request IDeleteDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.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.
   */
  /**
   *  Required. The name of the Deployment in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. If set to true, any revisions for this deployment will also be
   *  deleted. (Otherwise, the request will only work if the deployment has no
   *  revisions.)
   */
  // const force = true
  /**
   *  Optional. Policy on how resources actuated by the deployment should be
   *  deleted. If unspecified, the default behavior is to delete the underlying
   *  resources.
   */
  // const deletePolicy = {}

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callDeleteDeployment();

deleteDeployment(request, options, callback)

deleteDeployment(request: protos.google.cloud.config.v1.IDeleteDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteDeploymentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteDeployment(request, callback)

deleteDeployment(request: protos.google.cloud.config.v1.IDeleteDeploymentRequest, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteDeploymentRequest
callback Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.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: ''});

deletePreview(request, options)

deletePreview(request?: protos.google.cloud.config.v1.IDeletePreviewRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a .

Parameters
NameDescription
request IDeletePreviewRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.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.
   */
  /**
   *  Required. The name of the Preview in the format:
   *  'projects/{project_id}/locations/{location}/previews/{preview}'.
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional request ID to identify requests. Specify a unique
   *  request ID so that if you must retry your request, the server will know to
   *  ignore the request if it has already been completed. The server will
   *  guarantee that for at least 60 minutes after the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported (00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callDeletePreview();

deletePreview(request, options, callback)

deletePreview(request: protos.google.cloud.config.v1.IDeletePreviewRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeletePreviewRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePreview(request, callback)

deletePreview(request: protos.google.cloud.config.v1.IDeletePreviewRequest, callback: Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeletePreviewRequest
callback Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteStatefile(request, options)

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

Deletes Terraform state file in a given deployment.

Parameters
NameDescription
request IDeleteStatefileRequest

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.config.v1.IDeleteStatefileRequest | 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 name of the deployment in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'
  /**
   *  Required. Lock ID of the lock file to verify that the user who is deleting
   *  the state file previously locked the Deployment.
   */
  // const lockId = 1234

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.deleteStatefile(request);
    console.log(response);
  }

  callDeleteStatefile();

deleteStatefile(request, options, callback)

deleteStatefile(request: protos.google.cloud.config.v1.IDeleteStatefileRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.config.v1.IDeleteStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteStatefileRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.config.v1.IDeleteStatefileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteStatefile(request, callback)

deleteStatefile(request: protos.google.cloud.config.v1.IDeleteStatefileRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.config.v1.IDeleteStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteStatefileRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.config.v1.IDeleteStatefileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deploymentPath(project, location, deployment)

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

Return a fully-qualified deployment resource name string.

Parameters
NameDescription
project string
location string
deployment string
Returns
TypeDescription
string

{string} Resource name string.

exportDeploymentStatefile(request, options)

exportDeploymentStatefile(request?: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IStatefile,
        (protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | undefined),
        {} | undefined
    ]>;

Exports Terraform state file from a given deployment.

Parameters
NameDescription
request IExportDeploymentStatefileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IStatefile, (protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Statefile. 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 parent in whose context the statefile is listed. The parent
   *  value is in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const parent = 'abc123'
  /**
   *  Optional. If this flag is set to true, the exported deployment state file
   *  will be the draft state. This will enable the draft file to be validated
   *  before copying it over to the working state on unlock.
   */
  // const draft = true

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.exportDeploymentStatefile(request);
    console.log(response);
  }

  callExportDeploymentStatefile();

exportDeploymentStatefile(request, options, callback)

exportDeploymentStatefile(request: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExportDeploymentStatefileRequest
options CallOptions
callback Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportDeploymentStatefile(request, callback)

exportDeploymentStatefile(request: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExportDeploymentStatefileRequest
callback Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportLockInfo(request, options)

exportLockInfo(request?: protos.google.cloud.config.v1.IExportLockInfoRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.ILockInfo,
        protos.google.cloud.config.v1.IExportLockInfoRequest | undefined,
        {} | undefined
    ]>;

Exports the lock info on a locked deployment.

Parameters
NameDescription
request IExportLockInfoRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.ILockInfo, protos.google.cloud.config.v1.IExportLockInfoRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing LockInfo. 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 name of the deployment in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.exportLockInfo(request);
    console.log(response);
  }

  callExportLockInfo();

exportLockInfo(request, options, callback)

exportLockInfo(request: protos.google.cloud.config.v1.IExportLockInfoRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.ILockInfo, protos.google.cloud.config.v1.IExportLockInfoRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExportLockInfoRequest
options CallOptions
callback Callback<protos.google.cloud.config.v1.ILockInfo, protos.google.cloud.config.v1.IExportLockInfoRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportLockInfo(request, callback)

exportLockInfo(request: protos.google.cloud.config.v1.IExportLockInfoRequest, callback: Callback<protos.google.cloud.config.v1.ILockInfo, protos.google.cloud.config.v1.IExportLockInfoRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExportLockInfoRequest
callback Callback<protos.google.cloud.config.v1.ILockInfo, protos.google.cloud.config.v1.IExportLockInfoRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportPreviewResult(request, options)

exportPreviewResult(request?: protos.google.cloud.config.v1.IExportPreviewResultRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IExportPreviewResultResponse,
        protos.google.cloud.config.v1.IExportPreviewResultRequest | undefined,
        {} | undefined
    ]>;

Export results.

Parameters
NameDescription
request IExportPreviewResultRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IExportPreviewResultResponse, protos.google.cloud.config.v1.IExportPreviewResultRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ExportPreviewResultResponse. 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 preview whose results should be exported. The preview value
   *  is in the format:
   *  'projects/{project_id}/locations/{location}/previews/{preview}'.
   */
  // const parent = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.exportPreviewResult(request);
    console.log(response);
  }

  callExportPreviewResult();

exportPreviewResult(request, options, callback)

exportPreviewResult(request: protos.google.cloud.config.v1.IExportPreviewResultRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IExportPreviewResultResponse, protos.google.cloud.config.v1.IExportPreviewResultRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExportPreviewResultRequest
options CallOptions
callback Callback<protos.google.cloud.config.v1.IExportPreviewResultResponse, protos.google.cloud.config.v1.IExportPreviewResultRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportPreviewResult(request, callback)

exportPreviewResult(request: protos.google.cloud.config.v1.IExportPreviewResultRequest, callback: Callback<protos.google.cloud.config.v1.IExportPreviewResultResponse, protos.google.cloud.config.v1.IExportPreviewResultRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExportPreviewResultRequest
callback Callback<protos.google.cloud.config.v1.IExportPreviewResultResponse, protos.google.cloud.config.v1.IExportPreviewResultRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportRevisionStatefile(request, options)

exportRevisionStatefile(request?: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IStatefile,
        protos.google.cloud.config.v1.IExportRevisionStatefileRequest | undefined,
        {} | undefined
    ]>;

Exports Terraform state file from a given revision.

Parameters
NameDescription
request IExportRevisionStatefileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportRevisionStatefileRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Statefile. 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 parent in whose context the statefile is listed. The parent
   *  value is in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
   */
  // const parent = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.exportRevisionStatefile(request);
    console.log(response);
  }

  callExportRevisionStatefile();

exportRevisionStatefile(request, options, callback)

exportRevisionStatefile(request: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportRevisionStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExportRevisionStatefileRequest
options CallOptions
callback Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportRevisionStatefileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportRevisionStatefile(request, callback)

exportRevisionStatefile(request: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportRevisionStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IExportRevisionStatefileRequest
callback Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportRevisionStatefileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getDeployment(request, options)

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

Gets details about a .

Parameters
NameDescription
request IGetDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IGetDeploymentRequest | 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.
   */
  /**
   *  Required. The name of the deployment. Format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callGetDeployment();

getDeployment(request, options, callback)

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

getDeployment(request, callback)

getDeployment(request: protos.google.cloud.config.v1.IGetDeploymentRequest, callback: Callback<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetDeploymentRequest
callback Callback<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getIamPolicy(request, options, callback)

getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
request IamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

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

callback Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>

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

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.Policy]>

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

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
NameDescription
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

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

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
Promise<google.cloud.location.ILocation>

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

Example

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

getOperation(request, options, callback)

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

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

Parameters
NameDescription
request 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)

getPreview(request, options)

getPreview(request?: protos.google.cloud.config.v1.IGetPreviewRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IPreview,
        protos.google.cloud.config.v1.IGetPreviewRequest | undefined,
        {} | undefined
    ]>;

Gets details about a .

Parameters
NameDescription
request IGetPreviewRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IGetPreviewRequest | 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.
   */
  /**
   *  Required. The name of the preview. Format:
   *  'projects/{project_id}/locations/{location}/previews/{preview}'.
   */
  // const name = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.getPreview(request);
    console.log(response);
  }

  callGetPreview();

getPreview(request, options, callback)

getPreview(request: protos.google.cloud.config.v1.IGetPreviewRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IGetPreviewRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetPreviewRequest
options CallOptions
callback Callback<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IGetPreviewRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPreview(request, callback)

getPreview(request: protos.google.cloud.config.v1.IGetPreviewRequest, callback: Callback<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IGetPreviewRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetPreviewRequest
callback Callback<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IGetPreviewRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

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

getProjectId(callback)

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

getResource(request, options)

getResource(request?: protos.google.cloud.config.v1.IGetResourceRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IResource,
        protos.google.cloud.config.v1.IGetResourceRequest | undefined,
        {} | undefined
    ]>;

Gets details about a deployed by Infra Manager.

Parameters
NameDescription
request IGetResourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IResource, protos.google.cloud.config.v1.IGetResourceRequest | 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.
   */
  /**
   *  Required. The name of the Resource in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
   */
  // const name = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.getResource(request);
    console.log(response);
  }

  callGetResource();

getResource(request, options, callback)

getResource(request: protos.google.cloud.config.v1.IGetResourceRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IResource, protos.google.cloud.config.v1.IGetResourceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetResourceRequest
options CallOptions
callback Callback<protos.google.cloud.config.v1.IResource, protos.google.cloud.config.v1.IGetResourceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getResource(request, callback)

getResource(request: protos.google.cloud.config.v1.IGetResourceRequest, callback: Callback<protos.google.cloud.config.v1.IResource, protos.google.cloud.config.v1.IGetResourceRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetResourceRequest
callback Callback<protos.google.cloud.config.v1.IResource, protos.google.cloud.config.v1.IGetResourceRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getRevision(request, options)

getRevision(request?: protos.google.cloud.config.v1.IGetRevisionRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IRevision,
        protos.google.cloud.config.v1.IGetRevisionRequest | undefined,
        {} | undefined
    ]>;

Gets details about a .

Parameters
NameDescription
request IGetRevisionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IRevision, protos.google.cloud.config.v1.IGetRevisionRequest | 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.
   */
  /**
   *  Required. The name of the Revision in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
   */
  // const name = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.getRevision(request);
    console.log(response);
  }

  callGetRevision();

getRevision(request, options, callback)

getRevision(request: protos.google.cloud.config.v1.IGetRevisionRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IRevision, protos.google.cloud.config.v1.IGetRevisionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetRevisionRequest
options CallOptions
callback Callback<protos.google.cloud.config.v1.IRevision, protos.google.cloud.config.v1.IGetRevisionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getRevision(request, callback)

getRevision(request: protos.google.cloud.config.v1.IGetRevisionRequest, callback: Callback<protos.google.cloud.config.v1.IRevision, protos.google.cloud.config.v1.IGetRevisionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetRevisionRequest
callback Callback<protos.google.cloud.config.v1.IRevision, protos.google.cloud.config.v1.IGetRevisionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

importStatefile(request, options)

importStatefile(request?: protos.google.cloud.config.v1.IImportStatefileRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IStatefile,
        protos.google.cloud.config.v1.IImportStatefileRequest | undefined,
        {} | undefined
    ]>;

Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.

Parameters
NameDescription
request IImportStatefileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IImportStatefileRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Statefile. 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 parent in whose context the statefile is listed. The parent
   *  value is in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const parent = 'abc123'
  /**
   *  Required. Lock ID of the lock file to verify that the user who is importing
   *  the state file previously locked the Deployment.
   */
  // const lockId = 1234
  /**
   *  Optional.
   */
  // const skipDraft = true

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

    // Run request
    const response = await configClient.importStatefile(request);
    console.log(response);
  }

  callImportStatefile();

importStatefile(request, options, callback)

importStatefile(request: protos.google.cloud.config.v1.IImportStatefileRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IImportStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IImportStatefileRequest
options CallOptions
callback Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IImportStatefileRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

importStatefile(request, callback)

importStatefile(request: protos.google.cloud.config.v1.IImportStatefileRequest, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IImportStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IImportStatefileRequest
callback Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IImportStatefileRequest | 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.

listDeployments(request, options)

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

Lists s in a given project and location.

Parameters
NameDescription
request IListDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IDeployment[], protos.google.cloud.config.v1.IListDeploymentsRequest | null, protos.google.cloud.config.v1.IListDeploymentsResponse ]>

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

listDeployments(request, options, callback)

listDeployments(request: protos.google.cloud.config.v1.IListDeploymentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.config.v1.IListDeploymentsRequest, protos.google.cloud.config.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.config.v1.IDeployment>): void;
Parameters
NameDescription
request IListDeploymentsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.config.v1.IListDeploymentsRequest, protos.google.cloud.config.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.config.v1.IDeployment>
Returns
TypeDescription
void

listDeployments(request, callback)

listDeployments(request: protos.google.cloud.config.v1.IListDeploymentsRequest, callback: PaginationCallback<protos.google.cloud.config.v1.IListDeploymentsRequest, protos.google.cloud.config.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.config.v1.IDeployment>): void;
Parameters
NameDescription
request IListDeploymentsRequest
callback PaginationCallback<protos.google.cloud.config.v1.IListDeploymentsRequest, protos.google.cloud.config.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.config.v1.IDeployment>
Returns
TypeDescription
void

listDeploymentsAsync(request, options)

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

Equivalent to listDeployments, but returns an iterable object.

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

Parameters
NameDescription
request IListDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.config.v1.IDeployment>

{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 parent in whose context the Deployments are listed. The
   *  parent value is in the format:
   *  'projects/{project_id}/locations/{location}'.
   */
  // const parent = 'abc123'
  /**
   *  When requesting a page of resources, 'page_size' specifies number of
   *  resources to return. If unspecified or set to 0, all resources will be
   *  returned.
   */
  // const pageSize = 1234
  /**
   *  Token returned by previous call to 'ListDeployments' which specifies the
   *  position in the list from where to continue listing the resources.
   */
  // const pageToken = 'abc123'
  /**
   *  Lists the Deployments that match the filter expression. A filter
   *  expression filters the resources listed in the response. The expression
   *  must be of the form '{field} {operator} {value}' where operators: '<', '="">',
   *  '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
   *  operator which is roughly synonymous with equality). {field} can refer to a
   *  proto or JSON field, or a synthetic field. Field names can be camelCase or
   *  snake_case.
   *  Examples:
   *  - Filter by name:
   *    name = "projects/foo/locations/us-central1/deployments/bar
   *  - Filter by labels:
   *    - Resources that have a key called 'foo'
   *      labels.foo:*
   *    - Resources that have a key called 'foo' whose value is 'bar'
   *      labels.foo = bar
   *  - Filter by state:
   *    - Deployments in CREATING state.
   *      state=CREATING
   */
  // const filter = 'abc123'
  /**
   *  Field to use to sort the list.
   */
  // const orderBy = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callListDeployments();

listDeploymentsStream(request, options)

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

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

Parameters
NameDescription
request IListDeploymentsRequest

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

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

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

Parameters
NameDescription
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

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

listOperationsAsync(request, options)

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

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

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

Parameters
NameDescription
request 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)

listPreviews(request, options)

listPreviews(request?: protos.google.cloud.config.v1.IListPreviewsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IPreview[],
        protos.google.cloud.config.v1.IListPreviewsRequest | null,
        protos.google.cloud.config.v1.IListPreviewsResponse
    ]>;

Lists s in a given project and location.

Parameters
NameDescription
request IListPreviewsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IPreview[], protos.google.cloud.config.v1.IListPreviewsRequest | null, protos.google.cloud.config.v1.IListPreviewsResponse ]>

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

listPreviews(request, options, callback)

listPreviews(request: protos.google.cloud.config.v1.IListPreviewsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.config.v1.IListPreviewsRequest, protos.google.cloud.config.v1.IListPreviewsResponse | null | undefined, protos.google.cloud.config.v1.IPreview>): void;
Parameters
NameDescription
request IListPreviewsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.config.v1.IListPreviewsRequest, protos.google.cloud.config.v1.IListPreviewsResponse | null | undefined, protos.google.cloud.config.v1.IPreview>
Returns
TypeDescription
void

listPreviews(request, callback)

listPreviews(request: protos.google.cloud.config.v1.IListPreviewsRequest, callback: PaginationCallback<protos.google.cloud.config.v1.IListPreviewsRequest, protos.google.cloud.config.v1.IListPreviewsResponse | null | undefined, protos.google.cloud.config.v1.IPreview>): void;
Parameters
NameDescription
request IListPreviewsRequest
callback PaginationCallback<protos.google.cloud.config.v1.IListPreviewsRequest, protos.google.cloud.config.v1.IListPreviewsResponse | null | undefined, protos.google.cloud.config.v1.IPreview>
Returns
TypeDescription
void

listPreviewsAsync(request, options)

listPreviewsAsync(request?: protos.google.cloud.config.v1.IListPreviewsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.config.v1.IPreview>;

Equivalent to listPreviews, but returns an iterable object.

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

Parameters
NameDescription
request IListPreviewsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.config.v1.IPreview>

{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 parent in whose context the Previews are listed. The parent
   *  value is in the format: 'projects/{project_id}/locations/{location}'.
   */
  // const parent = 'abc123'
  /**
   *  Optional. When requesting a page of resources, 'page_size' specifies number
   *  of resources to return. If unspecified or set to 0, all resources will be
   *  returned.
   */
  // const pageSize = 1234
  /**
   *  Optional. Token returned by previous call to 'ListDeployments' which
   *  specifies the position in the list from where to continue listing the
   *  resources.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Lists the Deployments that match the filter expression. A filter
   *  expression filters the resources listed in the response. The expression
   *  must be of the form '{field} {operator} {value}' where operators: '<', '="">',
   *  '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
   *  operator which is roughly synonymous with equality). {field} can refer to a
   *  proto or JSON field, or a synthetic field. Field names can be camelCase or
   *  snake_case.
   *  Examples:
   *  - Filter by name:
   *    name = "projects/foo/locations/us-central1/deployments/bar
   *  - Filter by labels:
   *    - Resources that have a key called 'foo'
   *      labels.foo:*
   *    - Resources that have a key called 'foo' whose value is 'bar'
   *      labels.foo = bar
   *  - Filter by state:
   *    - Deployments in CREATING state.
   *      state=CREATING
   */
  // const filter = 'abc123'
  /**
   *  Optional. Field to use to sort the list.
   */
  // const orderBy = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callListPreviews();

listPreviewsStream(request, options)

listPreviewsStream(request?: protos.google.cloud.config.v1.IListPreviewsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListPreviewsRequest

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

listResources(request, options)

listResources(request?: protos.google.cloud.config.v1.IListResourcesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IResource[],
        protos.google.cloud.config.v1.IListResourcesRequest | null,
        protos.google.cloud.config.v1.IListResourcesResponse
    ]>;

Lists s in a given revision.

Parameters
NameDescription
request IListResourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IResource[], protos.google.cloud.config.v1.IListResourcesRequest | null, protos.google.cloud.config.v1.IListResourcesResponse ]>

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

listResources(request, options, callback)

listResources(request: protos.google.cloud.config.v1.IListResourcesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.config.v1.IListResourcesRequest, protos.google.cloud.config.v1.IListResourcesResponse | null | undefined, protos.google.cloud.config.v1.IResource>): void;
Parameters
NameDescription
request IListResourcesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.config.v1.IListResourcesRequest, protos.google.cloud.config.v1.IListResourcesResponse | null | undefined, protos.google.cloud.config.v1.IResource>
Returns
TypeDescription
void

listResources(request, callback)

listResources(request: protos.google.cloud.config.v1.IListResourcesRequest, callback: PaginationCallback<protos.google.cloud.config.v1.IListResourcesRequest, protos.google.cloud.config.v1.IListResourcesResponse | null | undefined, protos.google.cloud.config.v1.IResource>): void;
Parameters
NameDescription
request IListResourcesRequest
callback PaginationCallback<protos.google.cloud.config.v1.IListResourcesRequest, protos.google.cloud.config.v1.IListResourcesResponse | null | undefined, protos.google.cloud.config.v1.IResource>
Returns
TypeDescription
void

listResourcesAsync(request, options)

listResourcesAsync(request?: protos.google.cloud.config.v1.IListResourcesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.config.v1.IResource>;

Equivalent to listResources, but returns an iterable object.

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

Parameters
NameDescription
request IListResourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.config.v1.IResource>

{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 parent in whose context the Resources are listed. The parent
   *  value is in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
   */
  // const parent = 'abc123'
  /**
   *  When requesting a page of resources, 'page_size' specifies number of
   *  resources to return. If unspecified or set to 0, all resources will be
   *  returned.
   */
  // const pageSize = 1234
  /**
   *  Token returned by previous call to 'ListResources' which specifies the
   *  position in the list from where to continue listing the resources.
   */
  // const pageToken = 'abc123'
  /**
   *  Lists the Resources that match the filter expression. A filter
   *  expression filters the resources listed in the response. The expression
   *  must be of the form '{field} {operator} {value}' where operators: '<', '="">',
   *  '<=', *="" '="">=',
   *  '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
   *  roughly synonymous with equality). {field} can refer to a proto or JSON
   *  field, or a synthetic field. Field names can be camelCase or snake_case.
   *  Examples:
   *  - Filter by name:
   *    name =
   *    "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
   */
  // const filter = 'abc123'
  /**
   *  Field to use to sort the list.
   */
  // const orderBy = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callListResources();

listResourcesStream(request, options)

listResourcesStream(request?: protos.google.cloud.config.v1.IListResourcesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListResourcesRequest

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

listRevisions(request, options)

listRevisions(request?: protos.google.cloud.config.v1.IListRevisionsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.config.v1.IRevision[],
        protos.google.cloud.config.v1.IListRevisionsRequest | null,
        protos.google.cloud.config.v1.IListRevisionsResponse
    ]>;

Lists s of a deployment.

Parameters
NameDescription
request IListRevisionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.config.v1.IRevision[], protos.google.cloud.config.v1.IListRevisionsRequest | null, protos.google.cloud.config.v1.IListRevisionsResponse ]>

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

listRevisions(request, options, callback)

listRevisions(request: protos.google.cloud.config.v1.IListRevisionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.config.v1.IListRevisionsRequest, protos.google.cloud.config.v1.IListRevisionsResponse | null | undefined, protos.google.cloud.config.v1.IRevision>): void;
Parameters
NameDescription
request IListRevisionsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.config.v1.IListRevisionsRequest, protos.google.cloud.config.v1.IListRevisionsResponse | null | undefined, protos.google.cloud.config.v1.IRevision>
Returns
TypeDescription
void

listRevisions(request, callback)

listRevisions(request: protos.google.cloud.config.v1.IListRevisionsRequest, callback: PaginationCallback<protos.google.cloud.config.v1.IListRevisionsRequest, protos.google.cloud.config.v1.IListRevisionsResponse | null | undefined, protos.google.cloud.config.v1.IRevision>): void;
Parameters
NameDescription
request IListRevisionsRequest
callback PaginationCallback<protos.google.cloud.config.v1.IListRevisionsRequest, protos.google.cloud.config.v1.IListRevisionsResponse | null | undefined, protos.google.cloud.config.v1.IRevision>
Returns
TypeDescription
void

listRevisionsAsync(request, options)

listRevisionsAsync(request?: protos.google.cloud.config.v1.IListRevisionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.config.v1.IRevision>;

Equivalent to listRevisions, but returns an iterable object.

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

Parameters
NameDescription
request IListRevisionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.config.v1.IRevision>

{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 parent in whose context the Revisions are listed. The parent
   *  value is in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const parent = 'abc123'
  /**
   *  When requesting a page of resources, `page_size` specifies number of
   *  resources to return. If unspecified or set to 0, all resources will be
   *  returned.
   */
  // const pageSize = 1234
  /**
   *  Token returned by previous call to 'ListRevisions' which specifies the
   *  position in the list from where to continue listing the resources.
   */
  // const pageToken = 'abc123'
  /**
   *  Lists the Revisions that match the filter expression. A filter
   *  expression filters the resources listed in the response. The expression
   *  must be of the form '{field} {operator} {value}' where operators: '<', '="">',
   *  '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
   *  operator which is roughly synonymous with equality). {field} can refer to a
   *  proto or JSON field, or a synthetic field. Field names can be camelCase or
   *  snake_case.
   *  Examples:
   *  - Filter by name:
   *    name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
   *  - Filter by labels:
   *    - Resources that have a key called 'foo'
   *      labels.foo:*
   *    - Resources that have a key called 'foo' whose value is 'bar'
   *      labels.foo = bar
   *  - Filter by state:
   *    - Revisions in CREATING state.
   *      state=CREATING
   */
  // const filter = 'abc123'
  /**
   *  Field to use to sort the list.
   */
  // const orderBy = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callListRevisions();

listRevisionsStream(request, options)

listRevisionsStream(request?: protos.google.cloud.config.v1.IListRevisionsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListRevisionsRequest

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

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

lockDeployment(request, options)

lockDeployment(request?: protos.google.cloud.config.v1.ILockDeploymentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Locks a deployment.

Parameters
NameDescription
request ILockDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.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.
   */
  /**
   *  Required. The name of the deployment in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callLockDeployment();

lockDeployment(request, options, callback)

lockDeployment(request: protos.google.cloud.config.v1.ILockDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ILockDeploymentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

lockDeployment(request, callback)

lockDeployment(request: protos.google.cloud.config.v1.ILockDeploymentRequest, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ILockDeploymentRequest
callback Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

matchDeploymentFromDeploymentName(deploymentName)

matchDeploymentFromDeploymentName(deploymentName: string): string | number;

Parse the deployment from Deployment resource.

Parameter
NameDescription
deploymentName string

A fully-qualified path representing Deployment resource.

Returns
TypeDescription
string | number

{string} A string representing the deployment.

matchDeploymentFromResourceName(resourceName)

matchDeploymentFromResourceName(resourceName: string): string | number;

Parse the deployment from Resource resource.

Parameter
NameDescription
resourceName string

A fully-qualified path representing Resource resource.

Returns
TypeDescription
string | number

{string} A string representing the deployment.

matchDeploymentFromRevisionName(revisionName)

matchDeploymentFromRevisionName(revisionName: string): string | number;

Parse the deployment from Revision resource.

Parameter
NameDescription
revisionName string

A fully-qualified path representing Revision resource.

Returns
TypeDescription
string | number

{string} A string representing the deployment.

matchLocationFromDeploymentName(deploymentName)

matchLocationFromDeploymentName(deploymentName: string): string | number;

Parse the location from Deployment resource.

Parameter
NameDescription
deploymentName string

A fully-qualified path representing Deployment resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromPreviewName(previewName)

matchLocationFromPreviewName(previewName: string): string | number;

Parse the location from Preview resource.

Parameter
NameDescription
previewName string

A fully-qualified path representing Preview resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromResourceName(resourceName)

matchLocationFromResourceName(resourceName: string): string | number;

Parse the location from Resource resource.

Parameter
NameDescription
resourceName string

A fully-qualified path representing Resource resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromRevisionName(revisionName)

matchLocationFromRevisionName(revisionName: string): string | number;

Parse the location from Revision resource.

Parameter
NameDescription
revisionName string

A fully-qualified path representing Revision resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromWorkerPoolName(workerPoolName)

matchLocationFromWorkerPoolName(workerPoolName: string): string | number;

Parse the location from WorkerPool resource.

Parameter
NameDescription
workerPoolName string

A fully-qualified path representing WorkerPool resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchPreviewFromPreviewName(previewName)

matchPreviewFromPreviewName(previewName: string): string | number;

Parse the preview from Preview resource.

Parameter
NameDescription
previewName string

A fully-qualified path representing Preview resource.

Returns
TypeDescription
string | number

{string} A string representing the preview.

matchProjectFromDeploymentName(deploymentName)

matchProjectFromDeploymentName(deploymentName: string): string | number;

Parse the project from Deployment resource.

Parameter
NameDescription
deploymentName string

A fully-qualified path representing Deployment resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromPreviewName(previewName)

matchProjectFromPreviewName(previewName: string): string | number;

Parse the project from Preview resource.

Parameter
NameDescription
previewName string

A fully-qualified path representing Preview resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromResourceName(resourceName)

matchProjectFromResourceName(resourceName: string): string | number;

Parse the project from Resource resource.

Parameter
NameDescription
resourceName string

A fully-qualified path representing Resource resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromRevisionName(revisionName)

matchProjectFromRevisionName(revisionName: string): string | number;

Parse the project from Revision resource.

Parameter
NameDescription
revisionName string

A fully-qualified path representing Revision resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromServiceAccountName(serviceAccountName)

matchProjectFromServiceAccountName(serviceAccountName: string): string | number;

Parse the project from ServiceAccount resource.

Parameter
NameDescription
serviceAccountName string

A fully-qualified path representing ServiceAccount resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromWorkerPoolName(workerPoolName)

matchProjectFromWorkerPoolName(workerPoolName: string): string | number;

Parse the project from WorkerPool resource.

Parameter
NameDescription
workerPoolName string

A fully-qualified path representing WorkerPool resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchResourceFromResourceName(resourceName)

matchResourceFromResourceName(resourceName: string): string | number;

Parse the resource from Resource resource.

Parameter
NameDescription
resourceName string

A fully-qualified path representing Resource resource.

Returns
TypeDescription
string | number

{string} A string representing the resource.

matchRevisionFromResourceName(resourceName)

matchRevisionFromResourceName(resourceName: string): string | number;

Parse the revision from Resource resource.

Parameter
NameDescription
resourceName string

A fully-qualified path representing Resource resource.

Returns
TypeDescription
string | number

{string} A string representing the revision.

matchRevisionFromRevisionName(revisionName)

matchRevisionFromRevisionName(revisionName: string): string | number;

Parse the revision from Revision resource.

Parameter
NameDescription
revisionName string

A fully-qualified path representing Revision resource.

Returns
TypeDescription
string | number

{string} A string representing the revision.

matchServiceAccountFromServiceAccountName(serviceAccountName)

matchServiceAccountFromServiceAccountName(serviceAccountName: string): string | number;

Parse the service_account from ServiceAccount resource.

Parameter
NameDescription
serviceAccountName string

A fully-qualified path representing ServiceAccount resource.

Returns
TypeDescription
string | number

{string} A string representing the service_account.

matchWorkerPoolFromWorkerPoolName(workerPoolName)

matchWorkerPoolFromWorkerPoolName(workerPoolName: string): string | number;

Parse the worker_pool from WorkerPool resource.

Parameter
NameDescription
workerPoolName string

A fully-qualified path representing WorkerPool resource.

Returns
TypeDescription
string | number

{string} A string representing the worker_pool.

previewPath(project, location, preview)

previewPath(project: string, location: string, preview: string): string;

Return a fully-qualified preview resource name string.

Parameters
NameDescription
project string
location string
preview string
Returns
TypeDescription
string

{string} Resource name string.

resourcePath(project, location, deployment, revision, resource)

resourcePath(project: string, location: string, deployment: string, revision: string, resource: string): string;

Return a fully-qualified resource resource name string.

Parameters
NameDescription
project string
location string
deployment string
revision string
resource string
Returns
TypeDescription
string

{string} Resource name string.

revisionPath(project, location, deployment, revision)

revisionPath(project: string, location: string, deployment: string, revision: string): string;

Return a fully-qualified revision resource name string.

Parameters
NameDescription
project string
location string
deployment string
revision string
Returns
TypeDescription
string

{string} Resource name string.

serviceAccountPath(project, serviceAccount)

serviceAccountPath(project: string, serviceAccount: string): string;

Return a fully-qualified serviceAccount resource name string.

Parameters
NameDescription
project string
serviceAccount string
Returns
TypeDescription
string

{string} Resource name string.

setIamPolicy(request, options, callback)

setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
request IamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

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

callback Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>

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

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.Policy]>

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

testIamPermissions(request, options, callback)

testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
request IamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

options CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

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

callback Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>

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

The second parameter to the callback is an object representing .

Returns
TypeDescription
Promise<[google.iam.v1.TestIamPermissionsResponse]>

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

unlockDeployment(request, options)

unlockDeployment(request?: protos.google.cloud.config.v1.IUnlockDeploymentRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Unlocks a locked deployment.

Parameters
NameDescription
request IUnlockDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.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.
   */
  /**
   *  Required. The name of the deployment in the format:
   *  'projects/{project_id}/locations/{location}/deployments/{deployment}'.
   */
  // const name = 'abc123'
  /**
   *  Required. Lock ID of the lock file to be unlocked.
   */
  // const lockId = 1234

  // Imports the Config library
  const {ConfigClient} = require('@google-cloud/config').v1;

  // Instantiates a client
  const configClient = new ConfigClient();

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

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

  callUnlockDeployment();

unlockDeployment(request, options, callback)

unlockDeployment(request: protos.google.cloud.config.v1.IUnlockDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos<