Class ConfigClient (0.21.0)

GitHub RepositoryProduct Reference

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

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   Deployment response = configClient.getDeployment(name);
 }
 

Note: close() needs to be called on the ConfigClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListDeployments

Lists Deployments in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listDeployments(ListDeploymentsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listDeployments(LocationName parent)

  • listDeployments(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listDeploymentsPagedCallable()

  • listDeploymentsCallable()

GetDeployment

Gets details about a Deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getDeployment(GetDeploymentRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getDeployment(DeploymentName name)

  • getDeployment(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getDeploymentCallable()

CreateDeployment

Creates a Deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createDeploymentAsync(CreateDeploymentRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createDeploymentAsync(LocationName parent, Deployment deployment, String deploymentId)

  • createDeploymentAsync(String parent, Deployment deployment, String deploymentId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createDeploymentOperationCallable()

  • createDeploymentCallable()

UpdateDeployment

Updates a Deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateDeploymentAsync(UpdateDeploymentRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateDeploymentAsync(Deployment deployment, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateDeploymentOperationCallable()

  • updateDeploymentCallable()

DeleteDeployment

Deletes a Deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteDeploymentAsync(DeleteDeploymentRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteDeploymentAsync(DeploymentName name)

  • deleteDeploymentAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteDeploymentOperationCallable()

  • deleteDeploymentCallable()

ListRevisions

Lists Revisions of a deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRevisions(ListRevisionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRevisions(DeploymentName parent)

  • listRevisions(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRevisionsPagedCallable()

  • listRevisionsCallable()

GetRevision

Gets details about a Revision.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRevision(GetRevisionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRevision(RevisionName name)

  • getRevision(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRevisionCallable()

GetResource

Gets details about a Resource deployed by Infra Manager.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getResource(GetResourceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getResource(ResourceName name)

  • getResource(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getResourceCallable()

ListResources

Lists Resources in a given revision.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listResources(ListResourcesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listResources(RevisionName parent)

  • listResources(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listResourcesPagedCallable()

  • listResourcesCallable()

ExportDeploymentStatefile

Exports Terraform state file from a given deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • exportDeploymentStatefile(ExportDeploymentStatefileRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • exportDeploymentStatefileCallable()

ExportRevisionStatefile

Exports Terraform state file from a given revision.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • exportRevisionStatefile(ExportRevisionStatefileRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • exportRevisionStatefileCallable()

ImportStatefile

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • importStatefile(ImportStatefileRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • importStatefile(DeploymentName parent, long lockId)

  • importStatefile(String parent, long lockId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • importStatefileCallable()

DeleteStatefile

Deletes Terraform state file in a given deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteStatefile(DeleteStatefileRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteStatefile(DeploymentName name)

  • deleteStatefile(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteStatefileCallable()

LockDeployment

Locks a deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • lockDeploymentAsync(LockDeploymentRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • lockDeploymentAsync(DeploymentName name)

  • lockDeploymentAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • lockDeploymentOperationCallable()

  • lockDeploymentCallable()

UnlockDeployment

Unlocks a locked deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • unlockDeploymentAsync(UnlockDeploymentRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • unlockDeploymentAsync(DeploymentName name, long lockId)

  • unlockDeploymentAsync(String name, long lockId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • unlockDeploymentOperationCallable()

  • unlockDeploymentCallable()

ExportLockInfo

Exports the lock info on a locked deployment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • exportLockInfo(ExportLockInfoRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • exportLockInfo(DeploymentName name)

  • exportLockInfo(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • exportLockInfoCallable()

CreatePreview

Creates a Preview.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createPreviewAsync(CreatePreviewRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createPreviewAsync(LocationName parent, Preview preview)

  • createPreviewAsync(String parent, Preview preview)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createPreviewOperationCallable()

  • createPreviewCallable()

GetPreview

Gets details about a Preview.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getPreview(GetPreviewRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getPreview(PreviewName name)

  • getPreview(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getPreviewCallable()

ListPreviews

Lists Previews in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listPreviews(ListPreviewsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listPreviews(LocationName parent)

  • listPreviews(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPreviewsPagedCallable()

  • listPreviewsCallable()

DeletePreview

Deletes a Preview.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deletePreviewAsync(DeletePreviewRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deletePreviewAsync(PreviewName name)

  • deletePreviewAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deletePreviewOperationCallable()

  • deletePreviewCallable()

ExportPreviewResult

Export Preview results.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • exportPreviewResult(ExportPreviewResultRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • exportPreviewResultCallable()

ListTerraformVersions

Lists TerraformVersions in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listTerraformVersions(ListTerraformVersionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listTerraformVersions(LocationName parent)

  • listTerraformVersions(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listTerraformVersionsPagedCallable()

  • listTerraformVersionsCallable()

GetTerraformVersion

Gets details about a TerraformVersion.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getTerraformVersion(GetTerraformVersionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getTerraformVersion(TerraformVersionName name)

  • getTerraformVersion(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getTerraformVersionCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

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

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of ConfigSettings to create(). For example:

To customize credentials:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 ConfigSettings configSettings =
     ConfigSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ConfigClient configClient = ConfigClient.create(configSettings);
 

To customize the endpoint:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 ConfigSettings configSettings = ConfigSettings.newBuilder().setEndpoint(myEndpoint).build();
 ConfigClient configClient = ConfigClient.create(configSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 ConfigSettings configSettings = ConfigSettings.newHttpJsonBuilder().build();
 ConfigClient configClient = ConfigClient.create(configSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > ConfigClient

Static Methods

create()

public static final ConfigClient create()

Constructs an instance of ConfigClient with default settings.

Returns
Type Description
ConfigClient
Exceptions
Type Description
IOException

create(ConfigSettings settings)

public static final ConfigClient create(ConfigSettings settings)

Constructs an instance of ConfigClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings ConfigSettings
Returns
Type Description
ConfigClient
Exceptions
Type Description
IOException

create(ConfigStub stub)

public static final ConfigClient create(ConfigStub stub)

Constructs an instance of ConfigClient, using the given stub for making calls. This is for advanced usage - prefer using create(ConfigSettings).

Parameter
Name Description
stub ConfigStub
Returns
Type Description
ConfigClient

Constructors

ConfigClient(ConfigSettings settings)

protected ConfigClient(ConfigSettings settings)

Constructs an instance of ConfigClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings ConfigSettings

ConfigClient(ConfigStub stub)

protected ConfigClient(ConfigStub stub)
Parameter
Name Description
stub ConfigStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createDeploymentAsync(CreateDeploymentRequest request)

public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(CreateDeploymentRequest request)

Creates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   CreateDeploymentRequest request =
       CreateDeploymentRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setDeploymentId("deploymentId-136894784")
           .setDeployment(Deployment.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Deployment response = configClient.createDeploymentAsync(request).get();
 }
 
Parameter
Name Description
request CreateDeploymentRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

createDeploymentAsync(LocationName parent, Deployment deployment, String deploymentId)

public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(LocationName parent, Deployment deployment, String deploymentId)

Creates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Deployment deployment = Deployment.newBuilder().build();
   String deploymentId = "deploymentId-136894784";
   Deployment response =
       configClient.createDeploymentAsync(parent, deployment, deploymentId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent in whose context the Deployment is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

deployment Deployment

Required. Deployment resource to be created.

deploymentId String

Required. The Deployment ID.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

createDeploymentAsync(String parent, Deployment deployment, String deploymentId)

public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(String parent, Deployment deployment, String deploymentId)

Creates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Deployment deployment = Deployment.newBuilder().build();
   String deploymentId = "deploymentId-136894784";
   Deployment response =
       configClient.createDeploymentAsync(parent, deployment, deploymentId).get();
 }
 
Parameters
Name Description
parent String

Required. The parent in whose context the Deployment is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

deployment Deployment

Required. Deployment resource to be created.

deploymentId String

Required. The Deployment ID.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

createDeploymentCallable()

public final UnaryCallable<CreateDeploymentRequest,Operation> createDeploymentCallable()

Creates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   CreateDeploymentRequest request =
       CreateDeploymentRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setDeploymentId("deploymentId-136894784")
           .setDeployment(Deployment.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = configClient.createDeploymentCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateDeploymentRequest,Operation>

createDeploymentOperationCallable()

public final OperationCallable<CreateDeploymentRequest,Deployment,OperationMetadata> createDeploymentOperationCallable()

Creates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   CreateDeploymentRequest request =
       CreateDeploymentRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setDeploymentId("deploymentId-136894784")
           .setDeployment(Deployment.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Deployment, OperationMetadata> future =
       configClient.createDeploymentOperationCallable().futureCall(request);
   // Do something.
   Deployment response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateDeploymentRequest,Deployment,OperationMetadata>

createPreviewAsync(CreatePreviewRequest request)

public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(CreatePreviewRequest request)

Creates a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   CreatePreviewRequest request =
       CreatePreviewRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPreviewId("previewId-832627965")
           .setPreview(Preview.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Preview response = configClient.createPreviewAsync(request).get();
 }
 
Parameter
Name Description
request CreatePreviewRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Preview,OperationMetadata>

createPreviewAsync(LocationName parent, Preview preview)

public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(LocationName parent, Preview preview)

Creates a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Preview preview = Preview.newBuilder().build();
   Preview response = configClient.createPreviewAsync(parent, preview).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

preview Preview

Required. Preview resource to be created.

Returns
Type Description
OperationFuture<Preview,OperationMetadata>

createPreviewAsync(String parent, Preview preview)

public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(String parent, Preview preview)

Creates a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Preview preview = Preview.newBuilder().build();
   Preview response = configClient.createPreviewAsync(parent, preview).get();
 }
 
Parameters
Name Description
parent String

Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

preview Preview

Required. Preview resource to be created.

Returns
Type Description
OperationFuture<Preview,OperationMetadata>

createPreviewCallable()

public final UnaryCallable<CreatePreviewRequest,Operation> createPreviewCallable()

Creates a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   CreatePreviewRequest request =
       CreatePreviewRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPreviewId("previewId-832627965")
           .setPreview(Preview.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = configClient.createPreviewCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreatePreviewRequest,Operation>

createPreviewOperationCallable()

public final OperationCallable<CreatePreviewRequest,Preview,OperationMetadata> createPreviewOperationCallable()

Creates a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   CreatePreviewRequest request =
       CreatePreviewRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPreviewId("previewId-832627965")
           .setPreview(Preview.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Preview, OperationMetadata> future =
       configClient.createPreviewOperationCallable().futureCall(request);
   // Do something.
   Preview response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreatePreviewRequest,Preview,OperationMetadata>

deleteDeploymentAsync(DeleteDeploymentRequest request)

public final OperationFuture<Deployment,OperationMetadata> deleteDeploymentAsync(DeleteDeploymentRequest request)

Deletes a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeleteDeploymentRequest request =
       DeleteDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   Deployment response = configClient.deleteDeploymentAsync(request).get();
 }
 
Parameter
Name Description
request DeleteDeploymentRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

deleteDeploymentAsync(DeploymentName name)

public final OperationFuture<Deployment,OperationMetadata> deleteDeploymentAsync(DeploymentName name)

Deletes a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   Deployment response = configClient.deleteDeploymentAsync(name).get();
 }
 
Parameter
Name Description
name DeploymentName

Required. The name of the Deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

deleteDeploymentAsync(String name)

public final OperationFuture<Deployment,OperationMetadata> deleteDeploymentAsync(String name)

Deletes a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
   Deployment response = configClient.deleteDeploymentAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the Deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

deleteDeploymentCallable()

public final UnaryCallable<DeleteDeploymentRequest,Operation> deleteDeploymentCallable()

Deletes a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeleteDeploymentRequest request =
       DeleteDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   ApiFuture<Operation> future = configClient.deleteDeploymentCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteDeploymentRequest,Operation>

deleteDeploymentOperationCallable()

public final OperationCallable<DeleteDeploymentRequest,Deployment,OperationMetadata> deleteDeploymentOperationCallable()

Deletes a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeleteDeploymentRequest request =
       DeleteDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   OperationFuture<Deployment, OperationMetadata> future =
       configClient.deleteDeploymentOperationCallable().futureCall(request);
   // Do something.
   Deployment response = future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteDeploymentRequest,Deployment,OperationMetadata>

deletePreviewAsync(DeletePreviewRequest request)

public final OperationFuture<Preview,OperationMetadata> deletePreviewAsync(DeletePreviewRequest request)

Deletes a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeletePreviewRequest request =
       DeletePreviewRequest.newBuilder()
           .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
           .setRequestId("requestId693933066")
           .build();
   Preview response = configClient.deletePreviewAsync(request).get();
 }
 
Parameter
Name Description
request DeletePreviewRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Preview,OperationMetadata>

deletePreviewAsync(PreviewName name)

public final OperationFuture<Preview,OperationMetadata> deletePreviewAsync(PreviewName name)

Deletes a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   PreviewName name = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]");
   Preview response = configClient.deletePreviewAsync(name).get();
 }
 
Parameter
Name Description
name PreviewName

Required. The name of the Preview in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.

Returns
Type Description
OperationFuture<Preview,OperationMetadata>

deletePreviewAsync(String name)

public final OperationFuture<Preview,OperationMetadata> deletePreviewAsync(String name)

Deletes a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString();
   Preview response = configClient.deletePreviewAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the Preview in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.

Returns
Type Description
OperationFuture<Preview,OperationMetadata>

deletePreviewCallable()

public final UnaryCallable<DeletePreviewRequest,Operation> deletePreviewCallable()

Deletes a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeletePreviewRequest request =
       DeletePreviewRequest.newBuilder()
           .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = configClient.deletePreviewCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DeletePreviewRequest,Operation>

deletePreviewOperationCallable()

public final OperationCallable<DeletePreviewRequest,Preview,OperationMetadata> deletePreviewOperationCallable()

Deletes a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeletePreviewRequest request =
       DeletePreviewRequest.newBuilder()
           .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Preview, OperationMetadata> future =
       configClient.deletePreviewOperationCallable().futureCall(request);
   // Do something.
   Preview response = future.get();
 }
 
Returns
Type Description
OperationCallable<DeletePreviewRequest,Preview,OperationMetadata>

deleteStatefile(DeleteStatefileRequest request)

public final void deleteStatefile(DeleteStatefileRequest request)

Deletes Terraform state file in a given deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeleteStatefileRequest request =
       DeleteStatefileRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setLockId(338696367)
           .build();
   configClient.deleteStatefile(request);
 }
 
Parameter
Name Description
request DeleteStatefileRequest

The request object containing all of the parameters for the API call.

deleteStatefile(DeploymentName name)

public final void deleteStatefile(DeploymentName name)

Deletes Terraform state file in a given deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   configClient.deleteStatefile(name);
 }
 
Parameter
Name Description
name DeploymentName

Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

deleteStatefile(String name)

public final void deleteStatefile(String name)

Deletes Terraform state file in a given deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
   configClient.deleteStatefile(name);
 }
 
Parameter
Name Description
name String

Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

deleteStatefileCallable()

public final UnaryCallable<DeleteStatefileRequest,Empty> deleteStatefileCallable()

Deletes Terraform state file in a given deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeleteStatefileRequest request =
       DeleteStatefileRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setLockId(338696367)
           .build();
   ApiFuture<Empty> future = configClient.deleteStatefileCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteStatefileRequest,Empty>

exportDeploymentStatefile(ExportDeploymentStatefileRequest request)

public final Statefile exportDeploymentStatefile(ExportDeploymentStatefileRequest request)

Exports Terraform state file from a given deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ExportDeploymentStatefileRequest request =
       ExportDeploymentStatefileRequest.newBuilder()
           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setDraft(true)
           .build();
   Statefile response = configClient.exportDeploymentStatefile(request);
 }
 
Parameter
Name Description
request ExportDeploymentStatefileRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Statefile

exportDeploymentStatefileCallable()

public final UnaryCallable<ExportDeploymentStatefileRequest,Statefile> exportDeploymentStatefileCallable()

Exports Terraform state file from a given deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ExportDeploymentStatefileRequest request =
       ExportDeploymentStatefileRequest.newBuilder()
           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setDraft(true)
           .build();
   ApiFuture<Statefile> future =
       configClient.exportDeploymentStatefileCallable().futureCall(request);
   // Do something.
   Statefile response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ExportDeploymentStatefileRequest,Statefile>

exportLockInfo(DeploymentName name)

public final LockInfo exportLockInfo(DeploymentName name)

Exports the lock info on a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   LockInfo response = configClient.exportLockInfo(name);
 }
 
Parameter
Name Description
name DeploymentName

Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
LockInfo

exportLockInfo(ExportLockInfoRequest request)

public final LockInfo exportLockInfo(ExportLockInfoRequest request)

Exports the lock info on a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ExportLockInfoRequest request =
       ExportLockInfoRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .build();
   LockInfo response = configClient.exportLockInfo(request);
 }
 
Parameter
Name Description
request ExportLockInfoRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
LockInfo

exportLockInfo(String name)

public final LockInfo exportLockInfo(String name)

Exports the lock info on a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
   LockInfo response = configClient.exportLockInfo(name);
 }
 
Parameter
Name Description
name String

Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
LockInfo

exportLockInfoCallable()

public final UnaryCallable<ExportLockInfoRequest,LockInfo> exportLockInfoCallable()

Exports the lock info on a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ExportLockInfoRequest request =
       ExportLockInfoRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .build();
   ApiFuture<LockInfo> future = configClient.exportLockInfoCallable().futureCall(request);
   // Do something.
   LockInfo response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ExportLockInfoRequest,LockInfo>

exportPreviewResult(ExportPreviewResultRequest request)

public final ExportPreviewResultResponse exportPreviewResult(ExportPreviewResultRequest request)

Export Preview results.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ExportPreviewResultRequest request =
       ExportPreviewResultRequest.newBuilder()
           .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
           .build();
   ExportPreviewResultResponse response = configClient.exportPreviewResult(request);
 }
 
Parameter
Name Description
request ExportPreviewResultRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ExportPreviewResultResponse

exportPreviewResultCallable()

public final UnaryCallable<ExportPreviewResultRequest,ExportPreviewResultResponse> exportPreviewResultCallable()

Export Preview results.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ExportPreviewResultRequest request =
       ExportPreviewResultRequest.newBuilder()
           .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
           .build();
   ApiFuture<ExportPreviewResultResponse> future =
       configClient.exportPreviewResultCallable().futureCall(request);
   // Do something.
   ExportPreviewResultResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ExportPreviewResultRequest,ExportPreviewResultResponse>

exportRevisionStatefile(ExportRevisionStatefileRequest request)

public final Statefile exportRevisionStatefile(ExportRevisionStatefileRequest request)

Exports Terraform state file from a given revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ExportRevisionStatefileRequest request =
       ExportRevisionStatefileRequest.newBuilder()
           .setParent(
               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
                   .toString())
           .build();
   Statefile response = configClient.exportRevisionStatefile(request);
 }
 
Parameter
Name Description
request ExportRevisionStatefileRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Statefile

exportRevisionStatefileCallable()

public final UnaryCallable<ExportRevisionStatefileRequest,Statefile> exportRevisionStatefileCallable()

Exports Terraform state file from a given revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ExportRevisionStatefileRequest request =
       ExportRevisionStatefileRequest.newBuilder()
           .setParent(
               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
                   .toString())
           .build();
   ApiFuture<Statefile> future =
       configClient.exportRevisionStatefileCallable().futureCall(request);
   // Do something.
   Statefile response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ExportRevisionStatefileRequest,Statefile>

getDeployment(DeploymentName name)

public final Deployment getDeployment(DeploymentName name)

Gets details about a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   Deployment response = configClient.getDeployment(name);
 }
 
Parameter
Name Description
name DeploymentName

Required. The name of the deployment. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
Deployment

getDeployment(GetDeploymentRequest request)

public final Deployment getDeployment(GetDeploymentRequest request)

Gets details about a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetDeploymentRequest request =
       GetDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .build();
   Deployment response = configClient.getDeployment(request);
 }
 
Parameter
Name Description
request GetDeploymentRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Deployment

getDeployment(String name)

public final Deployment getDeployment(String name)

Gets details about a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
   Deployment response = configClient.getDeployment(name);
 }
 
Parameter
Name Description
name String

Required. The name of the deployment. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
Deployment

getDeploymentCallable()

public final UnaryCallable<GetDeploymentRequest,Deployment> getDeploymentCallable()

Gets details about a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetDeploymentRequest request =
       GetDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .build();
   ApiFuture<Deployment> future = configClient.getDeploymentCallable().futureCall(request);
   // Do something.
   Deployment response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetDeploymentRequest,Deployment>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getIamPolicy(GetIamPolicyRequest request)

public final Policy getIamPolicy(GetIamPolicyRequest request)

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

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   Policy response = configClient.getIamPolicy(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.GetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()

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

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   ApiFuture<Policy> future = configClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = configClient.getLocation(request);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future = configClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getPreview(GetPreviewRequest request)

public final Preview getPreview(GetPreviewRequest request)

Gets details about a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetPreviewRequest request =
       GetPreviewRequest.newBuilder()
           .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
           .build();
   Preview response = configClient.getPreview(request);
 }
 
Parameter
Name Description
request GetPreviewRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Preview

getPreview(PreviewName name)

public final Preview getPreview(PreviewName name)

Gets details about a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   PreviewName name = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]");
   Preview response = configClient.getPreview(name);
 }
 
Parameter
Name Description
name PreviewName

Required. The name of the preview. Format: 'projects/{project_id}/locations/{location}/previews/{preview}'.

Returns
Type Description
Preview

getPreview(String name)

public final Preview getPreview(String name)

Gets details about a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString();
   Preview response = configClient.getPreview(name);
 }
 
Parameter
Name Description
name String

Required. The name of the preview. Format: 'projects/{project_id}/locations/{location}/previews/{preview}'.

Returns
Type Description
Preview

getPreviewCallable()

public final UnaryCallable<GetPreviewRequest,Preview> getPreviewCallable()

Gets details about a Preview.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetPreviewRequest request =
       GetPreviewRequest.newBuilder()
           .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
           .build();
   ApiFuture<Preview> future = configClient.getPreviewCallable().futureCall(request);
   // Do something.
   Preview response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetPreviewRequest,Preview>

getResource(GetResourceRequest request)

public final Resource getResource(GetResourceRequest request)

Gets details about a Resource deployed by Infra Manager.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetResourceRequest request =
       GetResourceRequest.newBuilder()
           .setName(
               ResourceName.of(
                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]")
                   .toString())
           .build();
   Resource response = configClient.getResource(request);
 }
 
Parameter
Name Description
request GetResourceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Resource

getResource(ResourceName name)

public final Resource getResource(ResourceName name)

Gets details about a Resource deployed by Infra Manager.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ResourceName name =
       ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]");
   Resource response = configClient.getResource(name);
 }
 
Parameter
Name Description
name ResourceName

Required. The name of the Resource in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.

Returns
Type Description
Resource

getResource(String name)

public final Resource getResource(String name)

Gets details about a Resource deployed by Infra Manager.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name =
       ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]")
           .toString();
   Resource response = configClient.getResource(name);
 }
 
Parameter
Name Description
name String

Required. The name of the Resource in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.

Returns
Type Description
Resource

getResourceCallable()

public final UnaryCallable<GetResourceRequest,Resource> getResourceCallable()

Gets details about a Resource deployed by Infra Manager.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetResourceRequest request =
       GetResourceRequest.newBuilder()
           .setName(
               ResourceName.of(
                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]")
                   .toString())
           .build();
   ApiFuture<Resource> future = configClient.getResourceCallable().futureCall(request);
   // Do something.
   Resource response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetResourceRequest,Resource>

getRevision(GetRevisionRequest request)

public final Revision getRevision(GetRevisionRequest request)

Gets details about a Revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetRevisionRequest request =
       GetRevisionRequest.newBuilder()
           .setName(
               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
                   .toString())
           .build();
   Revision response = configClient.getRevision(request);
 }
 
Parameter
Name Description
request GetRevisionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Revision

getRevision(RevisionName name)

public final Revision getRevision(RevisionName name)

Gets details about a Revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   RevisionName name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]");
   Revision response = configClient.getRevision(name);
 }
 
Parameter
Name Description
name RevisionName

Required. The name of the Revision in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.

Returns
Type Description
Revision

getRevision(String name)

public final Revision getRevision(String name)

Gets details about a Revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name =
       RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString();
   Revision response = configClient.getRevision(name);
 }
 
Parameter
Name Description
name String

Required. The name of the Revision in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.

Returns
Type Description
Revision

getRevisionCallable()

public final UnaryCallable<GetRevisionRequest,Revision> getRevisionCallable()

Gets details about a Revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetRevisionRequest request =
       GetRevisionRequest.newBuilder()
           .setName(
               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
                   .toString())
           .build();
   ApiFuture<Revision> future = configClient.getRevisionCallable().futureCall(request);
   // Do something.
   Revision response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetRevisionRequest,Revision>

getSettings()

public final ConfigSettings getSettings()
Returns
Type Description
ConfigSettings

getStub()

public ConfigStub getStub()
Returns
Type Description
ConfigStub

getTerraformVersion(GetTerraformVersionRequest request)

public final TerraformVersion getTerraformVersion(GetTerraformVersionRequest request)

Gets details about a TerraformVersion.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetTerraformVersionRequest request =
       GetTerraformVersionRequest.newBuilder()
           .setName(
               TerraformVersionName.of("[PROJECT]", "[LOCATION]", "[TERRAFORM_VERSION]")
                   .toString())
           .build();
   TerraformVersion response = configClient.getTerraformVersion(request);
 }
 
Parameter
Name Description
request GetTerraformVersionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
TerraformVersion

getTerraformVersion(TerraformVersionName name)

public final TerraformVersion getTerraformVersion(TerraformVersionName name)

Gets details about a TerraformVersion.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   TerraformVersionName name =
       TerraformVersionName.of("[PROJECT]", "[LOCATION]", "[TERRAFORM_VERSION]");
   TerraformVersion response = configClient.getTerraformVersion(name);
 }
 
Parameter
Name Description
name TerraformVersionName

Required. The name of the TerraformVersion. Format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'

Returns
Type Description
TerraformVersion

getTerraformVersion(String name)

public final TerraformVersion getTerraformVersion(String name)

Gets details about a TerraformVersion.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name =
       TerraformVersionName.of("[PROJECT]", "[LOCATION]", "[TERRAFORM_VERSION]").toString();
   TerraformVersion response = configClient.getTerraformVersion(name);
 }
 
Parameter
Name Description
name String

Required. The name of the TerraformVersion. Format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'

Returns
Type Description
TerraformVersion

getTerraformVersionCallable()

public final UnaryCallable<GetTerraformVersionRequest,TerraformVersion> getTerraformVersionCallable()

Gets details about a TerraformVersion.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   GetTerraformVersionRequest request =
       GetTerraformVersionRequest.newBuilder()
           .setName(
               TerraformVersionName.of("[PROJECT]", "[LOCATION]", "[TERRAFORM_VERSION]")
                   .toString())
           .build();
   ApiFuture<TerraformVersion> future =
       configClient.getTerraformVersionCallable().futureCall(request);
   // Do something.
   TerraformVersion response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetTerraformVersionRequest,TerraformVersion>

importStatefile(DeploymentName parent, long lockId)

public final Statefile importStatefile(DeploymentName parent, long lockId)

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

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   long lockId = 338696367;
   Statefile response = configClient.importStatefile(parent, lockId);
 }
 
Parameters
Name Description
parent DeploymentName

Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

lockId long

Required. Lock ID of the lock file to verify that the user who is importing the state file previously locked the Deployment.

Returns
Type Description
Statefile

importStatefile(ImportStatefileRequest request)

public final Statefile importStatefile(ImportStatefileRequest request)

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

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ImportStatefileRequest request =
       ImportStatefileRequest.newBuilder()
           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setLockId(338696367)
           .setSkipDraft(true)
           .build();
   Statefile response = configClient.importStatefile(request);
 }
 
Parameter
Name Description
request ImportStatefileRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Statefile

importStatefile(String parent, long lockId)

public final Statefile importStatefile(String parent, long lockId)

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

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
   long lockId = 338696367;
   Statefile response = configClient.importStatefile(parent, lockId);
 }
 
Parameters
Name Description
parent String

Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

lockId long

Required. Lock ID of the lock file to verify that the user who is importing the state file previously locked the Deployment.

Returns
Type Description
Statefile

importStatefileCallable()

public final UnaryCallable<ImportStatefileRequest,Statefile> importStatefileCallable()

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

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ImportStatefileRequest request =
       ImportStatefileRequest.newBuilder()
           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setLockId(338696367)
           .setSkipDraft(true)
           .build();
   ApiFuture<Statefile> future = configClient.importStatefileCallable().futureCall(request);
   // Do something.
   Statefile response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ImportStatefileRequest,Statefile>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listDeployments(ListDeploymentsRequest request)

public final ConfigClient.ListDeploymentsPagedResponse listDeployments(ListDeploymentsRequest request)

Lists Deployments in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListDeploymentsRequest request =
       ListDeploymentsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Deployment element : configClient.listDeployments(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListDeploymentsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ConfigClient.ListDeploymentsPagedResponse

listDeployments(LocationName parent)

public final ConfigClient.ListDeploymentsPagedResponse listDeployments(LocationName parent)

Lists Deployments in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Deployment element : configClient.listDeployments(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent in whose context the Deployments are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

Returns
Type Description
ConfigClient.ListDeploymentsPagedResponse

listDeployments(String parent)

public final ConfigClient.ListDeploymentsPagedResponse listDeployments(String parent)

Lists Deployments in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Deployment element : configClient.listDeployments(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent in whose context the Deployments are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

Returns
Type Description
ConfigClient.ListDeploymentsPagedResponse

listDeploymentsCallable()

public final UnaryCallable<ListDeploymentsRequest,ListDeploymentsResponse> listDeploymentsCallable()

Lists Deployments in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListDeploymentsRequest request =
       ListDeploymentsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListDeploymentsResponse response = configClient.listDeploymentsCallable().call(request);
     for (Deployment element : response.getDeploymentsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListDeploymentsRequest,ListDeploymentsResponse>

listDeploymentsPagedCallable()

public final UnaryCallable<ListDeploymentsRequest,ConfigClient.ListDeploymentsPagedResponse> listDeploymentsPagedCallable()

Lists Deployments in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListDeploymentsRequest request =
       ListDeploymentsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Deployment> future =
       configClient.listDeploymentsPagedCallable().futureCall(request);
   // Do something.
   for (Deployment element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListDeploymentsRequest,ListDeploymentsPagedResponse>

listLocations(ListLocationsRequest request)

public final ConfigClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : configClient.listLocations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ConfigClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response = configClient.listLocationsCallable().call(request);
     for (Location element : response.getLocationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,ConfigClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future = configClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

listPreviews(ListPreviewsRequest request)

public final ConfigClient.ListPreviewsPagedResponse listPreviews(ListPreviewsRequest request)

Lists Previews in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListPreviewsRequest request =
       ListPreviewsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Preview element : configClient.listPreviews(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListPreviewsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ConfigClient.ListPreviewsPagedResponse

listPreviews(LocationName parent)

public final ConfigClient.ListPreviewsPagedResponse listPreviews(LocationName parent)

Lists Previews in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Preview element : configClient.listPreviews(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent in whose context the Previews are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

Returns
Type Description
ConfigClient.ListPreviewsPagedResponse

listPreviews(String parent)

public final ConfigClient.ListPreviewsPagedResponse listPreviews(String parent)

Lists Previews in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Preview element : configClient.listPreviews(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent in whose context the Previews are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

Returns
Type Description
ConfigClient.ListPreviewsPagedResponse

listPreviewsCallable()

public final UnaryCallable<ListPreviewsRequest,ListPreviewsResponse> listPreviewsCallable()

Lists Previews in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListPreviewsRequest request =
       ListPreviewsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListPreviewsResponse response = configClient.listPreviewsCallable().call(request);
     for (Preview element : response.getPreviewsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListPreviewsRequest,ListPreviewsResponse>

listPreviewsPagedCallable()

public final UnaryCallable<ListPreviewsRequest,ConfigClient.ListPreviewsPagedResponse> listPreviewsPagedCallable()

Lists Previews in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListPreviewsRequest request =
       ListPreviewsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Preview> future = configClient.listPreviewsPagedCallable().futureCall(request);
   // Do something.
   for (Preview element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListPreviewsRequest,ListPreviewsPagedResponse>

listResources(ListResourcesRequest request)

public final ConfigClient.ListResourcesPagedResponse listResources(ListResourcesRequest request)

Lists Resources in a given revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListResourcesRequest request =
       ListResourcesRequest.newBuilder()
           .setParent(
               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Resource element : configClient.listResources(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListResourcesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ConfigClient.ListResourcesPagedResponse

listResources(RevisionName parent)

public final ConfigClient.ListResourcesPagedResponse listResources(RevisionName parent)

Lists Resources in a given revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   RevisionName parent =
       RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]");
   for (Resource element : configClient.listResources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent RevisionName

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}'.

Returns
Type Description
ConfigClient.ListResourcesPagedResponse

listResources(String parent)

public final ConfigClient.ListResourcesPagedResponse listResources(String parent)

Lists Resources in a given revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String parent =
       RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString();
   for (Resource element : configClient.listResources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

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}'.

Returns
Type Description
ConfigClient.ListResourcesPagedResponse

listResourcesCallable()

public final UnaryCallable<ListResourcesRequest,ListResourcesResponse> listResourcesCallable()

Lists Resources in a given revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListResourcesRequest request =
       ListResourcesRequest.newBuilder()
           .setParent(
               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListResourcesResponse response = configClient.listResourcesCallable().call(request);
     for (Resource element : response.getResourcesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListResourcesRequest,ListResourcesResponse>

listResourcesPagedCallable()

public final UnaryCallable<ListResourcesRequest,ConfigClient.ListResourcesPagedResponse> listResourcesPagedCallable()

Lists Resources in a given revision.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListResourcesRequest request =
       ListResourcesRequest.newBuilder()
           .setParent(
               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Resource> future = configClient.listResourcesPagedCallable().futureCall(request);
   // Do something.
   for (Resource element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListResourcesRequest,ListResourcesPagedResponse>

listRevisions(DeploymentName parent)

public final ConfigClient.ListRevisionsPagedResponse listRevisions(DeploymentName parent)

Lists Revisions of a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   for (Revision element : configClient.listRevisions(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent DeploymentName

Required. The parent in whose context the Revisions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
ConfigClient.ListRevisionsPagedResponse

listRevisions(ListRevisionsRequest request)

public final ConfigClient.ListRevisionsPagedResponse listRevisions(ListRevisionsRequest request)

Lists Revisions of a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListRevisionsRequest request =
       ListRevisionsRequest.newBuilder()
           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Revision element : configClient.listRevisions(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListRevisionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ConfigClient.ListRevisionsPagedResponse

listRevisions(String parent)

public final ConfigClient.ListRevisionsPagedResponse listRevisions(String parent)

Lists Revisions of a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
   for (Revision element : configClient.listRevisions(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent in whose context the Revisions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
ConfigClient.ListRevisionsPagedResponse

listRevisionsCallable()

public final UnaryCallable<ListRevisionsRequest,ListRevisionsResponse> listRevisionsCallable()

Lists Revisions of a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListRevisionsRequest request =
       ListRevisionsRequest.newBuilder()
           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListRevisionsResponse response = configClient.listRevisionsCallable().call(request);
     for (Revision element : response.getRevisionsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListRevisionsRequest,ListRevisionsResponse>

listRevisionsPagedCallable()

public final UnaryCallable<ListRevisionsRequest,ConfigClient.ListRevisionsPagedResponse> listRevisionsPagedCallable()

Lists Revisions of a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListRevisionsRequest request =
       ListRevisionsRequest.newBuilder()
           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Revision> future = configClient.listRevisionsPagedCallable().futureCall(request);
   // Do something.
   for (Revision element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListRevisionsRequest,ListRevisionsPagedResponse>

listTerraformVersions(ListTerraformVersionsRequest request)

public final ConfigClient.ListTerraformVersionsPagedResponse listTerraformVersions(ListTerraformVersionsRequest request)

Lists TerraformVersions in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListTerraformVersionsRequest request =
       ListTerraformVersionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (TerraformVersion element : configClient.listTerraformVersions(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListTerraformVersionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ConfigClient.ListTerraformVersionsPagedResponse

listTerraformVersions(LocationName parent)

public final ConfigClient.ListTerraformVersionsPagedResponse listTerraformVersions(LocationName parent)

Lists TerraformVersions in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (TerraformVersion element : configClient.listTerraformVersions(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent in whose context the TerraformVersions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

Returns
Type Description
ConfigClient.ListTerraformVersionsPagedResponse

listTerraformVersions(String parent)

public final ConfigClient.ListTerraformVersionsPagedResponse listTerraformVersions(String parent)

Lists TerraformVersions in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (TerraformVersion element : configClient.listTerraformVersions(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent in whose context the TerraformVersions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.

Returns
Type Description
ConfigClient.ListTerraformVersionsPagedResponse

listTerraformVersionsCallable()

public final UnaryCallable<ListTerraformVersionsRequest,ListTerraformVersionsResponse> listTerraformVersionsCallable()

Lists TerraformVersions in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListTerraformVersionsRequest request =
       ListTerraformVersionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListTerraformVersionsResponse response =
         configClient.listTerraformVersionsCallable().call(request);
     for (TerraformVersion element : response.getTerraformVersionsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListTerraformVersionsRequest,ListTerraformVersionsResponse>

listTerraformVersionsPagedCallable()

public final UnaryCallable<ListTerraformVersionsRequest,ConfigClient.ListTerraformVersionsPagedResponse> listTerraformVersionsPagedCallable()

Lists TerraformVersions in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   ListTerraformVersionsRequest request =
       ListTerraformVersionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<TerraformVersion> future =
       configClient.listTerraformVersionsPagedCallable().futureCall(request);
   // Do something.
   for (TerraformVersion element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListTerraformVersionsRequest,ListTerraformVersionsPagedResponse>

lockDeploymentAsync(DeploymentName name)

public final OperationFuture<Deployment,OperationMetadata> lockDeploymentAsync(DeploymentName name)

Locks a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   Deployment response = configClient.lockDeploymentAsync(name).get();
 }
 
Parameter
Name Description
name DeploymentName

Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

lockDeploymentAsync(LockDeploymentRequest request)

public final OperationFuture<Deployment,OperationMetadata> lockDeploymentAsync(LockDeploymentRequest request)

Locks a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   LockDeploymentRequest request =
       LockDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .build();
   Deployment response = configClient.lockDeploymentAsync(request).get();
 }
 
Parameter
Name Description
request LockDeploymentRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

lockDeploymentAsync(String name)

public final OperationFuture<Deployment,OperationMetadata> lockDeploymentAsync(String name)

Locks a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
   Deployment response = configClient.lockDeploymentAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

lockDeploymentCallable()

public final UnaryCallable<LockDeploymentRequest,Operation> lockDeploymentCallable()

Locks a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   LockDeploymentRequest request =
       LockDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .build();
   ApiFuture<Operation> future = configClient.lockDeploymentCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<LockDeploymentRequest,Operation>

lockDeploymentOperationCallable()

public final OperationCallable<LockDeploymentRequest,Deployment,OperationMetadata> lockDeploymentOperationCallable()

Locks a deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   LockDeploymentRequest request =
       LockDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .build();
   OperationFuture<Deployment, OperationMetadata> future =
       configClient.lockDeploymentOperationCallable().futureCall(request);
   // Do something.
   Deployment response = future.get();
 }
 
Returns
Type Description
OperationCallable<LockDeploymentRequest,Deployment,OperationMetadata>

setIamPolicy(SetIamPolicyRequest request)

public final Policy setIamPolicy(SetIamPolicyRequest request)

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Policy response = configClient.setIamPolicy(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.SetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Policy> future = configClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRequest request)

public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

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

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

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   TestIamPermissionsResponse response = configClient.testIamPermissions(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.TestIamPermissionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()

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

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

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   ApiFuture<TestIamPermissionsResponse> future =
       configClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestIamPermissionsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

unlockDeploymentAsync(DeploymentName name, long lockId)

public final OperationFuture<Deployment,OperationMetadata> unlockDeploymentAsync(DeploymentName name, long lockId)

Unlocks a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   long lockId = 338696367;
   Deployment response = configClient.unlockDeploymentAsync(name, lockId).get();
 }
 
Parameters
Name Description
name DeploymentName

Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

lockId long

Required. Lock ID of the lock file to be unlocked.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

unlockDeploymentAsync(UnlockDeploymentRequest request)

public final OperationFuture<Deployment,OperationMetadata> unlockDeploymentAsync(UnlockDeploymentRequest request)

Unlocks a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   UnlockDeploymentRequest request =
       UnlockDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setLockId(338696367)
           .build();
   Deployment response = configClient.unlockDeploymentAsync(request).get();
 }
 
Parameter
Name Description
request UnlockDeploymentRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

unlockDeploymentAsync(String name, long lockId)

public final OperationFuture<Deployment,OperationMetadata> unlockDeploymentAsync(String name, long lockId)

Unlocks a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
   long lockId = 338696367;
   Deployment response = configClient.unlockDeploymentAsync(name, lockId).get();
 }
 
Parameters
Name Description
name String

Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.

lockId long

Required. Lock ID of the lock file to be unlocked.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

unlockDeploymentCallable()

public final UnaryCallable<UnlockDeploymentRequest,Operation> unlockDeploymentCallable()

Unlocks a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   UnlockDeploymentRequest request =
       UnlockDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setLockId(338696367)
           .build();
   ApiFuture<Operation> future = configClient.unlockDeploymentCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UnlockDeploymentRequest,Operation>

unlockDeploymentOperationCallable()

public final OperationCallable<UnlockDeploymentRequest,Deployment,OperationMetadata> unlockDeploymentOperationCallable()

Unlocks a locked deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   UnlockDeploymentRequest request =
       UnlockDeploymentRequest.newBuilder()
           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
           .setLockId(338696367)
           .build();
   OperationFuture<Deployment, OperationMetadata> future =
       configClient.unlockDeploymentOperationCallable().futureCall(request);
   // Do something.
   Deployment response = future.get();
 }
 
Returns
Type Description
OperationCallable<UnlockDeploymentRequest,Deployment,OperationMetadata>

updateDeploymentAsync(Deployment deployment, FieldMask updateMask)

public final OperationFuture<Deployment,OperationMetadata> updateDeploymentAsync(Deployment deployment, FieldMask updateMask)

Updates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   Deployment deployment = Deployment.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Deployment response = configClient.updateDeploymentAsync(deployment, updateMask).get();
 }
 
Parameters
Name Description
deployment Deployment

Required. Deployment to update.

The deployment's name field is used to identify the resource to be updated. Format: projects/{project}/locations/{location}/deployments/{deployment}

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

updateDeploymentAsync(UpdateDeploymentRequest request)

public final OperationFuture<Deployment,OperationMetadata> updateDeploymentAsync(UpdateDeploymentRequest request)

Updates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   UpdateDeploymentRequest request =
       UpdateDeploymentRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setDeployment(Deployment.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Deployment response = configClient.updateDeploymentAsync(request).get();
 }
 
Parameter
Name Description
request UpdateDeploymentRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Deployment,OperationMetadata>

updateDeploymentCallable()

public final UnaryCallable<UpdateDeploymentRequest,Operation> updateDeploymentCallable()

Updates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   UpdateDeploymentRequest request =
       UpdateDeploymentRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setDeployment(Deployment.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = configClient.updateDeploymentCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateDeploymentRequest,Operation>

updateDeploymentOperationCallable()

public final OperationCallable<UpdateDeploymentRequest,Deployment,OperationMetadata> updateDeploymentOperationCallable()

Updates a Deployment.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   UpdateDeploymentRequest request =
       UpdateDeploymentRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setDeployment(Deployment.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Deployment, OperationMetadata> future =
       configClient.updateDeploymentOperationCallable().futureCall(request);
   // Do something.
   Deployment response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateDeploymentRequest,Deployment,OperationMetadata>