Class ConfigClient

  • All Implemented Interfaces:
    com.google.api.gax.core.BackgroundResource, AutoCloseable

    @Generated("by gapic-generator-java")
    public class ConfigClient
    extends Object
    implements com.google.api.gax.core.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().

    The surface of this class includes several types of Java methods for each of the API's methods:

    1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
    2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
    3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

    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 Detail

      • 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 Detail

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

        public final com.google.longrunning.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 com.google.api.gax.httpjson.longrunning.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listDeploymentsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDeploymentsRequest,​ConfigClient.ListDeploymentsPagedResponse> 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 com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDeploymentCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createDeploymentOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<CreateDeploymentRequest,​com.google.longrunning.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateDeploymentOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<UpdateDeploymentRequest,​com.google.longrunning.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteDeploymentOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<DeleteDeploymentRequest,​com.google.longrunning.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listRevisionsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListRevisionsRequest,​ConfigClient.ListRevisionsPagedResponse> 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 com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRevisionCallable

        public final com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getResourceCallable

        public final com.google.api.gax.rpc.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 [Resource][google.cloud.config.v1.Resource]s 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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listResources

        public final ConfigClient.ListResourcesPagedResponse listResources​(String parent)
        Lists [Resource][google.cloud.config.v1.Resource]s 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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listResources

        public final ConfigClient.ListResourcesPagedResponse listResources​(ListResourcesRequest request)
        Lists [Resource][google.cloud.config.v1.Resource]s 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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listResourcesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListResourcesRequest,​ConfigClient.ListResourcesPagedResponse> listResourcesPagedCallable()
        Lists [Resource][google.cloud.config.v1.Resource]s 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 com.google.api.gax.rpc.UnaryCallable<ListResourcesRequest,​ListResourcesResponse> listResourcesCallable()
        Lists [Resource][google.cloud.config.v1.Resource]s 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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • exportDeploymentStatefileCallable

        public final com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • exportRevisionStatefileCallable

        public final com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • importStatefileCallable

        public final com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteStatefileCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • lockDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • lockDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • lockDeploymentOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<LockDeploymentRequest,​com.google.longrunning.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • unlockDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • unlockDeploymentAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • unlockDeploymentOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<UnlockDeploymentRequest,​com.google.longrunning.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • exportLockInfoCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • listLocations

        public final ConfigClient.ListLocationsPagedResponse listLocations​(com.google.cloud.location.ListLocationsRequest request)
        Lists information about the supported locations for this service.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (ConfigClient configClient = ConfigClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Location element : configClient.listLocations(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listLocationsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,​ConfigClient.ListLocationsPagedResponse> listLocationsPagedCallable()
        Lists information about the supported locations for this service.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (ConfigClient configClient = ConfigClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Location> future = configClient.listLocationsPagedCallable().futureCall(request);
           // Do something.
           for (Location element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listLocationsCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,​com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
        Lists information about the supported locations for this service.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (ConfigClient configClient = ConfigClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListLocationsResponse response = configClient.listLocationsCallable().call(request);
             for (Location element : response.getLocationsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getLocation

        public final com.google.cloud.location.Location getLocation​(com.google.cloud.location.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getLocationCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,​com.google.cloud.location.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 com.google.iam.v1.Policy setIamPolicy​(com.google.iam.v1.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • setIamPolicyCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,​com.google.iam.v1.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 com.google.iam.v1.Policy getIamPolicy​(com.google.iam.v1.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getIamPolicyCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,​com.google.iam.v1.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 com.google.iam.v1.TestIamPermissionsResponse testIamPermissions​(com.google.iam.v1.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • testIamPermissionsCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,​com.google.iam.v1.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();
         }
         
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface com.google.api.gax.core.BackgroundResource
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in interface com.google.api.gax.core.BackgroundResource
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface com.google.api.gax.core.BackgroundResource
      • shutdownNow

        public void shutdownNow()
        Specified by:
        shutdownNow in interface com.google.api.gax.core.BackgroundResource