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.
opts
ClientOptions
gaxInstance
typeof gax
| typeof fallback
: loaded instance of google-gax
. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new ConfigClient({fallback: true}, gax); ```
Properties
apiEndpoint
get
apiEndpoint
()
:
string
;
The DNS address for this API service.
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath.
auth
auth
:
gax
.
GoogleAuth
;
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.
universeDomain
get
universeDomain
()
:
string
;
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Methods
cancelOperation(request, options, callback)
cancelOperation
(
request
:
protos
.
google
.
longrunning
.
CancelOperationRequest
,
options
?:
gax
.
CallOptions
|
Callback<protos
.
google
.
protobuf
.
Empty
,
protos
.
google
.
longrunning
.
CancelOperationRequest
,
{}
|
undefined
|
null
> ,
callback
?:
Callback<protos
.
google
.
longrunning
.
CancelOperationRequest
,
protos
.
google
.
protobuf
.
Empty
,
{}
|
undefined
|
null
> )
:
Promise<protos
.
google
.
protobuf
.
Empty
> ;
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
request
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.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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()
.
name
string
The operation name that will be passed.
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.
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 .
request
options
Promise
<[ LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise()
method returns a promise you can await
for. Please see the documentation
for more details and examples.
/**
* 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
;
request
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
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
;
request
callback
Callback
< LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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 .
request
options
Promise
<[ LROperation
< protos.google.cloud.config.v1.IPreview
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise()
method returns a promise you can await
for. Please see the documentation
for more details and examples.
/**
* 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
;
request
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
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
;
request
callback
Callback
< LROperation
< protos.google.cloud.config.v1.IPreview
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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 .
request
options
Promise
<[ LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise()
method returns a promise you can await
for. Please see the documentation
for more details and examples.
/**
* 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
;
request
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
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
;
request
callback
Callback
< LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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
.
request
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.
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 .
request
options
Promise
<[ LROperation
< protos.google.cloud.config.v1.IPreview
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise()
method returns a promise you can await
for. Please see the documentation
for more details and examples.
/**
* 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
;
request
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
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
;
request
callback
Callback
< LROperation
< protos.google.cloud.config.v1.IPreview
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.protobuf.IEmpty
, protos.google.cloud.config.v1.IDeleteStatefileRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.protobuf.IEmpty
, protos.google.cloud.config.v1.IDeleteStatefileRequest
| null | undefined, {} | null | undefined>
void
deploymentPath(project, location, deployment)
deploymentPath
(
project
:
string
,
location
:
string
,
deployment
:
string
)
:
string
;
Return a fully-qualified deployment resource name string.
project
string
location
string
deployment
string
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.
request
options
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
;
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.IStatefile
, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest
| null | undefined, {} | null | undefined>
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
;
callback
Callback
< protos.google.cloud.config.v1.IStatefile
, protos.google.cloud.config.v1.IExportDeploymentStatefileRequest
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.ILockInfo
, protos.google.cloud.config.v1.IExportLockInfoRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.config.v1.ILockInfo
, protos.google.cloud.config.v1.IExportLockInfoRequest
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.IExportPreviewResultResponse
, protos.google.cloud.config.v1.IExportPreviewResultRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.config.v1.IExportPreviewResultResponse
, protos.google.cloud.config.v1.IExportPreviewResultRequest
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.IStatefile
, protos.google.cloud.config.v1.IExportRevisionStatefileRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.config.v1.IStatefile
, protos.google.cloud.config.v1.IExportRevisionStatefileRequest
| null | undefined, {} | null | undefined>
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 .
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IGetDeploymentRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IGetDeploymentRequest
| null | undefined, {} | null | undefined>
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.
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 .
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.
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>
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.
request
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.
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 .
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.IPreview
, protos.google.cloud.config.v1.IGetPreviewRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.config.v1.IPreview
, protos.google.cloud.config.v1.IGetPreviewRequest
| null | undefined, {} | null | undefined>
void
getProjectId()
getProjectId
()
:
Promise<string>
;
Promise
<string>
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
callback
Callback
<string, undefined, undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.IResource
, protos.google.cloud.config.v1.IGetResourceRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.config.v1.IResource
, protos.google.cloud.config.v1.IGetResourceRequest
| null | undefined, {} | null | undefined>
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 .
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.IRevision
, protos.google.cloud.config.v1.IGetRevisionRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.config.v1.IRevision
, protos.google.cloud.config.v1.IGetRevisionRequest
| null | undefined, {} | null | undefined>
void
getTerraformVersion(request, options)
getTerraformVersion
(
request
?:
protos
.
google
.
cloud
.
config
.
v1
.
IGetTerraformVersionRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
config
.
v1
.
ITerraformVersion
,
protos
.
google
.
cloud
.
config
.
v1
.
IGetTerraformVersionRequest
|
undefined
,
{}
|
undefined
]>;
Gets details about a .
request
options
Promise
<[ protos.google.cloud.config.v1.ITerraformVersion
, protos.google.cloud.config.v1.IGetTerraformVersionRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see 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 TerraformVersion. Format:
* 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'
*/
// const name = 'abc123'
// Imports the Config library
const
{
ConfigClient
}
=
require
(
' @google-cloud/config
'
).
v1
;
// Instantiates a client
const
configClient
=
new
ConfigClient
();
async
function
callGetTerraformVersion
()
{
// Construct request
const
request
=
{
name
,
};
// Run request
const
response
=
await
configClient
.
getTerraformVersion
(
request
);
console
.
log
(
response
);
}
callGetTerraformVersion
();
getTerraformVersion(request, options, callback)
getTerraformVersion
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IGetTerraformVersionRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
config
.
v1
.
ITerraformVersion
,
protos
.
google
.
cloud
.
config
.
v1
.
IGetTerraformVersionRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.ITerraformVersion
, protos.google.cloud.config.v1.IGetTerraformVersionRequest
| null | undefined, {} | null | undefined>
void
getTerraformVersion(request, callback)
getTerraformVersion
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IGetTerraformVersionRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
config
.
v1
.
ITerraformVersion
,
protos
.
google
.
cloud
.
config
.
v1
.
IGetTerraformVersionRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.config.v1.ITerraformVersion
, protos.google.cloud.config.v1.IGetTerraformVersionRequest
| null | undefined, {} | null | undefined>
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.
request
options
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
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.config.v1.IStatefile
, protos.google.cloud.config.v1.IImportStatefileRequest
| null | undefined, {} | null | undefined>
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
;
request
callback
Callback
< protos.google.cloud.config.v1.IStatefile
, protos.google.cloud.config.v1.IImportStatefileRequest
| null | undefined, {} | null | undefined>
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.
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.
request
options
Promise
<[ protos.google.cloud.config.v1.IDeployment
[], protos.google.cloud.config.v1.IListDeploymentsRequest
| null, protos.google.cloud.config.v1.IListDeploymentsResponse
]>
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listDeploymentsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listDeployments(request, options, callback)
listDeployments
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IListDeploymentsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
config
.
v1
.
IListDeploymentsRequest
,
protos
.
google
.
cloud
.
config
.
v1
.
IListDeploymentsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
config
.
v1
.
IDeployment
> )
:
void
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.config.v1.IListDeploymentsRequest
, protos.google.cloud.config.v1.IListDeploymentsResponse
| null | undefined, protos.google.cloud.config.v1.IDeployment
>
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.
request
options
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, at most 500 will be returned. The
* maximum value is 1000.
*/
// const pageSize = 1234
/**
* Token returned by previous call to 'ListDeployments' which specifies the
* position in the list from where to continue listing the resources.
*/
// const pageToken = 'abc123'
/**
* Lists the Deployments that match the filter expression. A filter
* expression filters the resources listed in the response. The expression
* must be of the form '{field} {operator} {value}' where operators: '<', '="">',
* '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
* operator which is roughly synonymous with equality). {field} can refer to a
* proto or JSON field, or a synthetic field. Field names can be camelCase or
* snake_case.
* Examples:
* - Filter by name:
* name = "projects/foo/locations/us-central1/deployments/bar
* - Filter by labels:
* - Resources that have a key called 'foo'
* labels.foo:*
* - Resources that have a key called 'foo' whose value is 'bar'
* labels.foo = bar
* - Filter by state:
* - Deployments in CREATING state.
* state=CREATING
*/
// const filter = 'abc123'
/**
* Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config 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
=
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.
request
options
Transform
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listDeploymentsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listLocationsAsync(request, options)
listLocationsAsync
(
request
:
LocationProtos
.
google
.
cloud
.
location
.
IListLocationsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<LocationProtos
.
google
.
cloud
.
location
.
ILocation
> ;
Lists information about the supported locations for this service. Returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
request
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent.
options
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.
request
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.
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.
request
options
Promise
<[ protos.google.cloud.config.v1.IPreview
[], protos.google.cloud.config.v1.IListPreviewsRequest
| null, protos.google.cloud.config.v1.IListPreviewsResponse
]>
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPreviewsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listPreviews(request, options, callback)
listPreviews
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IListPreviewsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
config
.
v1
.
IListPreviewsRequest
,
protos
.
google
.
cloud
.
config
.
v1
.
IListPreviewsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
config
.
v1
.
IPreview
> )
:
void
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.config.v1.IListPreviewsRequest
, protos.google.cloud.config.v1.IListPreviewsResponse
| null | undefined, protos.google.cloud.config.v1.IPreview
>
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.
request
options
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, at most 500 will be returned. The
* maximum value is 1000.
*/
// const pageSize = 1234
/**
* Optional. Token returned by previous call to 'ListDeployments' which
* specifies the position in the list from where to continue listing the
* resources.
*/
// const pageToken = 'abc123'
/**
* Optional. Lists the Deployments that match the filter expression. A filter
* expression filters the resources listed in the response. The expression
* must be of the form '{field} {operator} {value}' where operators: '<', '="">',
* '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
* operator which is roughly synonymous with equality). {field} can refer to a
* proto or JSON field, or a synthetic field. Field names can be camelCase or
* snake_case.
* Examples:
* - Filter by name:
* name = "projects/foo/locations/us-central1/deployments/bar
* - Filter by labels:
* - Resources that have a key called 'foo'
* labels.foo:*
* - Resources that have a key called 'foo' whose value is 'bar'
* labels.foo = bar
* - Filter by state:
* - Deployments in CREATING state.
* state=CREATING
*/
// const filter = 'abc123'
/**
* Optional. Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config 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
=
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.
request
options
Transform
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPreviewsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listResources(request, options)
listResources
(
request
?:
protos
.
google
.
cloud
.
config
.
v1
.
IListResourcesRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
config
.
v1
.
IResource
[],
protos
.
google
.
cloud
.
config
.
v1
.
IListResourcesRequest
|
null
,
protos
.
google
.
cloud
.
config
.
v1
.
IListResourcesResponse
]>;
Lists s in a given revision.
request
options
Promise
<[ protos.google.cloud.config.v1.IResource
[], protos.google.cloud.config.v1.IListResourcesRequest
| null, protos.google.cloud.config.v1.IListResourcesResponse
]>
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listResourcesAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listResources(request, options, callback)
listResources
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IListResourcesRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
config
.
v1
.
IListResourcesRequest
,
protos
.
google
.
cloud
.
config
.
v1
.
IListResourcesResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
config
.
v1
.
IResource
> )
:
void
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.config.v1.IListResourcesRequest
, protos.google.cloud.config.v1.IListResourcesResponse
| null | undefined, protos.google.cloud.config.v1.IResource
>
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.
request
options
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, at most 500 will be returned. The
* maximum value is 1000.
*/
// const pageSize = 1234
/**
* Token returned by previous call to 'ListResources' which specifies the
* position in the list from where to continue listing the resources.
*/
// const pageToken = 'abc123'
/**
* Lists the Resources that match the filter expression. A filter
* expression filters the resources listed in the response. The expression
* must be of the form '{field} {operator} {value}' where operators: '<', '="">',
* '<=', *="" '="">=',
* '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
* roughly synonymous with equality). {field} can refer to a proto or JSON
* field, or a synthetic field. Field names can be camelCase or snake_case.
* Examples:
* - Filter by name:
* name =
* "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
*/
// const filter = 'abc123'
/**
* Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config 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
=
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.
request
options
Transform
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listResourcesAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listRevisions(request, options)
listRevisions
(
request
?:
protos
.
google
.
cloud
.
config
.
v1
.
IListRevisionsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
config
.
v1
.
IRevision
[],
protos
.
google
.
cloud
.
config
.
v1
.
IListRevisionsRequest
|
null
,
protos
.
google
.
cloud
.
config
.
v1
.
IListRevisionsResponse
]>;
Lists s of a deployment.
request
options
Promise
<[ protos.google.cloud.config.v1.IRevision
[], protos.google.cloud.config.v1.IListRevisionsRequest
| null, protos.google.cloud.config.v1.IListRevisionsResponse
]>
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listRevisionsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listRevisions(request, options, callback)
listRevisions
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IListRevisionsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
config
.
v1
.
IListRevisionsRequest
,
protos
.
google
.
cloud
.
config
.
v1
.
IListRevisionsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
config
.
v1
.
IRevision
> )
:
void
;
request
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
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
;
request
callback
PaginationCallback
< protos.google.cloud.config.v1.IListRevisionsRequest
, protos.google.cloud.config.v1.IListRevisionsResponse
| null | undefined, protos.google.cloud.config.v1.IRevision
>
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.
request
options
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, at most 500 will be returned. The
* maximum value is 1000.
*/
// const pageSize = 1234
/**
* Token returned by previous call to 'ListRevisions' which specifies the
* position in the list from where to continue listing the resources.
*/
// const pageToken = 'abc123'
/**
* Lists the Revisions that match the filter expression. A filter
* expression filters the resources listed in the response. The expression
* must be of the form '{field} {operator} {value}' where operators: '<', '="">',
* '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
* operator which is roughly synonymous with equality). {field} can refer to a
* proto or JSON field, or a synthetic field. Field names can be camelCase or
* snake_case.
* Examples:
* - Filter by name:
* name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
* - Filter by labels:
* - Resources that have a key called 'foo'
* labels.foo:*
* - Resources that have a key called 'foo' whose value is 'bar'
* labels.foo = bar
* - Filter by state:
* - Revisions in CREATING state.
* state=CREATING
*/
// const filter = 'abc123'
/**
* Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config 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
=
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.
request
options
Transform
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listRevisionsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listTerraformVersions(request, options)
listTerraformVersions
(
request
?:
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
config
.
v1
.
ITerraformVersion
[],
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsRequest
|
null
,
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsResponse
]>;
Lists s in a given project and location.
request
options
Promise
<[ protos.google.cloud.config.v1.ITerraformVersion
[], protos.google.cloud.config.v1.IListTerraformVersionsRequest
| null, protos.google.cloud.config.v1.IListTerraformVersionsResponse
]>
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listTerraformVersionsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listTerraformVersions(request, options, callback)
listTerraformVersions
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsRequest
,
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
config
.
v1
.
ITerraformVersion
> )
:
void
;
request
options
CallOptions
callback
PaginationCallback
< protos.google.cloud.config.v1.IListTerraformVersionsRequest
, protos.google.cloud.config.v1.IListTerraformVersionsResponse
| null | undefined, protos.google.cloud.config.v1.ITerraformVersion
>
void
listTerraformVersions(request, callback)
listTerraformVersions
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsRequest
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsRequest
,
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
config
.
v1
.
ITerraformVersion
> )
:
void
;
request
callback
PaginationCallback
< protos.google.cloud.config.v1.IListTerraformVersionsRequest
, protos.google.cloud.config.v1.IListTerraformVersionsResponse
| null | undefined, protos.google.cloud.config.v1.ITerraformVersion
>
void
listTerraformVersionsAsync(request, options)
listTerraformVersionsAsync
(
request
?:
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
cloud
.
config
.
v1
.
ITerraformVersion
> ;
Equivalent to listTerraformVersions
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
request
options
AsyncIterable
< protos.google.cloud.config.v1.ITerraformVersion
>
{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 TerraformVersions are listed. The
* parent value is in the format:
* 'projects/{project_id}/locations/{location}'.
*/
// const parent = 'abc123'
/**
* Optional. When requesting a page of resources, 'page_size' specifies number
* of resources to return. If unspecified, at most 500 will be returned. The
* maximum value is 1000.
*/
// const pageSize = 1234
/**
* Optional. Token returned by previous call to 'ListTerraformVersions' which
* specifies the position in the list from where to continue listing the
* resources.
*/
// const pageToken = 'abc123'
/**
* Optional. Lists the TerraformVersions that match the filter expression. A
* filter expression filters the resources listed in the response. The
* expression must be of the form '{field} {operator} {value}' where
* operators: '<', '="">',
* '<=', '="">=', '!=', '=', ':' are supported (colon ':' represents a HAS
* operator which is roughly synonymous with equality). {field} can refer to a
* proto or JSON field, or a synthetic field. Field names can be camelCase or
* snake_case.
*/
// const filter = 'abc123'
/**
* Optional. Field to use to sort the list.
*/
// const orderBy = 'abc123'
// Imports the Config library
const
{
ConfigClient
}
=
require
(
' @google-cloud/config
'
).
v1
;
// Instantiates a client
const
configClient
=
new
ConfigClient
();
async
function
callListTerraformVersions
()
{
// Construct request
const
request
=
{
parent
,
};
// Run request
const
iterable
=
configClient
.
listTerraformVersionsAsync
(
request
);
for
await
(
const
response
of
iterable
)
{
console
.
log
(
response
);
}
}
callListTerraformVersions
();
listTerraformVersionsStream(request, options)
listTerraformVersionsStream
(
request
?:
protos
.
google
.
cloud
.
config
.
v1
.
IListTerraformVersionsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
request
options
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 listTerraformVersionsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
locationPath(project, location)
locationPath
(
project
:
string
,
location
:
string
)
:
string
;
Return a fully-qualified location resource name string.
project
string
location
string
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.
request
options
Promise
<[ LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise()
method returns a promise you can await
for. Please see the documentation
for more details and examples.
/**
* 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
;
request
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
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
;
request
callback
Callback
< LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
void
matchDeploymentFromDeploymentName(deploymentName)
matchDeploymentFromDeploymentName
(
deploymentName
:
string
)
:
string
|
number
;
Parse the deployment from Deployment resource.
deploymentName
string
A fully-qualified path representing Deployment resource.
string | number
{string} A string representing the deployment.
matchDeploymentFromResourceName(resourceName)
matchDeploymentFromResourceName
(
resourceName
:
string
)
:
string
|
number
;
Parse the deployment from Resource resource.
resourceName
string
A fully-qualified path representing Resource resource.
string | number
{string} A string representing the deployment.
matchDeploymentFromRevisionName(revisionName)
matchDeploymentFromRevisionName
(
revisionName
:
string
)
:
string
|
number
;
Parse the deployment from Revision resource.
revisionName
string
A fully-qualified path representing Revision resource.
string | number
{string} A string representing the deployment.
matchLocationFromDeploymentName(deploymentName)
matchLocationFromDeploymentName
(
deploymentName
:
string
)
:
string
|
number
;
Parse the location from Deployment resource.
deploymentName
string
A fully-qualified path representing Deployment resource.
string | number
{string} A string representing the location.
matchLocationFromLocationName(locationName)
matchLocationFromLocationName
(
locationName
:
string
)
:
string
|
number
;
Parse the location from Location resource.
locationName
string
A fully-qualified path representing Location resource.
string | number
{string} A string representing the location.
matchLocationFromPreviewName(previewName)
matchLocationFromPreviewName
(
previewName
:
string
)
:
string
|
number
;
Parse the location from Preview resource.
previewName
string
A fully-qualified path representing Preview resource.
string | number
{string} A string representing the location.
matchLocationFromResourceName(resourceName)
matchLocationFromResourceName
(
resourceName
:
string
)
:
string
|
number
;
Parse the location from Resource resource.
resourceName
string
A fully-qualified path representing Resource resource.
string | number
{string} A string representing the location.
matchLocationFromRevisionName(revisionName)
matchLocationFromRevisionName
(
revisionName
:
string
)
:
string
|
number
;
Parse the location from Revision resource.
revisionName
string
A fully-qualified path representing Revision resource.
string | number
{string} A string representing the location.
matchLocationFromTerraformVersionName(terraformVersionName)
matchLocationFromTerraformVersionName
(
terraformVersionName
:
string
)
:
string
|
number
;
Parse the location from TerraformVersion resource.
terraformVersionName
string
A fully-qualified path representing TerraformVersion resource.
string | number
{string} A string representing the location.
matchLocationFromWorkerPoolName(workerPoolName)
matchLocationFromWorkerPoolName
(
workerPoolName
:
string
)
:
string
|
number
;
Parse the location from WorkerPool resource.
workerPoolName
string
A fully-qualified path representing WorkerPool resource.
string | number
{string} A string representing the location.
matchPreviewFromPreviewName(previewName)
matchPreviewFromPreviewName
(
previewName
:
string
)
:
string
|
number
;
Parse the preview from Preview resource.
previewName
string
A fully-qualified path representing Preview resource.
string | number
{string} A string representing the preview.
matchProjectFromDeploymentName(deploymentName)
matchProjectFromDeploymentName
(
deploymentName
:
string
)
:
string
|
number
;
Parse the project from Deployment resource.
deploymentName
string
A fully-qualified path representing Deployment resource.
string | number
{string} A string representing the project.
matchProjectFromLocationName(locationName)
matchProjectFromLocationName
(
locationName
:
string
)
:
string
|
number
;
Parse the project from Location resource.
locationName
string
A fully-qualified path representing Location resource.
string | number
{string} A string representing the project.
matchProjectFromPreviewName(previewName)
matchProjectFromPreviewName
(
previewName
:
string
)
:
string
|
number
;
Parse the project from Preview resource.
previewName
string
A fully-qualified path representing Preview resource.
string | number
{string} A string representing the project.
matchProjectFromResourceName(resourceName)
matchProjectFromResourceName
(
resourceName
:
string
)
:
string
|
number
;
Parse the project from Resource resource.
resourceName
string
A fully-qualified path representing Resource resource.
string | number
{string} A string representing the project.
matchProjectFromRevisionName(revisionName)
matchProjectFromRevisionName
(
revisionName
:
string
)
:
string
|
number
;
Parse the project from Revision resource.
revisionName
string
A fully-qualified path representing Revision resource.
string | number
{string} A string representing the project.
matchProjectFromServiceAccountName(serviceAccountName)
matchProjectFromServiceAccountName
(
serviceAccountName
:
string
)
:
string
|
number
;
Parse the project from ServiceAccount resource.
serviceAccountName
string
A fully-qualified path representing ServiceAccount resource.
string | number
{string} A string representing the project.
matchProjectFromTerraformVersionName(terraformVersionName)
matchProjectFromTerraformVersionName
(
terraformVersionName
:
string
)
:
string
|
number
;
Parse the project from TerraformVersion resource.
terraformVersionName
string
A fully-qualified path representing TerraformVersion resource.
string | number
{string} A string representing the project.
matchProjectFromWorkerPoolName(workerPoolName)
matchProjectFromWorkerPoolName
(
workerPoolName
:
string
)
:
string
|
number
;
Parse the project from WorkerPool resource.
workerPoolName
string
A fully-qualified path representing WorkerPool resource.
string | number
{string} A string representing the project.
matchResourceFromResourceName(resourceName)
matchResourceFromResourceName
(
resourceName
:
string
)
:
string
|
number
;
Parse the resource from Resource resource.
resourceName
string
A fully-qualified path representing Resource resource.
string | number
{string} A string representing the resource.
matchRevisionFromResourceName(resourceName)
matchRevisionFromResourceName
(
resourceName
:
string
)
:
string
|
number
;
Parse the revision from Resource resource.
resourceName
string
A fully-qualified path representing Resource resource.
string | number
{string} A string representing the revision.
matchRevisionFromRevisionName(revisionName)
matchRevisionFromRevisionName
(
revisionName
:
string
)
:
string
|
number
;
Parse the revision from Revision resource.
revisionName
string
A fully-qualified path representing Revision resource.
string | number
{string} A string representing the revision.
matchServiceAccountFromServiceAccountName(serviceAccountName)
matchServiceAccountFromServiceAccountName
(
serviceAccountName
:
string
)
:
string
|
number
;
Parse the service_account from ServiceAccount resource.
serviceAccountName
string
A fully-qualified path representing ServiceAccount resource.
string | number
{string} A string representing the service_account.
matchTerraformVersionFromTerraformVersionName(terraformVersionName)
matchTerraformVersionFromTerraformVersionName
(
terraformVersionName
:
string
)
:
string
|
number
;
Parse the terraform_version from TerraformVersion resource.
terraformVersionName
string
A fully-qualified path representing TerraformVersion resource.
string | number
{string} A string representing the terraform_version.
matchWorkerPoolFromWorkerPoolName(workerPoolName)
matchWorkerPoolFromWorkerPoolName
(
workerPoolName
:
string
)
:
string
|
number
;
Parse the worker_pool from WorkerPool resource.
workerPoolName
string
A fully-qualified path representing WorkerPool resource.
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.
project
string
location
string
preview
string
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.
project
string
location
string
deployment
string
revision
string
resource
string
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.
project
string
location
string
deployment
string
revision
string
string
{string} Resource name string.
serviceAccountPath(project, serviceAccount)
serviceAccountPath
(
project
:
string
,
serviceAccount
:
string
)
:
string
;
Return a fully-qualified serviceAccount resource name string.
project
string
serviceAccount
string
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.
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 .
Promise
<[ google.iam.v1.Policy
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.
terraformVersionPath(project, location, terraformVersion)
terraformVersionPath
(
project
:
string
,
location
:
string
,
terraformVersion
:
string
)
:
string
;
Return a fully-qualified terraformVersion resource name string.
project
string
location
string
terraformVersion
string
string
{string} Resource name string.
testIamPermissions(request, options, callback)
testIamPermissions
(
request
:
IamProtos
.
google
.
iam
.
v1
.
TestIamPermissionsRequest
,
options
?:
gax
.
CallOptions
|
Callback<IamProtos
.
google
.
iam
.
v1
.
TestIamPermissionsResponse
,
IamProtos
.
google
.
iam
.
v1
.
TestIamPermissionsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> ,
callback
?:
Callback<IamProtos
.
google
.
iam
.
v1
.
TestIamPermissionsResponse
,
IamProtos
.
google
.
iam
.
v1
.
TestIamPermissionsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
Promise
< [
IamProtos
.
google
.
iam
.
v1
.
TestIamPermissionsResponse
]>;
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
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 .
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.
request
options
Promise
<[ LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise()
method returns a promise you can await
for. Please see the documentation
for more details and examples.
/**
* 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
.
google
.
cloud
.
config
.
v1
.
IDeployment
,
protos
.
google
.
cloud
.
config
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
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
unlockDeployment(request, callback)
unlockDeployment
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IUnlockDeploymentRequest
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
config
.
v1
.
IDeployment
,
protos
.
google
.
cloud
.
config
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
void
updateDeployment(request, options)
updateDeployment
(
request
?:
protos
.
google
.
cloud
.
config
.
v1
.
IUpdateDeploymentRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
cloud
.
config
.
v1
.
IDeployment
,
protos
.
google
.
cloud
.
config
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Updates a .
request
options
Promise
<[ LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise()
method returns a promise you can await
for. Please see the documentation
for more details and examples.
/**
* 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
();
updateDeployment(request, options, callback)
updateDeployment
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IUpdateDeploymentRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
config
.
v1
.
IDeployment
,
protos
.
google
.
cloud
.
config
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
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
updateDeployment(request, callback)
updateDeployment
(
request
:
protos
.
google
.
cloud
.
config
.
v1
.
IUpdateDeploymentRequest
,
callback
:
Callback<LROperation<protos
.
google
.
cloud
.
config
.
v1
.
IDeployment
,
protos
.
google
.
cloud
.
config
.
v1
.
IOperationMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< LROperation
< protos.google.cloud.config.v1.IDeployment
, protos.google.cloud.config.v1.IOperationMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
void
workerPoolPath(project, location, workerPool)
workerPoolPath
(
project
:
string
,
location
:
string
,
workerPool
:
string
)
:
string
;
Return a fully-qualified workerPool resource name string.
project
string
location
string
workerPool
string
string
{string} Resource name string.