Infrastructure Manager is a managed service that automates the deployment and management of Google Cloud infrastructure resources. v1
Package
@google-cloud/configConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of ConfigClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
configStub
configStub?: Promise<{
[name: string]: Function;
}>;
descriptors
descriptors: Descriptors;
iamClient
iamClient: IamClient;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
locationsClient
locationsClient: LocationsClient;
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
cancelOperation(request, options, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
CancelOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
checkCreateDeploymentProgress(name)
checkCreateDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;
Check the status of the long running operation returned by createDeployment()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the Deployment is created. The parent
* value is in the format: 'projects/{project_id}/locations/{location}'.
*/
// const parent = 'abc123'
/**
* Required. The Deployment ID.
*/
// const deploymentId = 'abc123'
/**
* Required. Deployment google.cloud.config.v1.Deployment resource to be
* created.
*/
// const deployment = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callCreateDeployment() {
// Construct request
const request = {
parent,
deploymentId,
deployment,
};
// Run request
const [operation] = await configClient.createDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateDeployment();
checkCreatePreviewProgress(name)
checkCreatePreviewProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Preview, protos.google.cloud.config.v1.OperationMetadata>>;
Check the status of the long running operation returned by createPreview()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.config.v1.Preview, protos.google.cloud.config.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the Preview is created. The parent
* value is in the format: 'projects/{project_id}/locations/{location}'.
*/
// const parent = 'abc123'
/**
* Optional. The preview ID.
*/
// const previewId = 'abc123'
/**
* Required. Preview google.cloud.config.v1.Preview resource to be created.
*/
// const preview = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callCreatePreview() {
// Construct request
const request = {
parent,
preview,
};
// Run request
const [operation] = await configClient.createPreview(request);
const [response] = await operation.promise();
console.log(response);
}
callCreatePreview();
checkDeleteDeploymentProgress(name)
checkDeleteDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteDeployment()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Deployment in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. If set to true, any revisions for this deployment will also be
* deleted. (Otherwise, the request will only work if the deployment has no
* revisions.)
*/
// const force = true
/**
* Optional. Policy on how resources actuated by the deployment should be
* deleted. If unspecified, the default behavior is to delete the underlying
* resources.
*/
// const deletePolicy = {}
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callDeleteDeployment() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await configClient.deleteDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteDeployment();
checkDeletePreviewProgress(name)
checkDeletePreviewProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Preview, protos.google.cloud.config.v1.OperationMetadata>>;
Check the status of the long running operation returned by deletePreview()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.config.v1.Preview, protos.google.cloud.config.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Preview in the format:
* 'projects/{project_id}/locations/{location}/previews/{preview}'.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callDeletePreview() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await configClient.deletePreview(request);
const [response] = await operation.promise();
console.log(response);
}
callDeletePreview();
checkLockDeploymentProgress(name)
checkLockDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;
Check the status of the long running operation returned by lockDeployment()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the deployment in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callLockDeployment() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await configClient.lockDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callLockDeployment();
checkUnlockDeploymentProgress(name)
checkUnlockDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;
Check the status of the long running operation returned by unlockDeployment()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the deployment in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
/**
* Required. Lock ID of the lock file to be unlocked.
*/
// const lockId = 1234
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callUnlockDeployment() {
// Construct request
const request = {
name,
lockId,
};
// Run request
const [operation] = await configClient.unlockDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callUnlockDeployment();
checkUpdateDeploymentProgress(name)
checkUpdateDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>>;
Check the status of the long running operation returned by updateDeployment()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.config.v1.Deployment, protos.google.cloud.config.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Optional. Field mask used to specify the fields to be overwritten in the
* Deployment resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then all fields will be overwritten.
*/
// const updateMask = {}
/**
* Required. Deployment google.cloud.config.v1.Deployment to update.
* The deployment's `name` field is used to identify the resource to be
* updated. Format:
* `projects/{project}/locations/{location}/deployments/{deployment}`
*/
// const deployment = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callUpdateDeployment() {
// Construct request
const request = {
deployment,
};
// Run request
const [operation] = await configClient.updateDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateDeployment();
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ICreateDeploymentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the Deployment is created. The parent
* value is in the format: 'projects/{project_id}/locations/{location}'.
*/
// const parent = 'abc123'
/**
* Required. The Deployment ID.
*/
// const deploymentId = 'abc123'
/**
* Required. Deployment google.cloud.config.v1.Deployment resource to be
* created.
*/
// const deployment = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callCreateDeployment() {
// Construct request
const request = {
parent,
deploymentId,
deployment,
};
// Run request
const [operation] = await configClient.createDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateDeployment();
createDeployment(request, options, callback)
createDeployment(request: protos.google.cloud.config.v1.ICreateDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateDeploymentRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ICreateDeploymentRequest
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ICreatePreviewRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the Preview is created. The parent
* value is in the format: 'projects/{project_id}/locations/{location}'.
*/
// const parent = 'abc123'
/**
* Optional. The preview ID.
*/
// const previewId = 'abc123'
/**
* Required. Preview google.cloud.config.v1.Preview resource to be created.
*/
// const preview = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callCreatePreview() {
// Construct request
const request = {
parent,
preview,
};
// Run request
const [operation] = await configClient.createPreview(request);
const [response] = await operation.promise();
console.log(response);
}
callCreatePreview();
createPreview(request, options, callback)
createPreview(request: protos.google.cloud.config.v1.ICreatePreviewRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreatePreviewRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ICreatePreviewRequest
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IDeleteDeploymentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Deployment in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. If set to true, any revisions for this deployment will also be
* deleted. (Otherwise, the request will only work if the deployment has no
* revisions.)
*/
// const force = true
/**
* Optional. Policy on how resources actuated by the deployment should be
* deleted. If unspecified, the default behavior is to delete the underlying
* resources.
*/
// const deletePolicy = {}
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callDeleteDeployment() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await configClient.deleteDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteDeployment();
deleteDeployment(request, options, callback)
deleteDeployment(request: protos.google.cloud.config.v1.IDeleteDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteDeploymentRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IDeleteDeploymentRequest
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteOperation(request, options, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
Parameters | |
---|---|
Name | Description |
request |
DeleteOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
deletePreview(request, options)
deletePreview(request?: protos.google.cloud.config.v1.IDeletePreviewRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a .
Parameters | |
---|---|
Name | Description |
request |
IDeletePreviewRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Preview in the format:
* 'projects/{project_id}/locations/{location}/previews/{preview}'.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callDeletePreview() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await configClient.deletePreview(request);
const [response] = await operation.promise();
console.log(response);
}
callDeletePreview();
deletePreview(request, options, callback)
deletePreview(request: protos.google.cloud.config.v1.IDeletePreviewRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeletePreviewRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IDeletePreviewRequest
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IDeleteStatefileRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.config.v1.IDeleteStatefileRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the deployment in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
/**
* Required. Lock ID of the lock file to verify that the user who is deleting
* the state file previously locked the Deployment.
*/
// const lockId = 1234
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callDeleteStatefile() {
// Construct request
const request = {
name,
lockId,
};
// Run request
const response = await configClient.deleteStatefile(request);
console.log(response);
}
callDeleteStatefile();
deleteStatefile(request, options, callback)
deleteStatefile(request: protos.google.cloud.config.v1.IDeleteStatefileRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.config.v1.IDeleteStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteStatefileRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.config.v1.IDeleteStatefileRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IDeleteStatefileRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.config.v1.IDeleteStatefileRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deploymentPath(project, location, deployment)
deploymentPath(project: string, location: string, deployment: string): string;
Return a fully-qualified deployment resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
deployment |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExportDeploymentStatefileRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IStatefile,
(protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing Statefile. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the statefile is listed. The parent
* value is in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const parent = 'abc123'
/**
* Optional. If this flag is set to true, the exported deployment state file
* will be the draft state. This will enable the draft file to be validated
* before copying it over to the working state on unlock.
*/
// const draft = true
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callExportDeploymentStatefile() {
// Construct request
const request = {
parent,
};
// Run request
const response = await configClient.exportDeploymentStatefile(request);
console.log(response);
}
callExportDeploymentStatefile();
exportDeploymentStatefile(request, options, callback)
exportDeploymentStatefile(request: protos.google.cloud.config.v1.IExportDeploymentStatefileRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportDeploymentStatefileRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExportDeploymentStatefileRequest
|
callback |
Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExportLockInfoRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.ILockInfo,
protos.google.cloud.config.v1.IExportLockInfoRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing LockInfo. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the deployment in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callExportLockInfo() {
// Construct request
const request = {
name,
};
// Run request
const response = await configClient.exportLockInfo(request);
console.log(response);
}
callExportLockInfo();
exportLockInfo(request, options, callback)
exportLockInfo(request: protos.google.cloud.config.v1.IExportLockInfoRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.ILockInfo, protos.google.cloud.config.v1.IExportLockInfoRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportLockInfoRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.ILockInfo, protos.google.cloud.config.v1.IExportLockInfoRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExportLockInfoRequest
|
callback |
Callback<protos.google.cloud.config.v1.ILockInfo, protos.google.cloud.config.v1.IExportLockInfoRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExportPreviewResultRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IExportPreviewResultResponse,
protos.google.cloud.config.v1.IExportPreviewResultRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing ExportPreviewResultResponse. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The preview whose results should be exported. The preview value
* is in the format:
* 'projects/{project_id}/locations/{location}/previews/{preview}'.
*/
// const parent = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callExportPreviewResult() {
// Construct request
const request = {
parent,
};
// Run request
const response = await configClient.exportPreviewResult(request);
console.log(response);
}
callExportPreviewResult();
exportPreviewResult(request, options, callback)
exportPreviewResult(request: protos.google.cloud.config.v1.IExportPreviewResultRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IExportPreviewResultResponse, protos.google.cloud.config.v1.IExportPreviewResultRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportPreviewResultRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.IExportPreviewResultResponse, protos.google.cloud.config.v1.IExportPreviewResultRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExportPreviewResultRequest
|
callback |
Callback<protos.google.cloud.config.v1.IExportPreviewResultResponse, protos.google.cloud.config.v1.IExportPreviewResultRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExportRevisionStatefileRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IStatefile,
protos.google.cloud.config.v1.IExportRevisionStatefileRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing Statefile. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the statefile is listed. The parent
* value is in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
*/
// const parent = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callExportRevisionStatefile() {
// Construct request
const request = {
parent,
};
// Run request
const response = await configClient.exportRevisionStatefile(request);
console.log(response);
}
callExportRevisionStatefile();
exportRevisionStatefile(request, options, callback)
exportRevisionStatefile(request: protos.google.cloud.config.v1.IExportRevisionStatefileRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportRevisionStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IExportRevisionStatefileRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportRevisionStatefileRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IExportRevisionStatefileRequest
|
callback |
Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IExportRevisionStatefileRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IGetDeploymentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IDeployment,
protos.google.cloud.config.v1.IGetDeploymentRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the deployment. Format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callGetDeployment() {
// Construct request
const request = {
name,
};
// Run request
const response = await configClient.getDeployment(request);
console.log(response);
}
callGetDeployment();
getDeployment(request, options, callback)
getDeployment(request: protos.google.cloud.config.v1.IGetDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetDeploymentRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IGetDeploymentRequest
|
callback |
Callback<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IGetDeploymentRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.GetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
Promise<google.cloud.location.ILocation> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
const [response] = await client.getLocation(request);
getOperation(request, options, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
Parameters | |
---|---|
Name | Description |
request |
GetOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<[protos.google.longrunning.Operation]> |
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getPreview(request, options)
getPreview(request?: protos.google.cloud.config.v1.IGetPreviewRequest, options?: CallOptions): Promise<[
protos.google.cloud.config.v1.IPreview,
protos.google.cloud.config.v1.IGetPreviewRequest | undefined,
{} | undefined
]>;
Gets details about a .
Parameters | |
---|---|
Name | Description |
request |
IGetPreviewRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IPreview,
protos.google.cloud.config.v1.IGetPreviewRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the preview. Format:
* 'projects/{project_id}/locations/{location}/previews/{preview}'.
*/
// const name = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callGetPreview() {
// Construct request
const request = {
name,
};
// Run request
const response = await configClient.getPreview(request);
console.log(response);
}
callGetPreview();
getPreview(request, options, callback)
getPreview(request: protos.google.cloud.config.v1.IGetPreviewRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IGetPreviewRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetPreviewRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IGetPreviewRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IGetPreviewRequest
|
callback |
Callback<protos.google.cloud.config.v1.IPreview, protos.google.cloud.config.v1.IGetPreviewRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
void |
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 | |
---|---|
Name | Description |
request |
IGetResourceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IResource,
protos.google.cloud.config.v1.IGetResourceRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Resource in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
*/
// const name = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callGetResource() {
// Construct request
const request = {
name,
};
// Run request
const response = await configClient.getResource(request);
console.log(response);
}
callGetResource();
getResource(request, options, callback)
getResource(request: protos.google.cloud.config.v1.IGetResourceRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IResource, protos.google.cloud.config.v1.IGetResourceRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetResourceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.IResource, protos.google.cloud.config.v1.IGetResourceRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IGetResourceRequest
|
callback |
Callback<protos.google.cloud.config.v1.IResource, protos.google.cloud.config.v1.IGetResourceRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IGetRevisionRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IRevision,
protos.google.cloud.config.v1.IGetRevisionRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Revision in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
*/
// const name = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callGetRevision() {
// Construct request
const request = {
name,
};
// Run request
const response = await configClient.getRevision(request);
console.log(response);
}
callGetRevision();
getRevision(request, options, callback)
getRevision(request: protos.google.cloud.config.v1.IGetRevisionRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IRevision, protos.google.cloud.config.v1.IGetRevisionRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetRevisionRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.IRevision, protos.google.cloud.config.v1.IGetRevisionRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IGetRevisionRequest
|
callback |
Callback<protos.google.cloud.config.v1.IRevision, protos.google.cloud.config.v1.IGetRevisionRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IImportStatefileRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IStatefile,
protos.google.cloud.config.v1.IImportStatefileRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing Statefile. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the statefile is listed. The parent
* value is in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const parent = 'abc123'
/**
* Required. Lock ID of the lock file to verify that the user who is importing
* the state file previously locked the Deployment.
*/
// const lockId = 1234
/**
* Optional.
*/
// const skipDraft = true
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callImportStatefile() {
// Construct request
const request = {
parent,
lockId,
};
// Run request
const response = await configClient.importStatefile(request);
console.log(response);
}
callImportStatefile();
importStatefile(request, options, callback)
importStatefile(request: protos.google.cloud.config.v1.IImportStatefileRequest, options: CallOptions, callback: Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IImportStatefileRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IImportStatefileRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IImportStatefileRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IImportStatefileRequest
|
callback |
Callback<protos.google.cloud.config.v1.IStatefile, protos.google.cloud.config.v1.IImportStatefileRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns | |
---|---|
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub. |
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 | |
---|---|
Name | Description |
request |
IListDeploymentsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IDeployment[],
protos.google.cloud.config.v1.IListDeploymentsRequest | null,
protos.google.cloud.config.v1.IListDeploymentsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
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 | |
---|---|
Name | Description |
request |
IListDeploymentsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.config.v1.IListDeploymentsRequest, protos.google.cloud.config.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.config.v1.IDeployment>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IListDeploymentsRequest
|
callback |
PaginationCallback<protos.google.cloud.config.v1.IListDeploymentsRequest, protos.google.cloud.config.v1.IListDeploymentsResponse | null | undefined, protos.google.cloud.config.v1.IDeployment>
|
Returns | |
---|---|
Type | Description |
void |
listDeploymentsAsync(request, options)
listDeploymentsAsync(request?: protos.google.cloud.config.v1.IListDeploymentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.config.v1.IDeployment>;
Equivalent to listDeployments
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListDeploymentsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.config.v1.IDeployment> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the Deployments are listed. The
* parent value is in the format:
* 'projects/{project_id}/locations/{location}'.
*/
// const parent = 'abc123'
/**
* When requesting a page of resources, 'page_size' specifies number of
* resources to return. If unspecified or set to 0, all resources will be
* returned.
*/
// const pageSize = 1234
/**
* Token returned by previous call to 'ListDeployments' which specifies the
* position in the list from where to continue listing the resources.
*/
// const pageToken = 'abc123'
/**
* Lists the Deployments that match the filter expression. A filter
* expression filters the resources listed in the response. The expression
* must be of the form '{field} {operator} {value}' where operators: '<', '="">',
* '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
* operator which is roughly synonymous with equality). {field} can refer to a
* proto or JSON field, or a synthetic field. Field names can be camelCase or
* snake_case.
* Examples:
* - Filter by name:
* name = "projects/foo/locations/us-central1/deployments/bar
* - Filter by labels:
* - Resources that have a key called 'foo'
* labels.foo:*
* - Resources that have a key called 'foo' whose value is 'bar'
* labels.foo = bar
* - Filter by state:
* - Deployments in CREATING state.
* state=CREATING
*/
// const filter = 'abc123'
/**
* Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callListDeployments() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await configClient.listDeploymentsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDeployments();
listDeploymentsStream(request, options)
listDeploymentsStream(request?: protos.google.cloud.config.v1.IListDeploymentsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListDeploymentsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
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 | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<google.cloud.location.ILocation> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED
. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
Parameters | |
---|---|
Name | Description |
request |
ListOperationsRequest
The request object that will be sent. |
options |
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.longrunning.ListOperationsResponse> | {Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
listPreviews(request, options)
listPreviews(request?: protos.google.cloud.config.v1.IListPreviewsRequest, options?: CallOptions): Promise<[
protos.google.cloud.config.v1.IPreview[],
protos.google.cloud.config.v1.IListPreviewsRequest | null,
protos.google.cloud.config.v1.IListPreviewsResponse
]>;
Lists s in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
IListPreviewsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IPreview[],
protos.google.cloud.config.v1.IListPreviewsRequest | null,
protos.google.cloud.config.v1.IListPreviewsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
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 | |
---|---|
Name | Description |
request |
IListPreviewsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.config.v1.IListPreviewsRequest, protos.google.cloud.config.v1.IListPreviewsResponse | null | undefined, protos.google.cloud.config.v1.IPreview>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IListPreviewsRequest
|
callback |
PaginationCallback<protos.google.cloud.config.v1.IListPreviewsRequest, protos.google.cloud.config.v1.IListPreviewsResponse | null | undefined, protos.google.cloud.config.v1.IPreview>
|
Returns | |
---|---|
Type | Description |
void |
listPreviewsAsync(request, options)
listPreviewsAsync(request?: protos.google.cloud.config.v1.IListPreviewsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.config.v1.IPreview>;
Equivalent to listPreviews
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListPreviewsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.config.v1.IPreview> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the Previews are listed. The parent
* value is in the format: 'projects/{project_id}/locations/{location}'.
*/
// const parent = 'abc123'
/**
* Optional. When requesting a page of resources, 'page_size' specifies number
* of resources to return. If unspecified or set to 0, all resources will be
* returned.
*/
// const pageSize = 1234
/**
* Optional. Token returned by previous call to 'ListDeployments' which
* specifies the position in the list from where to continue listing the
* resources.
*/
// const pageToken = 'abc123'
/**
* Optional. Lists the Deployments that match the filter expression. A filter
* expression filters the resources listed in the response. The expression
* must be of the form '{field} {operator} {value}' where operators: '<', '="">',
* '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
* operator which is roughly synonymous with equality). {field} can refer to a
* proto or JSON field, or a synthetic field. Field names can be camelCase or
* snake_case.
* Examples:
* - Filter by name:
* name = "projects/foo/locations/us-central1/deployments/bar
* - Filter by labels:
* - Resources that have a key called 'foo'
* labels.foo:*
* - Resources that have a key called 'foo' whose value is 'bar'
* labels.foo = bar
* - Filter by state:
* - Deployments in CREATING state.
* state=CREATING
*/
// const filter = 'abc123'
/**
* Optional. Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callListPreviews() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await configClient.listPreviewsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListPreviews();
listPreviewsStream(request, options)
listPreviewsStream(request?: protos.google.cloud.config.v1.IListPreviewsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListPreviewsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listResources(request, options)
listResources(request?: protos.google.cloud.config.v1.IListResourcesRequest, options?: CallOptions): Promise<[
protos.google.cloud.config.v1.IResource[],
protos.google.cloud.config.v1.IListResourcesRequest | null,
protos.google.cloud.config.v1.IListResourcesResponse
]>;
Lists s in a given revision.
Parameters | |
---|---|
Name | Description |
request |
IListResourcesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IResource[],
protos.google.cloud.config.v1.IListResourcesRequest | null,
protos.google.cloud.config.v1.IListResourcesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
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 | |
---|---|
Name | Description |
request |
IListResourcesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.config.v1.IListResourcesRequest, protos.google.cloud.config.v1.IListResourcesResponse | null | undefined, protos.google.cloud.config.v1.IResource>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IListResourcesRequest
|
callback |
PaginationCallback<protos.google.cloud.config.v1.IListResourcesRequest, protos.google.cloud.config.v1.IListResourcesResponse | null | undefined, protos.google.cloud.config.v1.IResource>
|
Returns | |
---|---|
Type | Description |
void |
listResourcesAsync(request, options)
listResourcesAsync(request?: protos.google.cloud.config.v1.IListResourcesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.config.v1.IResource>;
Equivalent to listResources
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListResourcesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.config.v1.IResource> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the Resources are listed. The parent
* value is in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
*/
// const parent = 'abc123'
/**
* When requesting a page of resources, 'page_size' specifies number of
* resources to return. If unspecified or set to 0, all resources will be
* returned.
*/
// const pageSize = 1234
/**
* Token returned by previous call to 'ListResources' which specifies the
* position in the list from where to continue listing the resources.
*/
// const pageToken = 'abc123'
/**
* Lists the Resources that match the filter expression. A filter
* expression filters the resources listed in the response. The expression
* must be of the form '{field} {operator} {value}' where operators: '<', '="">',
* '<=', *="" '="">=',
* '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
* roughly synonymous with equality). {field} can refer to a proto or JSON
* field, or a synthetic field. Field names can be camelCase or snake_case.
* Examples:
* - Filter by name:
* name =
* "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
*/
// const filter = 'abc123'
/**
* Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callListResources() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await configClient.listResourcesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListResources();
listResourcesStream(request, options)
listResourcesStream(request?: protos.google.cloud.config.v1.IListResourcesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListResourcesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
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 | |
---|---|
Name | Description |
request |
IListRevisionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.config.v1.IRevision[],
protos.google.cloud.config.v1.IListRevisionsRequest | null,
protos.google.cloud.config.v1.IListRevisionsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
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 | |
---|---|
Name | Description |
request |
IListRevisionsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.config.v1.IListRevisionsRequest, protos.google.cloud.config.v1.IListRevisionsResponse | null | undefined, protos.google.cloud.config.v1.IRevision>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IListRevisionsRequest
|
callback |
PaginationCallback<protos.google.cloud.config.v1.IListRevisionsRequest, protos.google.cloud.config.v1.IListRevisionsResponse | null | undefined, protos.google.cloud.config.v1.IRevision>
|
Returns | |
---|---|
Type | Description |
void |
listRevisionsAsync(request, options)
listRevisionsAsync(request?: protos.google.cloud.config.v1.IListRevisionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.config.v1.IRevision>;
Equivalent to listRevisions
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListRevisionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.config.v1.IRevision> | {Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent in whose context the Revisions are listed. The parent
* value is in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const parent = 'abc123'
/**
* When requesting a page of resources, `page_size` specifies number of
* resources to return. If unspecified or set to 0, all resources will be
* returned.
*/
// const pageSize = 1234
/**
* Token returned by previous call to 'ListRevisions' which specifies the
* position in the list from where to continue listing the resources.
*/
// const pageToken = 'abc123'
/**
* Lists the Revisions that match the filter expression. A filter
* expression filters the resources listed in the response. The expression
* must be of the form '{field} {operator} {value}' where operators: '<', '="">',
* '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
* operator which is roughly synonymous with equality). {field} can refer to a
* proto or JSON field, or a synthetic field. Field names can be camelCase or
* snake_case.
* Examples:
* - Filter by name:
* name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
* - Filter by labels:
* - Resources that have a key called 'foo'
* labels.foo:*
* - Resources that have a key called 'foo' whose value is 'bar'
* labels.foo = bar
* - Filter by state:
* - Revisions in CREATING state.
* state=CREATING
*/
// const filter = 'abc123'
/**
* Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callListRevisions() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await configClient.listRevisionsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListRevisions();
listRevisionsStream(request, options)
listRevisionsStream(request?: protos.google.cloud.config.v1.IListRevisionsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListRevisionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ILockDeploymentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the deployment in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callLockDeployment() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await configClient.lockDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callLockDeployment();
lockDeployment(request, options, callback)
lockDeployment(request: protos.google.cloud.config.v1.ILockDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ILockDeploymentRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ILockDeploymentRequest
|
callback |
Callback<LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
matchDeploymentFromDeploymentName(deploymentName)
matchDeploymentFromDeploymentName(deploymentName: string): string | number;
Parse the deployment from Deployment resource.
Parameter | |
---|---|
Name | Description |
deploymentName |
string
A fully-qualified path representing Deployment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the deployment. |
matchDeploymentFromResourceName(resourceName)
matchDeploymentFromResourceName(resourceName: string): string | number;
Parse the deployment from Resource resource.
Parameter | |
---|---|
Name | Description |
resourceName |
string
A fully-qualified path representing Resource resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the deployment. |
matchDeploymentFromRevisionName(revisionName)
matchDeploymentFromRevisionName(revisionName: string): string | number;
Parse the deployment from Revision resource.
Parameter | |
---|---|
Name | Description |
revisionName |
string
A fully-qualified path representing Revision resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the deployment. |
matchLocationFromDeploymentName(deploymentName)
matchLocationFromDeploymentName(deploymentName: string): string | number;
Parse the location from Deployment resource.
Parameter | |
---|---|
Name | Description |
deploymentName |
string
A fully-qualified path representing Deployment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromPreviewName(previewName)
matchLocationFromPreviewName(previewName: string): string | number;
Parse the location from Preview resource.
Parameter | |
---|---|
Name | Description |
previewName |
string
A fully-qualified path representing Preview resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromResourceName(resourceName)
matchLocationFromResourceName(resourceName: string): string | number;
Parse the location from Resource resource.
Parameter | |
---|---|
Name | Description |
resourceName |
string
A fully-qualified path representing Resource resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromRevisionName(revisionName)
matchLocationFromRevisionName(revisionName: string): string | number;
Parse the location from Revision resource.
Parameter | |
---|---|
Name | Description |
revisionName |
string
A fully-qualified path representing Revision resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromWorkerPoolName(workerPoolName)
matchLocationFromWorkerPoolName(workerPoolName: string): string | number;
Parse the location from WorkerPool resource.
Parameter | |
---|---|
Name | Description |
workerPoolName |
string
A fully-qualified path representing WorkerPool resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchPreviewFromPreviewName(previewName)
matchPreviewFromPreviewName(previewName: string): string | number;
Parse the preview from Preview resource.
Parameter | |
---|---|
Name | Description |
previewName |
string
A fully-qualified path representing Preview resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the preview. |
matchProjectFromDeploymentName(deploymentName)
matchProjectFromDeploymentName(deploymentName: string): string | number;
Parse the project from Deployment resource.
Parameter | |
---|---|
Name | Description |
deploymentName |
string
A fully-qualified path representing Deployment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromPreviewName(previewName)
matchProjectFromPreviewName(previewName: string): string | number;
Parse the project from Preview resource.
Parameter | |
---|---|
Name | Description |
previewName |
string
A fully-qualified path representing Preview resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromResourceName(resourceName)
matchProjectFromResourceName(resourceName: string): string | number;
Parse the project from Resource resource.
Parameter | |
---|---|
Name | Description |
resourceName |
string
A fully-qualified path representing Resource resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRevisionName(revisionName)
matchProjectFromRevisionName(revisionName: string): string | number;
Parse the project from Revision resource.
Parameter | |
---|---|
Name | Description |
revisionName |
string
A fully-qualified path representing Revision resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromServiceAccountName(serviceAccountName)
matchProjectFromServiceAccountName(serviceAccountName: string): string | number;
Parse the project from ServiceAccount resource.
Parameter | |
---|---|
Name | Description |
serviceAccountName |
string
A fully-qualified path representing ServiceAccount resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromWorkerPoolName(workerPoolName)
matchProjectFromWorkerPoolName(workerPoolName: string): string | number;
Parse the project from WorkerPool resource.
Parameter | |
---|---|
Name | Description |
workerPoolName |
string
A fully-qualified path representing WorkerPool resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchResourceFromResourceName(resourceName)
matchResourceFromResourceName(resourceName: string): string | number;
Parse the resource from Resource resource.
Parameter | |
---|---|
Name | Description |
resourceName |
string
A fully-qualified path representing Resource resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the resource. |
matchRevisionFromResourceName(resourceName)
matchRevisionFromResourceName(resourceName: string): string | number;
Parse the revision from Resource resource.
Parameter | |
---|---|
Name | Description |
resourceName |
string
A fully-qualified path representing Resource resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the revision. |
matchRevisionFromRevisionName(revisionName)
matchRevisionFromRevisionName(revisionName: string): string | number;
Parse the revision from Revision resource.
Parameter | |
---|---|
Name | Description |
revisionName |
string
A fully-qualified path representing Revision resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the revision. |
matchServiceAccountFromServiceAccountName(serviceAccountName)
matchServiceAccountFromServiceAccountName(serviceAccountName: string): string | number;
Parse the service_account from ServiceAccount resource.
Parameter | |
---|---|
Name | Description |
serviceAccountName |
string
A fully-qualified path representing ServiceAccount resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the service_account. |
matchWorkerPoolFromWorkerPoolName(workerPoolName)
matchWorkerPoolFromWorkerPoolName(workerPoolName: string): string | number;
Parse the worker_pool from WorkerPool resource.
Parameter | |
---|---|
Name | Description |
workerPoolName |
string
A fully-qualified path representing WorkerPool resource. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
project |
string
|
location |
string
|
preview |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
project |
string
|
location |
string
|
deployment |
string
|
revision |
string
|
resource |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
project |
string
|
location |
string
|
deployment |
string
|
revision |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
serviceAccountPath(project, serviceAccount)
serviceAccountPath(project: string, serviceAccount: string): string;
Return a fully-qualified serviceAccount resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
serviceAccount |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.SetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<[google.iam.v1.Policy]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
testIamPermissions(request, options, callback)
testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.TestIamPermissionsRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
IUnlockDeploymentRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.config.v1.IDeployment, protos.google.cloud.config.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the deployment in the format:
* 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
*/
// const name = 'abc123'
/**
* Required. Lock ID of the lock file to be unlocked.
*/
// const lockId = 1234
// Imports the Config library
const {ConfigClient} = require('@google-cloud/config').v1;
// Instantiates a client
const configClient = new ConfigClient();
async function callUnlockDeployment() {
// Construct request
const request = {
name,
lockId,
};
// Run request
const [operation] = await configClient.unlockDeployment(request);
const [response] = await operation.promise();
console.log(response);
}
callUnlockDeployment();
unlockDeployment(request, options, callback)
unlockDeployment(request: protos.google.cloud.config.v1.IUnlockDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos<