Class ConfigClient

java.lang.Object
com.google.cloud.config.v1.ConfigClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class ConfigClient extends Object implements BackgroundResource
Service Description: Infrastructure Manager is a managed service that automates the deployment and management of Google Cloud infrastructure resources.

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


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ConfigClient configClient = ConfigClient.create()) {
   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
   Deployment response = configClient.getDeployment(name);
 }
 

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

Methods
Method Description Method Variants

ListDeployments

Lists [Deployment][google.cloud.config.v1.Deployment]s 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][google.cloud.config.v1.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][google.cloud.config.v1.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][google.cloud.config.v1.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][google.cloud.config.v1.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 [Revision][google.cloud.config.v1.Revision]s 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][google.cloud.config.v1.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][google.cloud.config.v1.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][google.cloud.config.v1.Resource] 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][google.cloud.config.v1.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][google.cloud.config.v1.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 [Preview][google.cloud.config.v1.Preview]s 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][google.cloud.config.v1.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][google.cloud.config.v1.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 [TerraformVersion][google.cloud.config.v1.TerraformVersion]s 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][google.cloud.config.v1.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()

ListResourceChanges

Lists ResourceChanges for a given preview.

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

  • listResourceChanges(ListResourceChangesRequest request)

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

  • listResourceChanges(PreviewName parent)

  • listResourceChanges(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.

  • listResourceChangesPagedCallable()

  • listResourceChangesCallable()

GetResourceChange

Get a ResourceChange for a given preview.

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

  • getResourceChange(GetResourceChangeRequest request)

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

  • getResourceChange(ResourceChangeName name)

  • getResourceChange(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.

  • getResourceChangeCallable()

ListResourceDrifts

List ResourceDrifts for a given preview.

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

  • listResourceDrifts(ListResourceDriftsRequest request)

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

  • listResourceDrifts(PreviewName parent)

  • listResourceDrifts(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.

  • listResourceDriftsPagedCallable()

  • listResourceDriftsCallable()

GetResourceDrift

Get a ResourceDrift for a given preview.

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

  • getResourceDrift(GetResourceDriftRequest request)

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

  • getResourceDrift(ResourceDriftName name)

  • getResourceDrift(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.

  • getResourceDriftCallable()

GetAutoMigrationConfig

Get the AutoMigrationConfig for a given project and location.

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

  • getAutoMigrationConfig(GetAutoMigrationConfigRequest request)

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

  • getAutoMigrationConfig(AutoMigrationConfigName name)

  • getAutoMigrationConfig(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.

  • getAutoMigrationConfigCallable()

UpdateAutoMigrationConfig

Updates the AutoMigrationConfig for a given project and location.

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

  • updateAutoMigrationConfigAsync(UpdateAutoMigrationConfigRequest request)

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

  • updateAutoMigrationConfigAsync(AutoMigrationConfig autoMigrationConfig, 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.

  • updateAutoMigrationConfigOperationCallable()

  • updateAutoMigrationConfigCallable()

GetDeploymentGroup

Get a DeploymentGroup for a given project and location.

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

  • getDeploymentGroup(GetDeploymentGroupRequest request)

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

  • getDeploymentGroup(DeploymentGroupName name)

  • getDeploymentGroup(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.

  • getDeploymentGroupCallable()

CreateDeploymentGroup

Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.

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

  • createDeploymentGroupAsync(CreateDeploymentGroupRequest request)

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

  • createDeploymentGroupAsync(LocationName parent, DeploymentGroup deploymentGroup, String deploymentGroupId)

  • createDeploymentGroupAsync(String parent, DeploymentGroup deploymentGroup, String deploymentGroupId)

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

  • createDeploymentGroupOperationCallable()

  • createDeploymentGroupCallable()

UpdateDeploymentGroup

Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

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

  • updateDeploymentGroupAsync(UpdateDeploymentGroupRequest request)

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

  • updateDeploymentGroupAsync(DeploymentGroup deploymentGroup, 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.

  • updateDeploymentGroupOperationCallable()

  • updateDeploymentGroupCallable()

DeleteDeploymentGroup

Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

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

  • deleteDeploymentGroupAsync(DeleteDeploymentGroupRequest request)

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

  • deleteDeploymentGroupAsync(DeploymentGroupName name)

  • deleteDeploymentGroupAsync(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.

  • deleteDeploymentGroupOperationCallable()

  • deleteDeploymentGroupCallable()

ListDeploymentGroups

List DeploymentGroups for a given project and location.

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

  • listDeploymentGroups(ListDeploymentGroupsRequest request)

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

  • listDeploymentGroups(LocationName parent)

  • listDeploymentGroups(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.

  • listDeploymentGroupsPagedCallable()

  • listDeploymentGroupsCallable()

ProvisionDeploymentGroup

Provisions a deployment group.

NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

  • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

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

  • provisionDeploymentGroupAsync(ProvisionDeploymentGroupRequest request)

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

  • provisionDeploymentGroupAsync(DeploymentGroupName name)

  • provisionDeploymentGroupAsync(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.

  • provisionDeploymentGroupOperationCallable()

  • provisionDeploymentGroupCallable()

DeprovisionDeploymentGroup

Deprovisions a deployment group.

NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

  • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

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

  • deprovisionDeploymentGroupAsync(DeprovisionDeploymentGroupRequest request)

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

  • deprovisionDeploymentGroupAsync(DeploymentGroupName name)

  • deprovisionDeploymentGroupAsync(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.

  • deprovisionDeploymentGroupOperationCallable()

  • deprovisionDeploymentGroupCallable()

GetDeploymentGroupRevision

Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].

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

  • getDeploymentGroupRevision(GetDeploymentGroupRevisionRequest request)

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

  • getDeploymentGroupRevision(DeploymentGroupRevisionName name)

  • getDeploymentGroupRevision(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.

  • getDeploymentGroupRevisionCallable()

ListDeploymentGroupRevisions

Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].

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

  • listDeploymentGroupRevisions(ListDeploymentGroupRevisionsRequest request)

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

  • listDeploymentGroupRevisions(DeploymentGroupName parent)

  • listDeploymentGroupRevisions(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.

  • listDeploymentGroupRevisionsPagedCallable()

  • listDeploymentGroupRevisionsCallable()

ListLocations

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

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_DENIED`errors.

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.

  • Constructor Details

    • ConfigClient

      protected ConfigClient(ConfigSettings settings) throws IOException
      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.
      Throws:
      IOException
    • ConfigClient

      protected ConfigClient(ConfigStub stub)
  • Method Details

    • create

      public static final ConfigClient create() throws IOException
      Constructs an instance of ConfigClient with default settings.
      Throws:
      IOException
    • create

      public static final ConfigClient create(ConfigSettings settings) throws IOException
      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.
      Throws:
      IOException
    • create

      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).
    • getSettings

      public final ConfigSettings getSettings()
    • getStub

      public ConfigStub getStub()
    • 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.
    • getHttpJsonOperationsClient

      @BetaApi 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.
    • listDeployments

      public final ConfigClient.ListDeploymentsPagedResponse listDeployments(LocationName parent)
      Lists [Deployment][google.cloud.config.v1.Deployment]s 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);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the Deployments are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      Throws:
      ApiException - if the remote call fails
    • listDeployments

      public final ConfigClient.ListDeploymentsPagedResponse listDeployments(String parent)
      Lists [Deployment][google.cloud.config.v1.Deployment]s 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);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the Deployments are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      Throws:
      ApiException - if the remote call fails
    • listDeployments

      public final ConfigClient.ListDeploymentsPagedResponse listDeployments(ListDeploymentsRequest request)
      Lists [Deployment][google.cloud.config.v1.Deployment]s 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listDeploymentsPagedCallable

      Lists [Deployment][google.cloud.config.v1.Deployment]s 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);
         }
       }
       
    • listDeploymentsCallable

      public final UnaryCallable<ListDeploymentsRequest,ListDeploymentsResponse> listDeploymentsCallable()
      Lists [Deployment][google.cloud.config.v1.Deployment]s 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;
           }
         }
       }
       
    • getDeployment

      public final Deployment getDeployment(DeploymentName name)
      Gets details about a [Deployment][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the deployment. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • getDeployment

      public final Deployment getDeployment(String name)
      Gets details about a [Deployment][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the deployment. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • getDeployment

      public final Deployment getDeployment(GetDeploymentRequest request)
      Gets details about a [Deployment][google.cloud.config.v1.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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getDeploymentCallable

      public final UnaryCallable<GetDeploymentRequest,Deployment> getDeploymentCallable()
      Gets details about a [Deployment][google.cloud.config.v1.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();
       }
       
    • createDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(LocationName parent, Deployment deployment, String deploymentId)
      Creates a [Deployment][google.cloud.config.v1.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:
      parent - Required. The parent in whose context the Deployment is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      deployment - Required. [Deployment][google.cloud.config.v1.Deployment] resource to be created.
      deploymentId - Required. The Deployment ID.
      Throws:
      ApiException - if the remote call fails
    • createDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(String parent, Deployment deployment, String deploymentId)
      Creates a [Deployment][google.cloud.config.v1.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:
      parent - Required. The parent in whose context the Deployment is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      deployment - Required. [Deployment][google.cloud.config.v1.Deployment] resource to be created.
      deploymentId - Required. The Deployment ID.
      Throws:
      ApiException - if the remote call fails
    • createDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(CreateDeploymentRequest request)
      Creates a [Deployment][google.cloud.config.v1.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createDeploymentOperationCallable

      public final OperationCallable<CreateDeploymentRequest,Deployment,OperationMetadata> createDeploymentOperationCallable()
      Creates a [Deployment][google.cloud.config.v1.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();
       }
       
    • createDeploymentCallable

      public final UnaryCallable<CreateDeploymentRequest,Operation> createDeploymentCallable()
      Creates a [Deployment][google.cloud.config.v1.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();
       }
       
    • updateDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> updateDeploymentAsync(Deployment deployment, com.google.protobuf.FieldMask updateMask)
      Updates a [Deployment][google.cloud.config.v1.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:
      deployment - Required. [Deployment][google.cloud.config.v1.Deployment] to update.

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

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

      Throws:
      ApiException - if the remote call fails
    • updateDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> updateDeploymentAsync(UpdateDeploymentRequest request)
      Updates a [Deployment][google.cloud.config.v1.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateDeploymentOperationCallable

      public final OperationCallable<UpdateDeploymentRequest,Deployment,OperationMetadata> updateDeploymentOperationCallable()
      Updates a [Deployment][google.cloud.config.v1.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();
       }
       
    • updateDeploymentCallable

      public final UnaryCallable<UpdateDeploymentRequest,Operation> updateDeploymentCallable()
      Updates a [Deployment][google.cloud.config.v1.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();
       }
       
    • deleteDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> deleteDeploymentAsync(DeploymentName name)
      Deletes a [Deployment][google.cloud.config.v1.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();
       }
       
      Parameters:
      name - Required. The name of the Deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • deleteDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> deleteDeploymentAsync(String name)
      Deletes a [Deployment][google.cloud.config.v1.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();
       }
       
      Parameters:
      name - Required. The name of the Deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • deleteDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> deleteDeploymentAsync(DeleteDeploymentRequest request)
      Deletes a [Deployment][google.cloud.config.v1.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteDeploymentOperationCallable

      public final OperationCallable<DeleteDeploymentRequest,Deployment,OperationMetadata> deleteDeploymentOperationCallable()
      Deletes a [Deployment][google.cloud.config.v1.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();
       }
       
    • deleteDeploymentCallable

      public final UnaryCallable<DeleteDeploymentRequest,Operation> deleteDeploymentCallable()
      Deletes a [Deployment][google.cloud.config.v1.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();
       }
       
    • listRevisions

      public final ConfigClient.ListRevisionsPagedResponse listRevisions(DeploymentName parent)
      Lists [Revision][google.cloud.config.v1.Revision]s 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);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the Revisions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • listRevisions

      public final ConfigClient.ListRevisionsPagedResponse listRevisions(String parent)
      Lists [Revision][google.cloud.config.v1.Revision]s 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);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the Revisions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • listRevisions

      public final ConfigClient.ListRevisionsPagedResponse listRevisions(ListRevisionsRequest request)
      Lists [Revision][google.cloud.config.v1.Revision]s 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listRevisionsPagedCallable

      Lists [Revision][google.cloud.config.v1.Revision]s 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);
         }
       }
       
    • listRevisionsCallable

      public final UnaryCallable<ListRevisionsRequest,ListRevisionsResponse> listRevisionsCallable()
      Lists [Revision][google.cloud.config.v1.Revision]s 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;
           }
         }
       }
       
    • getRevision

      public final Revision getRevision(RevisionName name)
      Gets details about a [Revision][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the Revision in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
      Throws:
      ApiException - if the remote call fails
    • getRevision

      public final Revision getRevision(String name)
      Gets details about a [Revision][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the Revision in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
      Throws:
      ApiException - if the remote call fails
    • getRevision

      public final Revision getRevision(GetRevisionRequest request)
      Gets details about a [Revision][google.cloud.config.v1.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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getRevisionCallable

      public final UnaryCallable<GetRevisionRequest,Revision> getRevisionCallable()
      Gets details about a [Revision][google.cloud.config.v1.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();
       }
       
    • getResource

      public final Resource getResource(ResourceName name)
      Gets details about a [Resource][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the Resource in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
      Throws:
      ApiException - if the remote call fails
    • getResource

      public final Resource getResource(String name)
      Gets details about a [Resource][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the Resource in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
      Throws:
      ApiException - if the remote call fails
    • getResource

      public final Resource getResource(GetResourceRequest request)
      Gets details about a [Resource][google.cloud.config.v1.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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getResourceCallable

      public final UnaryCallable<GetResourceRequest,Resource> getResourceCallable()
      Gets details about a [Resource][google.cloud.config.v1.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();
       }
       
    • listResources

      public final ConfigClient.ListResourcesPagedResponse listResources(RevisionName parent)
      Lists [Resources][google.cloud.config.v1.Resource] 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);
         }
       }
       
      Parameters:
      parent - 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}'.
      Throws:
      ApiException - if the remote call fails
    • listResources

      public final ConfigClient.ListResourcesPagedResponse listResources(String parent)
      Lists [Resources][google.cloud.config.v1.Resource] 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);
         }
       }
       
      Parameters:
      parent - 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}'.
      Throws:
      ApiException - if the remote call fails
    • listResources

      public final ConfigClient.ListResourcesPagedResponse listResources(ListResourcesRequest request)
      Lists [Resources][google.cloud.config.v1.Resource] 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listResourcesPagedCallable

      Lists [Resources][google.cloud.config.v1.Resource] 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);
         }
       }
       
    • listResourcesCallable

      public final UnaryCallable<ListResourcesRequest,ListResourcesResponse> listResourcesCallable()
      Lists [Resources][google.cloud.config.v1.Resource] 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;
           }
         }
       }
       
    • exportDeploymentStatefile

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • exportRevisionStatefile

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • importStatefile

      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:
      parent - Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      lockId - Required. Lock ID of the lock file to verify that the user who is importing the state file previously locked the Deployment.
      Throws:
      ApiException - if the remote call fails
    • importStatefile

      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:
      parent - Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      lockId - Required. Lock ID of the lock file to verify that the user who is importing the state file previously locked the Deployment.
      Throws:
      ApiException - if the remote call fails
    • importStatefile

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • deleteStatefile

      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);
       }
       
      Parameters:
      name - Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • deleteStatefile

      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);
       }
       
      Parameters:
      name - Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • deleteStatefile

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteStatefileCallable

      public final UnaryCallable<DeleteStatefileRequest,com.google.protobuf.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();
       }
       
    • lockDeploymentAsync

      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();
       }
       
      Parameters:
      name - Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • lockDeploymentAsync

      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();
       }
       
      Parameters:
      name - Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • lockDeploymentAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • unlockDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> unlockDeploymentAsync(DeploymentName name, long lockId)
      Unlocks a locked deployment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (ConfigClient configClient = ConfigClient.create()) {
         DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
         long lockId = 338696367;
         Deployment response = configClient.unlockDeploymentAsync(name, lockId).get();
       }
       
      Parameters:
      name - Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      lockId - Required. Lock ID of the lock file to be unlocked.
      Throws:
      ApiException - if the remote call fails
    • unlockDeploymentAsync

      public final OperationFuture<Deployment,OperationMetadata> unlockDeploymentAsync(String name, long lockId)
      Unlocks a locked deployment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (ConfigClient configClient = ConfigClient.create()) {
         String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
         long lockId = 338696367;
         Deployment response = configClient.unlockDeploymentAsync(name, lockId).get();
       }
       
      Parameters:
      name - Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      lockId - Required. Lock ID of the lock file to be unlocked.
      Throws:
      ApiException - if the remote call fails
    • unlockDeploymentAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • exportLockInfo

      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);
       }
       
      Parameters:
      name - Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • exportLockInfo

      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);
       }
       
      Parameters:
      name - Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      Throws:
      ApiException - if the remote call fails
    • exportLockInfo

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • createPreviewAsync

      public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(LocationName parent, Preview preview)
      Creates a [Preview][google.cloud.config.v1.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:
      parent - Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      preview - Required. [Preview][google.cloud.config.v1.Preview] resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createPreviewAsync

      public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(String parent, Preview preview)
      Creates a [Preview][google.cloud.config.v1.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:
      parent - Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      preview - Required. [Preview][google.cloud.config.v1.Preview] resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createPreviewAsync

      public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(CreatePreviewRequest request)
      Creates a [Preview][google.cloud.config.v1.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createPreviewOperationCallable

      public final OperationCallable<CreatePreviewRequest,Preview,OperationMetadata> createPreviewOperationCallable()
      Creates a [Preview][google.cloud.config.v1.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();
       }
       
    • createPreviewCallable

      public final UnaryCallable<CreatePreviewRequest,Operation> createPreviewCallable()
      Creates a [Preview][google.cloud.config.v1.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();
       }
       
    • getPreview

      public final Preview getPreview(PreviewName name)
      Gets details about a [Preview][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the preview. Format: 'projects/{project_id}/locations/{location}/previews/{preview}'.
      Throws:
      ApiException - if the remote call fails
    • getPreview

      public final Preview getPreview(String name)
      Gets details about a [Preview][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the preview. Format: 'projects/{project_id}/locations/{location}/previews/{preview}'.
      Throws:
      ApiException - if the remote call fails
    • getPreview

      public final Preview getPreview(GetPreviewRequest request)
      Gets details about a [Preview][google.cloud.config.v1.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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getPreviewCallable

      public final UnaryCallable<GetPreviewRequest,Preview> getPreviewCallable()
      Gets details about a [Preview][google.cloud.config.v1.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();
       }
       
    • listPreviews

      public final ConfigClient.ListPreviewsPagedResponse listPreviews(LocationName parent)
      Lists [Preview][google.cloud.config.v1.Preview]s 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);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the Previews are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      Throws:
      ApiException - if the remote call fails
    • listPreviews

      public final ConfigClient.ListPreviewsPagedResponse listPreviews(String parent)
      Lists [Preview][google.cloud.config.v1.Preview]s 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);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the Previews are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      Throws:
      ApiException - if the remote call fails
    • listPreviews

      public final ConfigClient.ListPreviewsPagedResponse listPreviews(ListPreviewsRequest request)
      Lists [Preview][google.cloud.config.v1.Preview]s 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listPreviewsPagedCallable

      Lists [Preview][google.cloud.config.v1.Preview]s 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);
         }
       }
       
    • listPreviewsCallable

      public final UnaryCallable<ListPreviewsRequest,ListPreviewsResponse> listPreviewsCallable()
      Lists [Preview][google.cloud.config.v1.Preview]s 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;
           }
         }
       }
       
    • deletePreviewAsync

      public final OperationFuture<Preview,OperationMetadata> deletePreviewAsync(PreviewName name)
      Deletes a [Preview][google.cloud.config.v1.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();
       }
       
      Parameters:
      name - Required. The name of the Preview in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.
      Throws:
      ApiException - if the remote call fails
    • deletePreviewAsync

      public final OperationFuture<Preview,OperationMetadata> deletePreviewAsync(String name)
      Deletes a [Preview][google.cloud.config.v1.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();
       }
       
      Parameters:
      name - Required. The name of the Preview in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.
      Throws:
      ApiException - if the remote call fails
    • deletePreviewAsync

      public final OperationFuture<Preview,OperationMetadata> deletePreviewAsync(DeletePreviewRequest request)
      Deletes a [Preview][google.cloud.config.v1.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deletePreviewOperationCallable

      public final OperationCallable<DeletePreviewRequest,Preview,OperationMetadata> deletePreviewOperationCallable()
      Deletes a [Preview][google.cloud.config.v1.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();
       }
       
    • deletePreviewCallable

      public final UnaryCallable<DeletePreviewRequest,Operation> deletePreviewCallable()
      Deletes a [Preview][google.cloud.config.v1.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();
       }
       
    • exportPreviewResult

      public final ExportPreviewResultResponse exportPreviewResult(ExportPreviewResultRequest request)
      Export [Preview][google.cloud.config.v1.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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • exportPreviewResultCallable

      public final UnaryCallable<ExportPreviewResultRequest,ExportPreviewResultResponse> exportPreviewResultCallable()
      Export [Preview][google.cloud.config.v1.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();
       }
       
    • listTerraformVersions

      public final ConfigClient.ListTerraformVersionsPagedResponse listTerraformVersions(LocationName parent)
      Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s 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);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the TerraformVersions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      Throws:
      ApiException - if the remote call fails
    • listTerraformVersions

      public final ConfigClient.ListTerraformVersionsPagedResponse listTerraformVersions(String parent)
      Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s 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);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the TerraformVersions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.
      Throws:
      ApiException - if the remote call fails
    • listTerraformVersions

      Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listTerraformVersionsPagedCallable

      Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s 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);
         }
       }
       
    • listTerraformVersionsCallable

      public final UnaryCallable<ListTerraformVersionsRequest,ListTerraformVersionsResponse> listTerraformVersionsCallable()
      Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s 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;
           }
         }
       }
       
    • getTerraformVersion

      public final TerraformVersion getTerraformVersion(TerraformVersionName name)
      Gets details about a [TerraformVersion][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the TerraformVersion. Format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'
      Throws:
      ApiException - if the remote call fails
    • getTerraformVersion

      public final TerraformVersion getTerraformVersion(String name)
      Gets details about a [TerraformVersion][google.cloud.config.v1.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);
       }
       
      Parameters:
      name - Required. The name of the TerraformVersion. Format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'
      Throws:
      ApiException - if the remote call fails
    • getTerraformVersion

      public final TerraformVersion getTerraformVersion(GetTerraformVersionRequest request)
      Gets details about a [TerraformVersion][google.cloud.config.v1.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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getTerraformVersionCallable

      public final UnaryCallable<GetTerraformVersionRequest,TerraformVersion> getTerraformVersionCallable()
      Gets details about a [TerraformVersion][google.cloud.config.v1.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();
       }
       
    • listResourceChanges

      public final ConfigClient.ListResourceChangesPagedResponse listResourceChanges(PreviewName parent)
      Lists ResourceChanges for a given 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 parent = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]");
         for (ResourceChange element : configClient.listResourceChanges(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the ResourceChanges are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.
      Throws:
      ApiException - if the remote call fails
    • listResourceChanges

      public final ConfigClient.ListResourceChangesPagedResponse listResourceChanges(String parent)
      Lists ResourceChanges for a given 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 = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString();
         for (ResourceChange element : configClient.listResourceChanges(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the ResourceChanges are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.
      Throws:
      ApiException - if the remote call fails
    • listResourceChanges

      Lists ResourceChanges for a given 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()) {
         ListResourceChangesRequest request =
             ListResourceChangesRequest.newBuilder()
                 .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (ResourceChange element : configClient.listResourceChanges(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listResourceChangesPagedCallable

      Lists ResourceChanges for a given 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()) {
         ListResourceChangesRequest request =
             ListResourceChangesRequest.newBuilder()
                 .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<ResourceChange> future =
             configClient.listResourceChangesPagedCallable().futureCall(request);
         // Do something.
         for (ResourceChange element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listResourceChangesCallable

      public final UnaryCallable<ListResourceChangesRequest,ListResourceChangesResponse> listResourceChangesCallable()
      Lists ResourceChanges for a given 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()) {
         ListResourceChangesRequest request =
             ListResourceChangesRequest.newBuilder()
                 .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListResourceChangesResponse response =
               configClient.listResourceChangesCallable().call(request);
           for (ResourceChange element : response.getResourceChangesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getResourceChange

      public final ResourceChange getResourceChange(ResourceChangeName name)
      Get a ResourceChange for a given 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()) {
         ResourceChangeName name =
             ResourceChangeName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_CHANGE]");
         ResourceChange response = configClient.getResourceChange(name);
       }
       
      Parameters:
      name - Required. The name of the resource change to retrieve. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'.
      Throws:
      ApiException - if the remote call fails
    • getResourceChange

      public final ResourceChange getResourceChange(String name)
      Get a ResourceChange for a given 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 =
             ResourceChangeName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_CHANGE]")
                 .toString();
         ResourceChange response = configClient.getResourceChange(name);
       }
       
      Parameters:
      name - Required. The name of the resource change to retrieve. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'.
      Throws:
      ApiException - if the remote call fails
    • getResourceChange

      public final ResourceChange getResourceChange(GetResourceChangeRequest request)
      Get a ResourceChange for a given 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()) {
         GetResourceChangeRequest request =
             GetResourceChangeRequest.newBuilder()
                 .setName(
                     ResourceChangeName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_CHANGE]")
                         .toString())
                 .build();
         ResourceChange response = configClient.getResourceChange(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getResourceChangeCallable

      public final UnaryCallable<GetResourceChangeRequest,ResourceChange> getResourceChangeCallable()
      Get a ResourceChange for a given 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()) {
         GetResourceChangeRequest request =
             GetResourceChangeRequest.newBuilder()
                 .setName(
                     ResourceChangeName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_CHANGE]")
                         .toString())
                 .build();
         ApiFuture<ResourceChange> future =
             configClient.getResourceChangeCallable().futureCall(request);
         // Do something.
         ResourceChange response = future.get();
       }
       
    • listResourceDrifts

      public final ConfigClient.ListResourceDriftsPagedResponse listResourceDrifts(PreviewName parent)
      List ResourceDrifts for a given 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 parent = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]");
         for (ResourceDrift element : configClient.listResourceDrifts(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the ResourceDrifts are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.
      Throws:
      ApiException - if the remote call fails
    • listResourceDrifts

      public final ConfigClient.ListResourceDriftsPagedResponse listResourceDrifts(String parent)
      List ResourceDrifts for a given 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 = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString();
         for (ResourceDrift element : configClient.listResourceDrifts(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent in whose context the ResourceDrifts are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.
      Throws:
      ApiException - if the remote call fails
    • listResourceDrifts

      List ResourceDrifts for a given 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()) {
         ListResourceDriftsRequest request =
             ListResourceDriftsRequest.newBuilder()
                 .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (ResourceDrift element : configClient.listResourceDrifts(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listResourceDriftsPagedCallable

      List ResourceDrifts for a given 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()) {
         ListResourceDriftsRequest request =
             ListResourceDriftsRequest.newBuilder()
                 .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<ResourceDrift> future =
             configClient.listResourceDriftsPagedCallable().futureCall(request);
         // Do something.
         for (ResourceDrift element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listResourceDriftsCallable

      public final UnaryCallable<ListResourceDriftsRequest,ListResourceDriftsResponse> listResourceDriftsCallable()
      List ResourceDrifts for a given 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()) {
         ListResourceDriftsRequest request =
             ListResourceDriftsRequest.newBuilder()
                 .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListResourceDriftsResponse response =
               configClient.listResourceDriftsCallable().call(request);
           for (ResourceDrift element : response.getResourceDriftsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getResourceDrift

      public final ResourceDrift getResourceDrift(ResourceDriftName name)
      Get a ResourceDrift for a given 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()) {
         ResourceDriftName name =
             ResourceDriftName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_DRIFT]");
         ResourceDrift response = configClient.getResourceDrift(name);
       }
       
      Parameters:
      name - Required. The name of the resource drift to retrieve. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'.
      Throws:
      ApiException - if the remote call fails
    • getResourceDrift

      public final ResourceDrift getResourceDrift(String name)
      Get a ResourceDrift for a given 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 =
             ResourceDriftName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_DRIFT]")
                 .toString();
         ResourceDrift response = configClient.getResourceDrift(name);
       }
       
      Parameters:
      name - Required. The name of the resource drift to retrieve. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'.
      Throws:
      ApiException - if the remote call fails
    • getResourceDrift

      public final ResourceDrift getResourceDrift(GetResourceDriftRequest request)
      Get a ResourceDrift for a given 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()) {
         GetResourceDriftRequest request =
             GetResourceDriftRequest.newBuilder()
                 .setName(
                     ResourceDriftName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_DRIFT]")
                         .toString())
                 .build();
         ResourceDrift response = configClient.getResourceDrift(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getResourceDriftCallable

      public final UnaryCallable<GetResourceDriftRequest,ResourceDrift> getResourceDriftCallable()
      Get a ResourceDrift for a given 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()) {
         GetResourceDriftRequest request =
             GetResourceDriftRequest.newBuilder()
                 .setName(
                     ResourceDriftName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_DRIFT]")
                         .toString())
                 .build();
         ApiFuture<ResourceDrift> future = configClient.getResourceDriftCallable().futureCall(request);
         // Do something.
         ResourceDrift response = future.get();
       }
       
    • getAutoMigrationConfig

      public final AutoMigrationConfig getAutoMigrationConfig(AutoMigrationConfigName name)
      Get the AutoMigrationConfig for 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()) {
         AutoMigrationConfigName name = AutoMigrationConfigName.of("[PROJECT]", "[LOCATION]");
         AutoMigrationConfig response = configClient.getAutoMigrationConfig(name);
       }
       
      Parameters:
      name - Required. The name of the AutoMigrationConfig. Format: 'projects/{project_id}/locations/{location}/AutoMigrationConfig'.
      Throws:
      ApiException - if the remote call fails
    • getAutoMigrationConfig

      public final AutoMigrationConfig getAutoMigrationConfig(String name)
      Get the AutoMigrationConfig for 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 name = AutoMigrationConfigName.of("[PROJECT]", "[LOCATION]").toString();
         AutoMigrationConfig response = configClient.getAutoMigrationConfig(name);
       }
       
      Parameters:
      name - Required. The name of the AutoMigrationConfig. Format: 'projects/{project_id}/locations/{location}/AutoMigrationConfig'.
      Throws:
      ApiException - if the remote call fails
    • getAutoMigrationConfig

      public final AutoMigrationConfig getAutoMigrationConfig(GetAutoMigrationConfigRequest request)
      Get the AutoMigrationConfig for 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()) {
         GetAutoMigrationConfigRequest request =
             GetAutoMigrationConfigRequest.newBuilder()
                 .setName(AutoMigrationConfigName.of("[PROJECT]", "[LOCATION]").toString())
                 .build();
         AutoMigrationConfig response = configClient.getAutoMigrationConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getAutoMigrationConfigCallable

      public final UnaryCallable<GetAutoMigrationConfigRequest,AutoMigrationConfig> getAutoMigrationConfigCallable()
      Get the AutoMigrationConfig for 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()) {
         GetAutoMigrationConfigRequest request =
             GetAutoMigrationConfigRequest.newBuilder()
                 .setName(AutoMigrationConfigName.of("[PROJECT]", "[LOCATION]").toString())
                 .build();
         ApiFuture<AutoMigrationConfig> future =
             configClient.getAutoMigrationConfigCallable().futureCall(request);
         // Do something.
         AutoMigrationConfig response = future.get();
       }
       
    • updateAutoMigrationConfigAsync

      public final OperationFuture<AutoMigrationConfig,OperationMetadata> updateAutoMigrationConfigAsync(AutoMigrationConfig autoMigrationConfig, com.google.protobuf.FieldMask updateMask)
      Updates the AutoMigrationConfig for 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()) {
         AutoMigrationConfig autoMigrationConfig = AutoMigrationConfig.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         AutoMigrationConfig response =
             configClient.updateAutoMigrationConfigAsync(autoMigrationConfig, updateMask).get();
       }
       
      Parameters:
      autoMigrationConfig - Required. The AutoMigrationConfig to update.
      updateMask - Optional. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].
      Throws:
      ApiException - if the remote call fails
    • updateAutoMigrationConfigAsync

      public final OperationFuture<AutoMigrationConfig,OperationMetadata> updateAutoMigrationConfigAsync(UpdateAutoMigrationConfigRequest request)
      Updates the AutoMigrationConfig for 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()) {
         UpdateAutoMigrationConfigRequest request =
             UpdateAutoMigrationConfigRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAutoMigrationConfig(AutoMigrationConfig.newBuilder().build())
                 .build();
         AutoMigrationConfig response = configClient.updateAutoMigrationConfigAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateAutoMigrationConfigOperationCallable

      public final OperationCallable<UpdateAutoMigrationConfigRequest,AutoMigrationConfig,OperationMetadata> updateAutoMigrationConfigOperationCallable()
      Updates the AutoMigrationConfig for 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()) {
         UpdateAutoMigrationConfigRequest request =
             UpdateAutoMigrationConfigRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAutoMigrationConfig(AutoMigrationConfig.newBuilder().build())
                 .build();
         OperationFuture<AutoMigrationConfig, OperationMetadata> future =
             configClient.updateAutoMigrationConfigOperationCallable().futureCall(request);
         // Do something.
         AutoMigrationConfig response = future.get();
       }
       
    • updateAutoMigrationConfigCallable

      public final UnaryCallable<UpdateAutoMigrationConfigRequest,Operation> updateAutoMigrationConfigCallable()
      Updates the AutoMigrationConfig for 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()) {
         UpdateAutoMigrationConfigRequest request =
             UpdateAutoMigrationConfigRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAutoMigrationConfig(AutoMigrationConfig.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             configClient.updateAutoMigrationConfigCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getDeploymentGroup

      public final DeploymentGroup getDeploymentGroup(DeploymentGroupName name)
      Get a DeploymentGroup for 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()) {
         DeploymentGroupName name =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]");
         DeploymentGroup response = configClient.getDeploymentGroup(name);
       }
       
      Parameters:
      name - Required. The name of the deployment group to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      Throws:
      ApiException - if the remote call fails
    • getDeploymentGroup

      public final DeploymentGroup getDeploymentGroup(String name)
      Get a DeploymentGroup for 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 name =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString();
         DeploymentGroup response = configClient.getDeploymentGroup(name);
       }
       
      Parameters:
      name - Required. The name of the deployment group to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      Throws:
      ApiException - if the remote call fails
    • getDeploymentGroup

      public final DeploymentGroup getDeploymentGroup(GetDeploymentGroupRequest request)
      Get a DeploymentGroup for 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()) {
         GetDeploymentGroupRequest request =
             GetDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .build();
         DeploymentGroup response = configClient.getDeploymentGroup(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getDeploymentGroupCallable

      public final UnaryCallable<GetDeploymentGroupRequest,DeploymentGroup> getDeploymentGroupCallable()
      Get a DeploymentGroup for 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()) {
         GetDeploymentGroupRequest request =
             GetDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .build();
         ApiFuture<DeploymentGroup> future =
             configClient.getDeploymentGroupCallable().futureCall(request);
         // Do something.
         DeploymentGroup response = future.get();
       }
       
    • createDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> createDeploymentGroupAsync(LocationName parent, DeploymentGroup deploymentGroup, String deploymentGroupId)
      Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.

      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]");
         DeploymentGroup deploymentGroup = DeploymentGroup.newBuilder().build();
         String deploymentGroupId = "deploymentGroupId717062517";
         DeploymentGroup response =
             configClient.createDeploymentGroupAsync(parent, deploymentGroup, deploymentGroupId).get();
       }
       
      Parameters:
      parent - Required. The parent in whose context the Deployment Group is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'
      deploymentGroup - Required. [Deployment Group][] resource to create
      deploymentGroupId - Required. The deployment group ID.
      Throws:
      ApiException - if the remote call fails
    • createDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> createDeploymentGroupAsync(String parent, DeploymentGroup deploymentGroup, String deploymentGroupId)
      Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.

      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();
         DeploymentGroup deploymentGroup = DeploymentGroup.newBuilder().build();
         String deploymentGroupId = "deploymentGroupId717062517";
         DeploymentGroup response =
             configClient.createDeploymentGroupAsync(parent, deploymentGroup, deploymentGroupId).get();
       }
       
      Parameters:
      parent - Required. The parent in whose context the Deployment Group is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'
      deploymentGroup - Required. [Deployment Group][] resource to create
      deploymentGroupId - Required. The deployment group ID.
      Throws:
      ApiException - if the remote call fails
    • createDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> createDeploymentGroupAsync(CreateDeploymentGroupRequest request)
      Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.

      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()) {
         CreateDeploymentGroupRequest request =
             CreateDeploymentGroupRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setDeploymentGroupId("deploymentGroupId717062517")
                 .setDeploymentGroup(DeploymentGroup.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         DeploymentGroup response = configClient.createDeploymentGroupAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createDeploymentGroupOperationCallable

      public final OperationCallable<CreateDeploymentGroupRequest,DeploymentGroup,OperationMetadata> createDeploymentGroupOperationCallable()
      Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.

      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()) {
         CreateDeploymentGroupRequest request =
             CreateDeploymentGroupRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setDeploymentGroupId("deploymentGroupId717062517")
                 .setDeploymentGroup(DeploymentGroup.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<DeploymentGroup, OperationMetadata> future =
             configClient.createDeploymentGroupOperationCallable().futureCall(request);
         // Do something.
         DeploymentGroup response = future.get();
       }
       
    • createDeploymentGroupCallable

      public final UnaryCallable<CreateDeploymentGroupRequest,Operation> createDeploymentGroupCallable()
      Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.

      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()) {
         CreateDeploymentGroupRequest request =
             CreateDeploymentGroupRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setDeploymentGroupId("deploymentGroupId717062517")
                 .setDeploymentGroup(DeploymentGroup.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             configClient.createDeploymentGroupCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> updateDeploymentGroupAsync(DeploymentGroup deploymentGroup, com.google.protobuf.FieldMask updateMask)
      Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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()) {
         DeploymentGroup deploymentGroup = DeploymentGroup.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         DeploymentGroup response =
             configClient.updateDeploymentGroupAsync(deploymentGroup, updateMask).get();
       }
       
      Parameters:
      deploymentGroup - Required. [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] to update.

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

      updateMask - Optional. Field mask used to specify the fields to be overwritten in the Deployment Group 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.

      Throws:
      ApiException - if the remote call fails
    • updateDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> updateDeploymentGroupAsync(UpdateDeploymentGroupRequest request)
      Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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()) {
         UpdateDeploymentGroupRequest request =
             UpdateDeploymentGroupRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDeploymentGroup(DeploymentGroup.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         DeploymentGroup response = configClient.updateDeploymentGroupAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateDeploymentGroupOperationCallable

      public final OperationCallable<UpdateDeploymentGroupRequest,DeploymentGroup,OperationMetadata> updateDeploymentGroupOperationCallable()
      Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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()) {
         UpdateDeploymentGroupRequest request =
             UpdateDeploymentGroupRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDeploymentGroup(DeploymentGroup.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<DeploymentGroup, OperationMetadata> future =
             configClient.updateDeploymentGroupOperationCallable().futureCall(request);
         // Do something.
         DeploymentGroup response = future.get();
       }
       
    • updateDeploymentGroupCallable

      public final UnaryCallable<UpdateDeploymentGroupRequest,Operation> updateDeploymentGroupCallable()
      Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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()) {
         UpdateDeploymentGroupRequest request =
             UpdateDeploymentGroupRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDeploymentGroup(DeploymentGroup.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             configClient.updateDeploymentGroupCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> deleteDeploymentGroupAsync(DeploymentGroupName name)
      Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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()) {
         DeploymentGroupName name =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]");
         DeploymentGroup response = configClient.deleteDeploymentGroupAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of DeploymentGroup in the format projects/{project_id}/locations/{location_id}/deploymentGroups/{deploymentGroup}
      Throws:
      ApiException - if the remote call fails
    • deleteDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> deleteDeploymentGroupAsync(String name)
      Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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 =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString();
         DeploymentGroup response = configClient.deleteDeploymentGroupAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of DeploymentGroup in the format projects/{project_id}/locations/{location_id}/deploymentGroups/{deploymentGroup}
      Throws:
      ApiException - if the remote call fails
    • deleteDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> deleteDeploymentGroupAsync(DeleteDeploymentGroupRequest request)
      Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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()) {
         DeleteDeploymentGroupRequest request =
             DeleteDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         DeploymentGroup response = configClient.deleteDeploymentGroupAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteDeploymentGroupOperationCallable

      public final OperationCallable<DeleteDeploymentGroupRequest,DeploymentGroup,OperationMetadata> deleteDeploymentGroupOperationCallable()
      Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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()) {
         DeleteDeploymentGroupRequest request =
             DeleteDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         OperationFuture<DeploymentGroup, OperationMetadata> future =
             configClient.deleteDeploymentGroupOperationCallable().futureCall(request);
         // Do something.
         DeploymentGroup response = future.get();
       }
       
    • deleteDeploymentGroupCallable

      public final UnaryCallable<DeleteDeploymentGroupRequest,Operation> deleteDeploymentGroupCallable()
      Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]

      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()) {
         DeleteDeploymentGroupRequest request =
             DeleteDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         ApiFuture<Operation> future =
             configClient.deleteDeploymentGroupCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listDeploymentGroups

      public final ConfigClient.ListDeploymentGroupsPagedResponse listDeploymentGroups(LocationName parent)
      List DeploymentGroups for 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 (DeploymentGroup element : configClient.listDeploymentGroups(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of deployment groups. Format: 'projects/{project_id}/locations/{location}'.
      Throws:
      ApiException - if the remote call fails
    • listDeploymentGroups

      public final ConfigClient.ListDeploymentGroupsPagedResponse listDeploymentGroups(String parent)
      List DeploymentGroups for 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 (DeploymentGroup element : configClient.listDeploymentGroups(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of deployment groups. Format: 'projects/{project_id}/locations/{location}'.
      Throws:
      ApiException - if the remote call fails
    • listDeploymentGroups

      List DeploymentGroups for 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()) {
         ListDeploymentGroupsRequest request =
             ListDeploymentGroupsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (DeploymentGroup element : configClient.listDeploymentGroups(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listDeploymentGroupsPagedCallable

      List DeploymentGroups for 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()) {
         ListDeploymentGroupsRequest request =
             ListDeploymentGroupsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<DeploymentGroup> future =
             configClient.listDeploymentGroupsPagedCallable().futureCall(request);
         // Do something.
         for (DeploymentGroup element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDeploymentGroupsCallable

      public final UnaryCallable<ListDeploymentGroupsRequest,ListDeploymentGroupsResponse> listDeploymentGroupsCallable()
      List DeploymentGroups for 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()) {
         ListDeploymentGroupsRequest request =
             ListDeploymentGroupsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListDeploymentGroupsResponse response =
               configClient.listDeploymentGroupsCallable().call(request);
           for (DeploymentGroup element : response.getDeploymentGroupsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • provisionDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> provisionDeploymentGroupAsync(DeploymentGroupName name)
      Provisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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()) {
         DeploymentGroupName name =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]");
         DeploymentGroup response = configClient.provisionDeploymentGroupAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the deployment group to provision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      Throws:
      ApiException - if the remote call fails
    • provisionDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> provisionDeploymentGroupAsync(String name)
      Provisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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 =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString();
         DeploymentGroup response = configClient.provisionDeploymentGroupAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the deployment group to provision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      Throws:
      ApiException - if the remote call fails
    • provisionDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> provisionDeploymentGroupAsync(ProvisionDeploymentGroupRequest request)
      Provisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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()) {
         ProvisionDeploymentGroupRequest request =
             ProvisionDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .putAllDeploymentSpecs(new HashMap<String, DeploymentSpec>())
                 .build();
         DeploymentGroup response = configClient.provisionDeploymentGroupAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • provisionDeploymentGroupOperationCallable

      public final OperationCallable<ProvisionDeploymentGroupRequest,DeploymentGroup,OperationMetadata> provisionDeploymentGroupOperationCallable()
      Provisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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()) {
         ProvisionDeploymentGroupRequest request =
             ProvisionDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .putAllDeploymentSpecs(new HashMap<String, DeploymentSpec>())
                 .build();
         OperationFuture<DeploymentGroup, OperationMetadata> future =
             configClient.provisionDeploymentGroupOperationCallable().futureCall(request);
         // Do something.
         DeploymentGroup response = future.get();
       }
       
    • provisionDeploymentGroupCallable

      public final UnaryCallable<ProvisionDeploymentGroupRequest,Operation> provisionDeploymentGroupCallable()
      Provisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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()) {
         ProvisionDeploymentGroupRequest request =
             ProvisionDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .putAllDeploymentSpecs(new HashMap<String, DeploymentSpec>())
                 .build();
         ApiFuture<Operation> future =
             configClient.provisionDeploymentGroupCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deprovisionDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> deprovisionDeploymentGroupAsync(DeploymentGroupName name)
      Deprovisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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()) {
         DeploymentGroupName name =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]");
         DeploymentGroup response = configClient.deprovisionDeploymentGroupAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the deployment group to deprovision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      Throws:
      ApiException - if the remote call fails
    • deprovisionDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> deprovisionDeploymentGroupAsync(String name)
      Deprovisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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 =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString();
         DeploymentGroup response = configClient.deprovisionDeploymentGroupAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the deployment group to deprovision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      Throws:
      ApiException - if the remote call fails
    • deprovisionDeploymentGroupAsync

      public final OperationFuture<DeploymentGroup,OperationMetadata> deprovisionDeploymentGroupAsync(DeprovisionDeploymentGroupRequest request)
      Deprovisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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()) {
         DeprovisionDeploymentGroupRequest request =
             DeprovisionDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setForce(true)
                 .build();
         DeploymentGroup response = configClient.deprovisionDeploymentGroupAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deprovisionDeploymentGroupOperationCallable

      public final OperationCallable<DeprovisionDeploymentGroupRequest,DeploymentGroup,OperationMetadata> deprovisionDeploymentGroupOperationCallable()
      Deprovisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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()) {
         DeprovisionDeploymentGroupRequest request =
             DeprovisionDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setForce(true)
                 .build();
         OperationFuture<DeploymentGroup, OperationMetadata> future =
             configClient.deprovisionDeploymentGroupOperationCallable().futureCall(request);
         // Do something.
         DeploymentGroup response = future.get();
       }
       
    • deprovisionDeploymentGroupCallable

      public final UnaryCallable<DeprovisionDeploymentGroupRequest,Operation> deprovisionDeploymentGroupCallable()
      Deprovisions a deployment group.

      NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the

      • last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

      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()) {
         DeprovisionDeploymentGroupRequest request =
             DeprovisionDeploymentGroupRequest.newBuilder()
                 .setName(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setForce(true)
                 .build();
         ApiFuture<Operation> future =
             configClient.deprovisionDeploymentGroupCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getDeploymentGroupRevision

      public final DeploymentGroupRevision getDeploymentGroupRevision(DeploymentGroupRevisionName name)
      Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].

      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()) {
         DeploymentGroupRevisionName name =
             DeploymentGroupRevisionName.of(
                 "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]", "[REVISION]");
         DeploymentGroupRevision response = configClient.getDeploymentGroupRevision(name);
       }
       
      Parameters:
      name - Required. The name of the deployment group revision to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}'.
      Throws:
      ApiException - if the remote call fails
    • getDeploymentGroupRevision

      public final DeploymentGroupRevision getDeploymentGroupRevision(String name)
      Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].

      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 =
             DeploymentGroupRevisionName.of(
                     "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]", "[REVISION]")
                 .toString();
         DeploymentGroupRevision response = configClient.getDeploymentGroupRevision(name);
       }
       
      Parameters:
      name - Required. The name of the deployment group revision to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}'.
      Throws:
      ApiException - if the remote call fails
    • getDeploymentGroupRevision

      public final DeploymentGroupRevision getDeploymentGroupRevision(GetDeploymentGroupRevisionRequest request)
      Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].

      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()) {
         GetDeploymentGroupRevisionRequest request =
             GetDeploymentGroupRevisionRequest.newBuilder()
                 .setName(
                     DeploymentGroupRevisionName.of(
                             "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]", "[REVISION]")
                         .toString())
                 .build();
         DeploymentGroupRevision response = configClient.getDeploymentGroupRevision(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getDeploymentGroupRevisionCallable

      public final UnaryCallable<GetDeploymentGroupRevisionRequest,DeploymentGroupRevision> getDeploymentGroupRevisionCallable()
      Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].

      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()) {
         GetDeploymentGroupRevisionRequest request =
             GetDeploymentGroupRevisionRequest.newBuilder()
                 .setName(
                     DeploymentGroupRevisionName.of(
                             "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]", "[REVISION]")
                         .toString())
                 .build();
         ApiFuture<DeploymentGroupRevision> future =
             configClient.getDeploymentGroupRevisionCallable().futureCall(request);
         // Do something.
         DeploymentGroupRevision response = future.get();
       }
       
    • listDeploymentGroupRevisions

      public final ConfigClient.ListDeploymentGroupRevisionsPagedResponse listDeploymentGroupRevisions(DeploymentGroupName parent)
      Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].

      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()) {
         DeploymentGroupName parent =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]");
         for (DeploymentGroupRevision element :
             configClient.listDeploymentGroupRevisions(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of deployment group revisions. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      Throws:
      ApiException - if the remote call fails
    • listDeploymentGroupRevisions

      public final ConfigClient.ListDeploymentGroupRevisionsPagedResponse listDeploymentGroupRevisions(String parent)
      Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].

      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 =
             DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString();
         for (DeploymentGroupRevision element :
             configClient.listDeploymentGroupRevisions(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of deployment group revisions. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      Throws:
      ApiException - if the remote call fails
    • listDeploymentGroupRevisions

      Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].

      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()) {
         ListDeploymentGroupRevisionsRequest request =
             ListDeploymentGroupRevisionsRequest.newBuilder()
                 .setParent(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (DeploymentGroupRevision element :
             configClient.listDeploymentGroupRevisions(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listDeploymentGroupRevisionsPagedCallable

      Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].

      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()) {
         ListDeploymentGroupRevisionsRequest request =
             ListDeploymentGroupRevisionsRequest.newBuilder()
                 .setParent(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<DeploymentGroupRevision> future =
             configClient.listDeploymentGroupRevisionsPagedCallable().futureCall(request);
         // Do something.
         for (DeploymentGroupRevision element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDeploymentGroupRevisionsCallable

      public final UnaryCallable<ListDeploymentGroupRevisionsRequest,ListDeploymentGroupRevisionsResponse> listDeploymentGroupRevisionsCallable()
      Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].

      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()) {
         ListDeploymentGroupRevisionsRequest request =
             ListDeploymentGroupRevisionsRequest.newBuilder()
                 .setParent(
                     DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListDeploymentGroupRevisionsResponse response =
               configClient.listDeploymentGroupRevisionsCallable().call(request);
           for (DeploymentGroupRevision element : response.getDeploymentGroupRevisionsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listLocations

      public final ConfigClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)
      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      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);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      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;
           }
         }
       }
       
    • getLocation

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • setIamPolicy

      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_DENIED`errors.

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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_DENIED`errors.

      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();
       }
       
    • getIamPolicy

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • testIamPermissions

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException