Class v1.ConfigClient (0.7.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?:typeofgax|typeofgax.fallback);

Construct an instance of ConfigClient.

Parameters
NameDescription
optsClientOptions
gaxInstancetypeofgax | typeoffallback

: loaded instance ofgoogle-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

getapiEndpoint():string;

The DNS address for this API service.

apiEndpoint

staticgetapiEndpoint():string;

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

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

staticgetport():number;

The port for this API service.

scopes

staticgetscopes():string[];

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

servicePath

staticgetservicePath():string;

The DNS address for this API service.

universeDomain

getuniverseDomain():string;

warn

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

Methods

cancelOperation(request, options, callback)

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

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returnsgoogle.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 toCode.CANCELLED.

Parameters
NameDescription
requestCancelOperationRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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
constclient=longrunning.operationsClient();awaitclient.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 bycreateDeployment().

Parameter
NameDescription
namestring

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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallCreateDeployment(){// Construct requestconstrequest={parent,deploymentId,deployment,};// Run requestconst[operation]=awaitconfigClient.createDeployment(request);const[response]=awaitoperation.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 bycreatePreview().

Parameter
NameDescription
namestring

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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallCreatePreview(){// Construct requestconstrequest={parent,preview,};// Run requestconst[operation]=awaitconfigClient.createPreview(request);const[response]=awaitoperation.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 bydeleteDeployment().

Parameter
NameDescription
namestring

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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallDeleteDeployment(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitconfigClient.deleteDeployment(request);const[response]=awaitoperation.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 bydeletePreview().

Parameter
NameDescription
namestring

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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallDeletePreview(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitconfigClient.deletePreview(request);const[response]=awaitoperation.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 bylockDeployment().

Parameter
NameDescription
namestring

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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallLockDeployment(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitconfigClient.lockDeployment(request);const[response]=awaitoperation.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 byunlockDeployment().

Parameter
NameDescription
namestring

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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallUnlockDeployment(){// Construct requestconstrequest={name,lockId,};// Run requestconst[operation]=awaitconfigClient.unlockDeployment(request);const[response]=awaitoperation.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 byupdateDeployment().

Parameter
NameDescription
namestring

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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallUpdateDeployment(){// Construct requestconstrequest={deployment,};// Run requestconst[operation]=awaitconfigClient.updateDeployment(request);const[response]=awaitoperation.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
requestICreateDeploymentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallCreateDeployment(){// Construct requestconstrequest={parent,deploymentId,deployment,};// Run requestconst[operation]=awaitconfigClient.createDeployment(request);const[response]=awaitoperation.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
requestICreateDeploymentRequest
optionsCallOptions
callbackCallback<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
requestICreateDeploymentRequest
callbackCallback<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
requestICreatePreviewRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallCreatePreview(){// Construct requestconstrequest={parent,preview,};// Run requestconst[operation]=awaitconfigClient.createPreview(request);const[response]=awaitoperation.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
requestICreatePreviewRequest
optionsCallOptions
callbackCallback<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
requestICreatePreviewRequest
callbackCallback<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
requestIDeleteDeploymentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallDeleteDeployment(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitconfigClient.deleteDeployment(request);const[response]=awaitoperation.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
requestIDeleteDeploymentRequest
optionsCallOptions
callbackCallback<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
requestIDeleteDeploymentRequest
callbackCallback<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 returnsgoogle.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
requestDeleteOperationRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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
constclient=longrunning.operationsClient();awaitclient.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
requestIDeletePreviewRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallDeletePreview(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitconfigClient.deletePreview(request);const[response]=awaitoperation.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
requestIDeletePreviewRequest
optionsCallOptions
callbackCallback<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
requestIDeletePreviewRequest
callbackCallback<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
requestIDeleteStatefileRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 representingEmpty. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallDeleteStatefile(){// Construct requestconstrequest={name,lockId,};// Run requestconstresponse=awaitconfigClient.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
requestIDeleteStatefileRequest
optionsCallOptions
callbackCallback<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
requestIDeleteStatefileRequest
callbackCallback<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
projectstring
locationstring
deploymentstring
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
requestIExportDeploymentStatefileRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 representingStatefile. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallExportDeploymentStatefile(){// Construct requestconstrequest={parent,};// Run requestconstresponse=awaitconfigClient.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
requestIExportDeploymentStatefileRequest
optionsCallOptions
callbackCallback<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
requestIExportDeploymentStatefileRequest
callbackCallback<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
requestIExportLockInfoRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 representingLockInfo. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallExportLockInfo(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitconfigClient.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
requestIExportLockInfoRequest
optionsCallOptions
callbackCallback<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
requestIExportLockInfoRequest
callbackCallback<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
requestIExportPreviewResultRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 representingExportPreviewResultResponse. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallExportPreviewResult(){// Construct requestconstrequest={parent,};// Run requestconstresponse=awaitconfigClient.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
requestIExportPreviewResultRequest
optionsCallOptions
callbackCallback<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
requestIExportPreviewResultRequest
callbackCallback<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
requestIExportRevisionStatefileRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 representingStatefile. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallExportRevisionStatefile(){// Construct requestconstrequest={parent,};// Run requestconstresponse=awaitconfigClient.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
requestIExportRevisionStatefileRequest
optionsCallOptions
callbackCallback<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
requestIExportRevisionStatefileRequest
callbackCallback<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
requestIGetDeploymentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallGetDeployment(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitconfigClient.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
requestIGetDeploymentRequest
optionsCallOptions
callbackCallback<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
requestIGetDeploymentRequest
callbackCallback<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
requestIamProtos.google.iam.v1.GetIamPolicyRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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
requestLocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

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

Call options. SeeCallOptions for more details.

callbackCallback<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 thedocumentation for more details and examples.

Example
const[response]=awaitclient.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
requestGetOperationRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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
constclient=longrunning.operationsClient();constname='';const[response]=awaitclient.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
requestIGetPreviewRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallGetPreview(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitconfigClient.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
requestIGetPreviewRequest
optionsCallOptions
callbackCallback<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
requestIGetPreviewRequest
callbackCallback<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
callbackCallback<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
requestIGetResourceRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallGetResource(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitconfigClient.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
requestIGetResourceRequest
optionsCallOptions
callbackCallback<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
requestIGetResourceRequest
callbackCallback<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
requestIGetRevisionRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallGetRevision(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitconfigClient.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
requestIGetRevisionRequest
optionsCallOptions
callbackCallback<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
requestIGetRevisionRequest
callbackCallback<protos.google.cloud.config.v1.IRevision,protos.google.cloud.config.v1.IGetRevisionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTerraformVersion(request, options)

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

Gets details about a .

Parameters
NameDescription
requestIGetTerraformVersionRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see thedocumentation 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 TerraformVersion. Format:   *  'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'   */// const name = 'abc123'// Imports the Config libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallGetTerraformVersion(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitconfigClient.getTerraformVersion(request);console.log(response);}callGetTerraformVersion();

getTerraformVersion(request, options, callback)

getTerraformVersion(request:protos.google.cloud.config.v1.IGetTerraformVersionRequest,options:CallOptions,callback:Callback<protos.google.cloud.config.v1.ITerraformVersion,protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetTerraformVersionRequest
optionsCallOptions
callbackCallback<protos.google.cloud.config.v1.ITerraformVersion,protos.google.cloud.config.v1.IGetTerraformVersionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getTerraformVersion(request, callback)

getTerraformVersion(request:protos.google.cloud.config.v1.IGetTerraformVersionRequest,callback:Callback<protos.google.cloud.config.v1.ITerraformVersion,protos.google.cloud.config.v1.IGetTerraformVersionRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetTerraformVersionRequest
callbackCallback<protos.google.cloud.config.v1.ITerraformVersion,protos.google.cloud.config.v1.IGetTerraformVersionRequest | 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
requestIImportStatefileRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 representingStatefile. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallImportStatefile(){// Construct requestconstrequest={parent,lockId,};// Run requestconstresponse=awaitconfigClient.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
requestIImportStatefileRequest
optionsCallOptions
callbackCallback<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
requestIImportStatefileRequest
callbackCallback<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
requestIListDeploymentsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistDeploymentsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation 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
requestIListDeploymentsRequest
optionsCallOptions
callbackPaginationCallback<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
requestIListDeploymentsRequest
callbackPaginationCallback<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 tolistDeployments, but returns an iterable object.

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

Parameters
NameDescription
requestIListDeploymentsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Object} An iterable Object that allowsasync 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 thedocumentation 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, at most 500 will be returned. The   *  maximum value is 1000.   */// 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallListDeployments(){// Construct requestconstrequest={parent,};// Run requestconstiterable=configClient.listDeploymentsAsync(request);forawait(constresponseofiterable){console.log(response);}}callListDeployments();

listDeploymentsStream(request, options)

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

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

Parameters
NameDescription
requestIListDeploymentsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistDeploymentsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation 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
requestLocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Object} An iterable Object that allowsasync 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 thedocumentation for more details and examples.

Example
constiterable=client.listLocationsAsync(request);forawait(constresponseofiterable){// 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 returnsUNIMPLEMENTED. Returns an iterable object.

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

Parameters
NameDescription
requestListOperationsRequest

The request object that will be sent.

optionsCallOptions

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

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

{Object} An iterable Object that conforms toiteration protocols.

Example
constclient=longrunning.operationsClient();forawait(constresponseofclient.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
requestIListPreviewsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistPreviewsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation 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
requestIListPreviewsRequest
optionsCallOptions
callbackPaginationCallback<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
requestIListPreviewsRequest
callbackPaginationCallback<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 tolistPreviews, but returns an iterable object.

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

Parameters
NameDescription
requestIListPreviewsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Object} An iterable Object that allowsasync 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 thedocumentation 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, at most 500 will be returned. The   *  maximum value is 1000.   */// 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallListPreviews(){// Construct requestconstrequest={parent,};// Run requestconstiterable=configClient.listPreviewsAsync(request);forawait(constresponseofiterable){console.log(response);}}callListPreviews();

listPreviewsStream(request, options)

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

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

Parameters
NameDescription
requestIListPreviewsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistPreviewsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation 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 in a given revision.

Parameters
NameDescription
requestIListResourcesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistResourcesAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation 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
requestIListResourcesRequest
optionsCallOptions
callbackPaginationCallback<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
requestIListResourcesRequest
callbackPaginationCallback<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 tolistResources, but returns an iterable object.

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

Parameters
NameDescription
requestIListResourcesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Object} An iterable Object that allowsasync 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 thedocumentation 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, at most 500 will be returned. The   *  maximum value is 1000.   */// 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallListResources(){// Construct requestconstrequest={parent,};// Run requestconstiterable=configClient.listResourcesAsync(request);forawait(constresponseofiterable){console.log(response);}}callListResources();

listResourcesStream(request, options)

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

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

Parameters
NameDescription
requestIListResourcesRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistResourcesAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation 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
requestIListRevisionsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistRevisionsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation 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
requestIListRevisionsRequest
optionsCallOptions
callbackPaginationCallback<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
requestIListRevisionsRequest
callbackPaginationCallback<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 tolistRevisions, but returns an iterable object.

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

Parameters
NameDescription
requestIListRevisionsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Object} An iterable Object that allowsasync 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 thedocumentation 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, at most 500 will be returned. The   *  maximum value is 1000.   */// 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallListRevisions(){// Construct requestconstrequest={parent,};// Run requestconstiterable=configClient.listRevisionsAsync(request);forawait(constresponseofiterable){console.log(response);}}callListRevisions();

listRevisionsStream(request, options)

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

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

Parameters
NameDescription
requestIListRevisionsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistRevisionsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listTerraformVersions(request, options)

listTerraformVersions(request?:protos.google.cloud.config.v1.IListTerraformVersionsRequest,options?:CallOptions):Promise<[protos.google.cloud.config.v1.ITerraformVersion[],protos.google.cloud.config.v1.IListTerraformVersionsRequest|null,protos.google.cloud.config.v1.IListTerraformVersionsResponse]>;

Lists s in a given project and location.

Parameters
NameDescription
requestIListTerraformVersionsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.config.v1.ITerraformVersion[],protos.google.cloud.config.v1.IListTerraformVersionsRequest | null,protos.google.cloud.config.v1.IListTerraformVersionsResponse ]>

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

listTerraformVersions(request, options, callback)

listTerraformVersions(request:protos.google.cloud.config.v1.IListTerraformVersionsRequest,options:CallOptions,callback:PaginationCallback<protos.google.cloud.config.v1.IListTerraformVersionsRequest,protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined,protos.google.cloud.config.v1.ITerraformVersion>):void;
Parameters
NameDescription
requestIListTerraformVersionsRequest
optionsCallOptions
callbackPaginationCallback<protos.google.cloud.config.v1.IListTerraformVersionsRequest,protos.google.cloud.config.v1.IListTerraformVersionsResponse | null | undefined,protos.google.cloud.config.v1.ITerraformVersion>
Returns
TypeDescription
void

listTerraformVersions(request, callback)

listTerraformVersions(request:protos.google.cloud.config.v1.IListTerraformVersionsRequest,callback:PaginationCallback<protos.google.cloud.config.v1.IListTerraformVersionsRequest,protos.google.cloud.config.v1.IListTerraformVersionsResponse|null|undefined,protos.google.cloud.config.v1.ITerraformVersion>):void;
Parameters
NameDescription
requestIListTerraformVersionsRequest
callbackPaginationCallback<protos.google.cloud.config.v1.IListTerraformVersionsRequest,protos.google.cloud.config.v1.IListTerraformVersionsResponse | null | undefined,protos.google.cloud.config.v1.ITerraformVersion>
Returns
TypeDescription
void

listTerraformVersionsAsync(request, options)

listTerraformVersionsAsync(request?:protos.google.cloud.config.v1.IListTerraformVersionsRequest,options?:CallOptions):AsyncIterable<protos.google.cloud.config.v1.ITerraformVersion>;

Equivalent tolistTerraformVersions, but returns an iterable object.

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

Parameters
NameDescription
requestIListTerraformVersionsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Object} An iterable Object that allowsasync 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 thedocumentation 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 TerraformVersions 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, at most 500 will be returned. The   *  maximum value is 1000.   */// const pageSize = 1234/**   *  Optional. Token returned by previous call to 'ListTerraformVersions' which   *  specifies the position in the list from where to continue listing the   *  resources.   */// const pageToken = 'abc123'/**   *  Optional. Lists the TerraformVersions 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.   */// const filter = 'abc123'/**   *  Optional. Field to use to sort the list.   */// const orderBy = 'abc123'// Imports the Config libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallListTerraformVersions(){// Construct requestconstrequest={parent,};// Run requestconstiterable=configClient.listTerraformVersionsAsync(request);forawait(constresponseofiterable){console.log(response);}}callListTerraformVersions();

listTerraformVersionsStream(request, options)

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

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

Parameters
NameDescription
requestIListTerraformVersionsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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 usinglistTerraformVersionsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
NameDescription
projectstring
locationstring
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
requestILockDeploymentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallLockDeployment(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitconfigClient.lockDeployment(request);const[response]=awaitoperation.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
requestILockDeploymentRequest
optionsCallOptions
callbackCallback<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
requestILockDeploymentRequest
callbackCallback<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
deploymentNamestring

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
resourceNamestring

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
revisionNamestring

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
deploymentNamestring

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
locationNamestring

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
previewNamestring

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
resourceNamestring

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
revisionNamestring

A fully-qualified path representing Revision resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromTerraformVersionName(terraformVersionName)

matchLocationFromTerraformVersionName(terraformVersionName:string):string|number;

Parse the location from TerraformVersion resource.

Parameter
NameDescription
terraformVersionNamestring

A fully-qualified path representing TerraformVersion 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
workerPoolNamestring

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
previewNamestring

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
deploymentNamestring

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
locationNamestring

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
previewNamestring

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
resourceNamestring

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
revisionNamestring

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
serviceAccountNamestring

A fully-qualified path representing ServiceAccount resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromTerraformVersionName(terraformVersionName)

matchProjectFromTerraformVersionName(terraformVersionName:string):string|number;

Parse the project from TerraformVersion resource.

Parameter
NameDescription
terraformVersionNamestring

A fully-qualified path representing TerraformVersion 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
workerPoolNamestring

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
resourceNamestring

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
resourceNamestring

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
revisionNamestring

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
serviceAccountNamestring

A fully-qualified path representing ServiceAccount resource.

Returns
TypeDescription
string | number

{string} A string representing the service_account.

matchTerraformVersionFromTerraformVersionName(terraformVersionName)

matchTerraformVersionFromTerraformVersionName(terraformVersionName:string):string|number;

Parse the terraform_version from TerraformVersion resource.

Parameter
NameDescription
terraformVersionNamestring

A fully-qualified path representing TerraformVersion resource.

Returns
TypeDescription
string | number

{string} A string representing the terraform_version.

matchWorkerPoolFromWorkerPoolName(workerPoolName)

matchWorkerPoolFromWorkerPoolName(workerPoolName:string):string|number;

Parse the worker_pool from WorkerPool resource.

Parameter
NameDescription
workerPoolNamestring

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
projectstring
locationstring
previewstring
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
projectstring
locationstring
deploymentstring
revisionstring
resourcestring
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
projectstring
locationstring
deploymentstring
revisionstring
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
projectstring
serviceAccountstring
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
requestIamProtos.google.iam.v1.SetIamPolicyRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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.

terraformVersionPath(project, location, terraformVersion)

terraformVersionPath(project:string,location:string,terraformVersion:string):string;

Return a fully-qualified terraformVersion resource name string.

Parameters
NameDescription
projectstring
locationstring
terraformVersionstring
Returns
TypeDescription
string

{string} Resource name string.

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
requestIamProtos.google.iam.v1.TestIamPermissionsRequest

The request object that will be sent.

optionsCallOptions |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. Seegax.CallOptions for the details.

callbackCallback<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
requestIUnlockDeploymentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallUnlockDeployment(){// Construct requestconstrequest={name,lockId,};// Run requestconst[operation]=awaitconfigClient.unlockDeployment(request);const[response]=awaitoperation.promise();console.log(response);}callUnlockDeployment();

unlockDeployment(request, options, callback)

unlockDeployment(request:protos.google.cloud.config.v1.IUnlockDeploymentRequest,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
requestIUnlockDeploymentRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.config.v1.IDeployment,protos.google.cloud.config.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

unlockDeployment(request, callback)

unlockDeployment(request:protos.google.cloud.config.v1.IUnlockDeploymentRequest,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
requestIUnlockDeploymentRequest
callbackCallback<LROperation<protos.google.cloud.config.v1.IDeployment,protos.google.cloud.config.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateDeployment(request, options)

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

Updates a .

Parameters
NameDescription
requestIUpdateDeploymentRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions 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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{ConfigClient}=require('@google-cloud/config').v1;// Instantiates a clientconstconfigClient=newConfigClient();asyncfunctioncallUpdateDeployment(){// Construct requestconstrequest={deployment,};// Run requestconst[operation]=awaitconfigClient.updateDeployment(request);const[response]=awaitoperation.promise();console.log(response);}callUpdateDeployment();

updateDeployment(request, options, callback)

updateDeployment(request:protos.google.cloud.config.v1.IUpdateDeploymentRequest,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
requestIUpdateDeploymentRequest
optionsCallOptions
callbackCallback<LROperation<protos.google.cloud.config.v1.IDeployment,protos.google.cloud.config.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateDeployment(request, callback)

updateDeployment(request:protos.google.cloud.config.v1.IUpdateDeploymentRequest,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
requestIUpdateDeploymentRequest
callbackCallback<LROperation<protos.google.cloud.config.v1.IDeployment,protos.google.cloud.config.v1.IOperationMetadata>,protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

workerPoolPath(project, location, workerPool)

workerPoolPath(project:string,location:string,workerPool:string):string;

Return a fully-qualified workerPool resource name string.

Parameters
NameDescription
projectstring
locationstring
workerPoolstring
Returns
TypeDescription
string

{string} Resource name string.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.