Class ConfigClient (0.18.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
MethodDescriptionMethod 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
TypeDescription
ConfigClient
Exceptions
TypeDescription
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
NameDescription
settingsConfigSettings
Returns
TypeDescription
ConfigClient
Exceptions
TypeDescription
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
NameDescription
stubConfigStub
Returns
TypeDescription
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
NameDescription
settingsConfigSettings

ConfigClient(ConfigStub stub)

protected ConfigClient(ConfigStub stub)
Parameter
NameDescription
stubConfigStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
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
NameDescription
requestCreateDeploymentRequest

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

Returns
TypeDescription
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
NameDescription
parentLocationName

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

deploymentDeployment

Required. Deployment resource to be created.

deploymentIdString

Required. The Deployment ID.

Returns
TypeDescription
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
NameDescription
parentString

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

deploymentDeployment

Required. Deployment resource to be created.

deploymentIdString

Required. The Deployment ID.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestCreatePreviewRequest

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

Returns
TypeDescription
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
NameDescription
parentLocationName

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

previewPreview

Required. Preview resource to be created.

Returns
TypeDescription
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
NameDescription
parentString

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

previewPreview

Required. Preview resource to be created.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestDeleteDeploymentRequest

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

Returns
TypeDescription
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
NameDescription
nameDeploymentName

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestDeletePreviewRequest

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

Returns
TypeDescription
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
NameDescription
namePreviewName

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestDeleteStatefileRequest

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
NameDescription
nameDeploymentName

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
NameDescription
nameString

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
TypeDescription
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
NameDescription
requestExportDeploymentStatefileRequest

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
nameDeploymentName

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

Returns
TypeDescription
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
NameDescription
requestExportLockInfoRequest

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
requestExportPreviewResultRequest

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
requestExportRevisionStatefileRequest

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
nameDeploymentName

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

Returns
TypeDescription
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
NameDescription
requestGetDeploymentRequest

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestcom.google.iam.v1.GetIamPolicyRequest

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
requestcom.google.cloud.location.GetLocationRequest

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestGetPreviewRequest

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

Returns
TypeDescription
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
NameDescription
namePreviewName

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
requestGetResourceRequest

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

Returns
TypeDescription
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
NameDescription
nameResourceName

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
requestGetRevisionRequest

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

Returns
TypeDescription
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
NameDescription
nameRevisionName

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
UnaryCallable<GetRevisionRequest,Revision>

getSettings()

public final ConfigSettings getSettings()
Returns
TypeDescription
ConfigSettings

getStub()

public ConfigStub getStub()
Returns
TypeDescription
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
NameDescription
requestGetTerraformVersionRequest

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

Returns
TypeDescription
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
NameDescription
nameTerraformVersionName

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
parentDeploymentName

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

lockIdlong

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

Returns
TypeDescription
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
NameDescription
requestImportStatefileRequest

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

Returns
TypeDescription
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
NameDescription
parentString

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

lockIdlong

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

Returns
TypeDescription
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
TypeDescription
UnaryCallable<ImportStatefileRequest,Statefile>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
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
NameDescription
requestListDeploymentsRequest

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

Returns
TypeDescription
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
NameDescription
parentLocationName

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

Returns
TypeDescription
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
NameDescription
parentString

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestcom.google.cloud.location.ListLocationsRequest

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestListPreviewsRequest

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

Returns
TypeDescription
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
NameDescription
parentLocationName

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

Returns
TypeDescription
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
NameDescription
parentString

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestListResourcesRequest

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

Returns
TypeDescription
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
NameDescription
parentRevisionName

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
TypeDescription
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
NameDescription
parentString

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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
parentDeploymentName

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
TypeDescription
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
NameDescription
requestListRevisionsRequest

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

Returns
TypeDescription
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
NameDescription
parentString

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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestListTerraformVersionsRequest

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

Returns
TypeDescription
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
NameDescription
parentLocationName

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

Returns
TypeDescription
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
NameDescription
parentString

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
nameDeploymentName

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

Returns
TypeDescription
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
NameDescription
requestLockDeploymentRequest

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

Returns
TypeDescription
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
NameDescription
nameString

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
requestcom.google.iam.v1.SetIamPolicyRequest

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
requestcom.google.iam.v1.TestIamPermissionsRequest

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

Returns
TypeDescription
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
TypeDescription
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
NameDescription
nameDeploymentName

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

lockIdlong

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

Returns
TypeDescription
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
NameDescription
requestUnlockDeploymentRequest

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

Returns
TypeDescription
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
NameDescription
nameString

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

lockIdlong

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
deploymentDeployment

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}

updateMaskFieldMask

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
TypeDescription
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
NameDescription
requestUpdateDeploymentRequest

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
OperationCallable<UpdateDeploymentRequest,Deployment,OperationMetadata>