Class CloudDeployClient (1.28.0)

GitHub RepositoryProduct Reference

Service Description: CloudDeploy service creates and manages Continuous Delivery operations on Google Cloud Platform via Skaffold (https://skaffold.dev).

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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeliveryPipelineName name =
       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
   DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
 }
 

Note: close() needs to be called on the CloudDeployClient 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 CloudDeploySettings 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
 CloudDeploySettings cloudDeploySettings =
     CloudDeploySettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
 

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
 CloudDeploySettings cloudDeploySettings =
     CloudDeploySettings.newBuilder().setEndpoint(myEndpoint).build();
 CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
 

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
 CloudDeploySettings cloudDeploySettings = CloudDeploySettings.newHttpJsonBuilder().build();
 CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
 

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

Inheritance

java.lang.Object > CloudDeployClient

Static Methods

create()

public static final CloudDeployClient create()

Constructs an instance of CloudDeployClient with default settings.

Returns
TypeDescription
CloudDeployClient
Exceptions
TypeDescription
IOException

create(CloudDeploySettings settings)

public static final CloudDeployClient create(CloudDeploySettings settings)

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

Parameter
NameDescription
settingsCloudDeploySettings
Returns
TypeDescription
CloudDeployClient
Exceptions
TypeDescription
IOException

create(CloudDeployStub stub)

public static final CloudDeployClient create(CloudDeployStub stub)

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

Parameter
NameDescription
stubCloudDeployStub
Returns
TypeDescription
CloudDeployClient

Constructors

CloudDeployClient(CloudDeploySettings settings)

protected CloudDeployClient(CloudDeploySettings settings)

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

Parameter
NameDescription
settingsCloudDeploySettings

CloudDeployClient(CloudDeployStub stub)

protected CloudDeployClient(CloudDeployStub stub)
Parameter
NameDescription
stubCloudDeployStub

Methods

abandonRelease(AbandonReleaseRequest request)

public final AbandonReleaseResponse abandonRelease(AbandonReleaseRequest request)

Abandons a Release in the Delivery Pipeline.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   AbandonReleaseRequest request =
       AbandonReleaseRequest.newBuilder()
           .setName(
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                   .toString())
           .build();
   AbandonReleaseResponse response = cloudDeployClient.abandonRelease(request);
 }
 
Parameter
NameDescription
requestAbandonReleaseRequest

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

Returns
TypeDescription
AbandonReleaseResponse

abandonRelease(ReleaseName name)

public final AbandonReleaseResponse abandonRelease(ReleaseName name)

Abandons a Release in the Delivery Pipeline.

Sample code:


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

Required. Name of the Release. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}.

Returns
TypeDescription
AbandonReleaseResponse

abandonRelease(String name)

public final AbandonReleaseResponse abandonRelease(String name)

Abandons a Release in the Delivery Pipeline.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String name =
       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
   AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the Release. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}.

Returns
TypeDescription
AbandonReleaseResponse

abandonReleaseCallable()

public final UnaryCallable<AbandonReleaseRequest,AbandonReleaseResponse> abandonReleaseCallable()

Abandons a Release in the Delivery Pipeline.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   AbandonReleaseRequest request =
       AbandonReleaseRequest.newBuilder()
           .setName(
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                   .toString())
           .build();
   ApiFuture<AbandonReleaseResponse> future =
       cloudDeployClient.abandonReleaseCallable().futureCall(request);
   // Do something.
   AbandonReleaseResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<AbandonReleaseRequest,AbandonReleaseResponse>

advanceRollout(AdvanceRolloutRequest request)

public final AdvanceRolloutResponse advanceRollout(AdvanceRolloutRequest request)

Advances a Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   AdvanceRolloutRequest request =
       AdvanceRolloutRequest.newBuilder()
           .setName(
               RolloutName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[DELIVERY_PIPELINE]",
                       "[RELEASE]",
                       "[ROLLOUT]")
                   .toString())
           .setPhaseId("phaseId-608264202")
           .build();
   AdvanceRolloutResponse response = cloudDeployClient.advanceRollout(request);
 }
 
Parameter
NameDescription
requestAdvanceRolloutRequest

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

Returns
TypeDescription
AdvanceRolloutResponse

advanceRollout(RolloutName name, String phaseId)

public final AdvanceRolloutResponse advanceRollout(RolloutName name, String phaseId)

Advances a Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   RolloutName name =
       RolloutName.of(
           "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
   String phaseId = "phaseId-608264202";
   AdvanceRolloutResponse response = cloudDeployClient.advanceRollout(name, phaseId);
 }
 
Parameters
NameDescription
nameRolloutName

Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

phaseIdString

Required. The phase ID to advance the Rollout to.

Returns
TypeDescription
AdvanceRolloutResponse

advanceRollout(String name, String phaseId)

public final AdvanceRolloutResponse advanceRollout(String name, String phaseId)

Advances a Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String name =
       RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
           .toString();
   String phaseId = "phaseId-608264202";
   AdvanceRolloutResponse response = cloudDeployClient.advanceRollout(name, phaseId);
 }
 
Parameters
NameDescription
nameString

Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

phaseIdString

Required. The phase ID to advance the Rollout to.

Returns
TypeDescription
AdvanceRolloutResponse

advanceRolloutCallable()

public final UnaryCallable<AdvanceRolloutRequest,AdvanceRolloutResponse> advanceRolloutCallable()

Advances a Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   AdvanceRolloutRequest request =
       AdvanceRolloutRequest.newBuilder()
           .setName(
               RolloutName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[DELIVERY_PIPELINE]",
                       "[RELEASE]",
                       "[ROLLOUT]")
                   .toString())
           .setPhaseId("phaseId-608264202")
           .build();
   ApiFuture<AdvanceRolloutResponse> future =
       cloudDeployClient.advanceRolloutCallable().futureCall(request);
   // Do something.
   AdvanceRolloutResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<AdvanceRolloutRequest,AdvanceRolloutResponse>

approveRollout(ApproveRolloutRequest request)

public final ApproveRolloutResponse approveRollout(ApproveRolloutRequest request)

Approves a Rollout.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   ApproveRolloutRequest request =
       ApproveRolloutRequest.newBuilder()
           .setName(
               RolloutName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[DELIVERY_PIPELINE]",
                       "[RELEASE]",
                       "[ROLLOUT]")
                   .toString())
           .setApproved(true)
           .build();
   ApproveRolloutResponse response = cloudDeployClient.approveRollout(request);
 }
 
Parameter
NameDescription
requestApproveRolloutRequest

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

Returns
TypeDescription
ApproveRolloutResponse

approveRollout(RolloutName name)

public final ApproveRolloutResponse approveRollout(RolloutName name)

Approves a Rollout.

Sample code:


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

Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

Returns
TypeDescription
ApproveRolloutResponse

approveRollout(String name)

public final ApproveRolloutResponse approveRollout(String name)

Approves a Rollout.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String name =
       RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
           .toString();
   ApproveRolloutResponse response = cloudDeployClient.approveRollout(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

Returns
TypeDescription
ApproveRolloutResponse

approveRolloutCallable()

public final UnaryCallable<ApproveRolloutRequest,ApproveRolloutResponse> approveRolloutCallable()

Approves a Rollout.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   ApproveRolloutRequest request =
       ApproveRolloutRequest.newBuilder()
           .setName(
               RolloutName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[DELIVERY_PIPELINE]",
                       "[RELEASE]",
                       "[ROLLOUT]")
                   .toString())
           .setApproved(true)
           .build();
   ApiFuture<ApproveRolloutResponse> future =
       cloudDeployClient.approveRolloutCallable().futureCall(request);
   // Do something.
   ApproveRolloutResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<ApproveRolloutRequest,ApproveRolloutResponse>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

cancelAutomationRun(AutomationRunName name)

public final CancelAutomationRunResponse cancelAutomationRun(AutomationRunName name)

Cancels an AutomationRun. The state of the AutomationRun after cancelling is CANCELLED. CancelAutomationRun can be called on AutomationRun in the state IN_PROGRESS and PENDING; AutomationRun in a different state returns an FAILED_PRECONDITION error.

Sample code:


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

Required. Name of the AutomationRun. Format is projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}.

Returns
TypeDescription
CancelAutomationRunResponse

cancelAutomationRun(CancelAutomationRunRequest request)

public final CancelAutomationRunResponse cancelAutomationRun(CancelAutomationRunRequest request)

Cancels an AutomationRun. The state of the AutomationRun after cancelling is CANCELLED. CancelAutomationRun can be called on AutomationRun in the state IN_PROGRESS and PENDING; AutomationRun in a different state returns an FAILED_PRECONDITION error.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CancelAutomationRunRequest request =
       CancelAutomationRunRequest.newBuilder()
           .setName(
               AutomationRunName.of(
                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
                   .toString())
           .build();
   CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(request);
 }
 
Parameter
NameDescription
requestCancelAutomationRunRequest

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

Returns
TypeDescription
CancelAutomationRunResponse

cancelAutomationRun(String name)

public final CancelAutomationRunResponse cancelAutomationRun(String name)

Cancels an AutomationRun. The state of the AutomationRun after cancelling is CANCELLED. CancelAutomationRun can be called on AutomationRun in the state IN_PROGRESS and PENDING; AutomationRun in a different state returns an FAILED_PRECONDITION error.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String name =
       AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
           .toString();
   CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the AutomationRun. Format is projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}.

Returns
TypeDescription
CancelAutomationRunResponse

cancelAutomationRunCallable()

public final UnaryCallable<CancelAutomationRunRequest,CancelAutomationRunResponse> cancelAutomationRunCallable()

Cancels an AutomationRun. The state of the AutomationRun after cancelling is CANCELLED. CancelAutomationRun can be called on AutomationRun in the state IN_PROGRESS and PENDING; AutomationRun in a different state returns an FAILED_PRECONDITION error.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CancelAutomationRunRequest request =
       CancelAutomationRunRequest.newBuilder()
           .setName(
               AutomationRunName.of(
                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
                   .toString())
           .build();
   ApiFuture<CancelAutomationRunResponse> future =
       cloudDeployClient.cancelAutomationRunCallable().futureCall(request);
   // Do something.
   CancelAutomationRunResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CancelAutomationRunRequest,CancelAutomationRunResponse>

cancelRollout(CancelRolloutRequest request)

public final CancelRolloutResponse cancelRollout(CancelRolloutRequest request)

Cancels a Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CancelRolloutRequest request =
       CancelRolloutRequest.newBuilder()
           .setName(
               RolloutName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[DELIVERY_PIPELINE]",
                       "[RELEASE]",
                       "[ROLLOUT]")
                   .toString())
           .build();
   CancelRolloutResponse response = cloudDeployClient.cancelRollout(request);
 }
 
Parameter
NameDescription
requestCancelRolloutRequest

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

Returns
TypeDescription
CancelRolloutResponse

cancelRollout(RolloutName name)

public final CancelRolloutResponse cancelRollout(RolloutName name)

Cancels a Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   RolloutName name =
       RolloutName.of(
           "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
   CancelRolloutResponse response = cloudDeployClient.cancelRollout(name);
 }
 
Parameter
NameDescription
nameRolloutName

Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

Returns
TypeDescription
CancelRolloutResponse

cancelRollout(String name)

public final CancelRolloutResponse cancelRollout(String name)

Cancels a Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String name =
       RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
           .toString();
   CancelRolloutResponse response = cloudDeployClient.cancelRollout(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.

Returns
TypeDescription
CancelRolloutResponse

cancelRolloutCallable()

public final UnaryCallable<CancelRolloutRequest,CancelRolloutResponse> cancelRolloutCallable()

Cancels a Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CancelRolloutRequest request =
       CancelRolloutRequest.newBuilder()
           .setName(
               RolloutName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[DELIVERY_PIPELINE]",
                       "[RELEASE]",
                       "[ROLLOUT]")
                   .toString())
           .build();
   ApiFuture<CancelRolloutResponse> future =
       cloudDeployClient.cancelRolloutCallable().futureCall(request);
   // Do something.
   CancelRolloutResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CancelRolloutRequest,CancelRolloutResponse>

close()

public final void close()

createAutomationAsync(CreateAutomationRequest request)

public final OperationFuture<Automation,OperationMetadata> createAutomationAsync(CreateAutomationRequest request)

Creates a new Automation 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateAutomationRequest request =
       CreateAutomationRequest.newBuilder()
           .setParent(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setAutomationId("automationId64173202")
           .setAutomation(Automation.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   Automation response = cloudDeployClient.createAutomationAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateAutomationRequest

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

Returns
TypeDescription
OperationFuture<Automation,OperationMetadata>

createAutomationAsync(DeliveryPipelineName parent, Automation automation, String automationId)

public final OperationFuture<Automation,OperationMetadata> createAutomationAsync(DeliveryPipelineName parent, Automation automation, String automationId)

Creates a new Automation 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeliveryPipelineName parent =
       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
   Automation automation = Automation.newBuilder().build();
   String automationId = "automationId64173202";
   Automation response =
       cloudDeployClient.createAutomationAsync(parent, automation, automationId).get();
 }
 
Parameters
NameDescription
parentDeliveryPipelineName

Required. The parent collection in which the Automation should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

automationAutomation

Required. The Automation to create.

automationIdString

Required. ID of the Automation.

Returns
TypeDescription
OperationFuture<Automation,OperationMetadata>

createAutomationAsync(String parent, Automation automation, String automationId)

public final OperationFuture<Automation,OperationMetadata> createAutomationAsync(String parent, Automation automation, String automationId)

Creates a new Automation 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String parent =
       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
   Automation automation = Automation.newBuilder().build();
   String automationId = "automationId64173202";
   Automation response =
       cloudDeployClient.createAutomationAsync(parent, automation, automationId).get();
 }
 
Parameters
NameDescription
parentString

Required. The parent collection in which the Automation should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

automationAutomation

Required. The Automation to create.

automationIdString

Required. ID of the Automation.

Returns
TypeDescription
OperationFuture<Automation,OperationMetadata>

createAutomationCallable()

public final UnaryCallable<CreateAutomationRequest,Operation> createAutomationCallable()

Creates a new Automation 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateAutomationRequest request =
       CreateAutomationRequest.newBuilder()
           .setParent(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setAutomationId("automationId64173202")
           .setAutomation(Automation.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future =
       cloudDeployClient.createAutomationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateAutomationRequest,Operation>

createAutomationOperationCallable()

public final OperationCallable<CreateAutomationRequest,Automation,OperationMetadata> createAutomationOperationCallable()

Creates a new Automation 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateAutomationRequest request =
       CreateAutomationRequest.newBuilder()
           .setParent(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setAutomationId("automationId64173202")
           .setAutomation(Automation.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   OperationFuture<Automation, OperationMetadata> future =
       cloudDeployClient.createAutomationOperationCallable().futureCall(request);
   // Do something.
   Automation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateAutomationRequest,Automation,OperationMetadata>

createDeliveryPipelineAsync(CreateDeliveryPipelineRequest request)

public final OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(CreateDeliveryPipelineRequest request)

Creates a new DeliveryPipeline 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateDeliveryPipelineRequest request =
       CreateDeliveryPipelineRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setDeliveryPipelineId("deliveryPipelineId-632411535")
           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   DeliveryPipeline response = cloudDeployClient.createDeliveryPipelineAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateDeliveryPipelineRequest

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

Returns
TypeDescription
OperationFuture<DeliveryPipeline,OperationMetadata>

createDeliveryPipelineAsync(LocationName parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)

public final OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(LocationName parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)

Creates a new DeliveryPipeline 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
   String deliveryPipelineId = "deliveryPipelineId-632411535";
   DeliveryPipeline response =
       cloudDeployClient
           .createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId)
           .get();
 }
 
Parameters
NameDescription
parentLocationName

Required. The parent collection in which the DeliveryPipeline should be created. Format should be projects/{project_id}/locations/{location_name}.

deliveryPipelineDeliveryPipeline

Required. The DeliveryPipeline to create.

deliveryPipelineIdString

Required. ID of the DeliveryPipeline.

Returns
TypeDescription
OperationFuture<DeliveryPipeline,OperationMetadata>

createDeliveryPipelineAsync(String parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)

public final OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(String parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)

Creates a new DeliveryPipeline 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
   String deliveryPipelineId = "deliveryPipelineId-632411535";
   DeliveryPipeline response =
       cloudDeployClient
           .createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId)
           .get();
 }
 
Parameters
NameDescription
parentString

Required. The parent collection in which the DeliveryPipeline should be created. Format should be projects/{project_id}/locations/{location_name}.

deliveryPipelineDeliveryPipeline

Required. The DeliveryPipeline to create.

deliveryPipelineIdString

Required. ID of the DeliveryPipeline.

Returns
TypeDescription
OperationFuture<DeliveryPipeline,OperationMetadata>

createDeliveryPipelineCallable()

public final UnaryCallable<CreateDeliveryPipelineRequest,Operation> createDeliveryPipelineCallable()

Creates a new DeliveryPipeline 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateDeliveryPipelineRequest request =
       CreateDeliveryPipelineRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setDeliveryPipelineId("deliveryPipelineId-632411535")
           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future =
       cloudDeployClient.createDeliveryPipelineCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateDeliveryPipelineRequest,Operation>

createDeliveryPipelineOperationCallable()

public final OperationCallable<CreateDeliveryPipelineRequest,DeliveryPipeline,OperationMetadata> createDeliveryPipelineOperationCallable()

Creates a new DeliveryPipeline 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateDeliveryPipelineRequest request =
       CreateDeliveryPipelineRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setDeliveryPipelineId("deliveryPipelineId-632411535")
           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   OperationFuture<DeliveryPipeline, OperationMetadata> future =
       cloudDeployClient.createDeliveryPipelineOperationCallable().futureCall(request);
   // Do something.
   DeliveryPipeline response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateDeliveryPipelineRequest,DeliveryPipeline,OperationMetadata>

createReleaseAsync(CreateReleaseRequest request)

public final OperationFuture<Release,OperationMetadata> createReleaseAsync(CreateReleaseRequest request)

Creates a new Release 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateReleaseRequest request =
       CreateReleaseRequest.newBuilder()
           .setParent(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setReleaseId("releaseId89607042")
           .setRelease(Release.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   Release response = cloudDeployClient.createReleaseAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateReleaseRequest

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

Returns
TypeDescription
OperationFuture<Release,OperationMetadata>

createReleaseAsync(DeliveryPipelineName parent, Release release, String releaseId)

public final OperationFuture<Release,OperationMetadata> createReleaseAsync(DeliveryPipelineName parent, Release release, String releaseId)

Creates a new Release 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeliveryPipelineName parent =
       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
   Release release = Release.newBuilder().build();
   String releaseId = "releaseId89607042";
   Release response = cloudDeployClient.createReleaseAsync(parent, release, releaseId).get();
 }
 
Parameters
NameDescription
parentDeliveryPipelineName

Required. The parent collection in which the Release should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

releaseRelease

Required. The Release to create.

releaseIdString

Required. ID of the Release.

Returns
TypeDescription
OperationFuture<Release,OperationMetadata>

createReleaseAsync(String parent, Release release, String releaseId)

public final OperationFuture<Release,OperationMetadata> createReleaseAsync(String parent, Release release, String releaseId)

Creates a new Release 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String parent =
       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
   Release release = Release.newBuilder().build();
   String releaseId = "releaseId89607042";
   Release response = cloudDeployClient.createReleaseAsync(parent, release, releaseId).get();
 }
 
Parameters
NameDescription
parentString

Required. The parent collection in which the Release should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

releaseRelease

Required. The Release to create.

releaseIdString

Required. ID of the Release.

Returns
TypeDescription
OperationFuture<Release,OperationMetadata>

createReleaseCallable()

public final UnaryCallable<CreateReleaseRequest,Operation> createReleaseCallable()

Creates a new Release 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateReleaseRequest request =
       CreateReleaseRequest.newBuilder()
           .setParent(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setReleaseId("releaseId89607042")
           .setRelease(Release.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future = cloudDeployClient.createReleaseCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateReleaseRequest,Operation>

createReleaseOperationCallable()

public final OperationCallable<CreateReleaseRequest,Release,OperationMetadata> createReleaseOperationCallable()

Creates a new Release 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateReleaseRequest request =
       CreateReleaseRequest.newBuilder()
           .setParent(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setReleaseId("releaseId89607042")
           .setRelease(Release.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   OperationFuture<Release, OperationMetadata> future =
       cloudDeployClient.createReleaseOperationCallable().futureCall(request);
   // Do something.
   Release response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateReleaseRequest,Release,OperationMetadata>

createRolloutAsync(CreateRolloutRequest request)

public final OperationFuture<Rollout,OperationMetadata> createRolloutAsync(CreateRolloutRequest request)

Creates a new Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateRolloutRequest request =
       CreateRolloutRequest.newBuilder()
           .setParent(
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                   .toString())
           .setRolloutId("rolloutId551248556")
           .setRollout(Rollout.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setStartingPhaseId("startingPhaseId-326529130")
           .build();
   Rollout response = cloudDeployClient.createRolloutAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateRolloutRequest

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

Returns
TypeDescription
OperationFuture<Rollout,OperationMetadata>

createRolloutAsync(ReleaseName parent, Rollout rollout, String rolloutId)

public final OperationFuture<Rollout,OperationMetadata> createRolloutAsync(ReleaseName parent, Rollout rollout, String rolloutId)

Creates a new Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   ReleaseName parent =
       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
   Rollout rollout = Rollout.newBuilder().build();
   String rolloutId = "rolloutId551248556";
   Rollout response = cloudDeployClient.createRolloutAsync(parent, rollout, rolloutId).get();
 }
 
Parameters
NameDescription
parentReleaseName

Required. The parent collection in which the Rollout should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.

rolloutRollout

Required. The Rollout to create.

rolloutIdString

Required. ID of the Rollout.

Returns
TypeDescription
OperationFuture<Rollout,OperationMetadata>

createRolloutAsync(String parent, Rollout rollout, String rolloutId)

public final OperationFuture<Rollout,OperationMetadata> createRolloutAsync(String parent, Rollout rollout, String rolloutId)

Creates a new Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String parent =
       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
   Rollout rollout = Rollout.newBuilder().build();
   String rolloutId = "rolloutId551248556";
   Rollout response = cloudDeployClient.createRolloutAsync(parent, rollout, rolloutId).get();
 }
 
Parameters
NameDescription
parentString

Required. The parent collection in which the Rollout should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.

rolloutRollout

Required. The Rollout to create.

rolloutIdString

Required. ID of the Rollout.

Returns
TypeDescription
OperationFuture<Rollout,OperationMetadata>

createRolloutCallable()

public final UnaryCallable<CreateRolloutRequest,Operation> createRolloutCallable()

Creates a new Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateRolloutRequest request =
       CreateRolloutRequest.newBuilder()
           .setParent(
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                   .toString())
           .setRolloutId("rolloutId551248556")
           .setRollout(Rollout.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setStartingPhaseId("startingPhaseId-326529130")
           .build();
   ApiFuture<Operation> future = cloudDeployClient.createRolloutCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateRolloutRequest,Operation>

createRolloutOperationCallable()

public final OperationCallable<CreateRolloutRequest,Rollout,OperationMetadata> createRolloutOperationCallable()

Creates a new Rollout 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateRolloutRequest request =
       CreateRolloutRequest.newBuilder()
           .setParent(
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                   .toString())
           .setRolloutId("rolloutId551248556")
           .setRollout(Rollout.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setStartingPhaseId("startingPhaseId-326529130")
           .build();
   OperationFuture<Rollout, OperationMetadata> future =
       cloudDeployClient.createRolloutOperationCallable().futureCall(request);
   // Do something.
   Rollout response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateRolloutRequest,Rollout,OperationMetadata>

createTargetAsync(CreateTargetRequest request)

public final OperationFuture<Target,OperationMetadata> createTargetAsync(CreateTargetRequest request)

Creates a new Target 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateTargetRequest request =
       CreateTargetRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setTargetId("targetId-441951604")
           .setTarget(Target.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   Target response = cloudDeployClient.createTargetAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateTargetRequest

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

Returns
TypeDescription
OperationFuture<Target,OperationMetadata>

createTargetAsync(LocationName parent, Target target, String targetId)

public final OperationFuture<Target,OperationMetadata> createTargetAsync(LocationName parent, Target target, String targetId)

Creates a new Target 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Target target = Target.newBuilder().build();
   String targetId = "targetId-441951604";
   Target response = cloudDeployClient.createTargetAsync(parent, target, targetId).get();
 }
 
Parameters
NameDescription
parentLocationName

Required. The parent collection in which the Target should be created. Format should be projects/{project_id}/locations/{location_name}.

targetTarget

Required. The Target to create.

targetIdString

Required. ID of the Target.

Returns
TypeDescription
OperationFuture<Target,OperationMetadata>

createTargetAsync(String parent, Target target, String targetId)

public final OperationFuture<Target,OperationMetadata> createTargetAsync(String parent, Target target, String targetId)

Creates a new Target 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Target target = Target.newBuilder().build();
   String targetId = "targetId-441951604";
   Target response = cloudDeployClient.createTargetAsync(parent, target, targetId).get();
 }
 
Parameters
NameDescription
parentString

Required. The parent collection in which the Target should be created. Format should be projects/{project_id}/locations/{location_name}.

targetTarget

Required. The Target to create.

targetIdString

Required. ID of the Target.

Returns
TypeDescription
OperationFuture<Target,OperationMetadata>

createTargetCallable()

public final UnaryCallable<CreateTargetRequest,Operation> createTargetCallable()

Creates a new Target 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateTargetRequest request =
       CreateTargetRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setTargetId("targetId-441951604")
           .setTarget(Target.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future = cloudDeployClient.createTargetCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateTargetRequest,Operation>

createTargetOperationCallable()

public final OperationCallable<CreateTargetRequest,Target,OperationMetadata> createTargetOperationCallable()

Creates a new Target 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   CreateTargetRequest request =
       CreateTargetRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setTargetId("targetId-441951604")
           .setTarget(Target.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   OperationFuture<Target, OperationMetadata> future =
       cloudDeployClient.createTargetOperationCallable().futureCall(request);
   // Do something.
   Target response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateTargetRequest,Target,OperationMetadata>

deleteAutomationAsync(AutomationName name)

public final OperationFuture<Empty,OperationMetadata> deleteAutomationAsync(AutomationName name)

Deletes a single Automation resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   AutomationName name =
       AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]");
   cloudDeployClient.deleteAutomationAsync(name).get();
 }
 
Parameter
NameDescription
nameAutomationName

Required. The name of the Automation to delete. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteAutomationAsync(DeleteAutomationRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteAutomationAsync(DeleteAutomationRequest request)

Deletes a single Automation resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteAutomationRequest request =
       DeleteAutomationRequest.newBuilder()
           .setName(
               AutomationName.of(
                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
                   .toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   cloudDeployClient.deleteAutomationAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteAutomationRequest

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteAutomationAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteAutomationAsync(String name)

Deletes a single Automation resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String name =
       AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
           .toString();
   cloudDeployClient.deleteAutomationAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the Automation to delete. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteAutomationCallable()

public final UnaryCallable<DeleteAutomationRequest,Operation> deleteAutomationCallable()

Deletes a single Automation resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteAutomationRequest request =
       DeleteAutomationRequest.newBuilder()
           .setName(
               AutomationName.of(
                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
                   .toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   ApiFuture<Operation> future =
       cloudDeployClient.deleteAutomationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteAutomationRequest,Operation>

deleteAutomationOperationCallable()

public final OperationCallable<DeleteAutomationRequest,Empty,OperationMetadata> deleteAutomationOperationCallable()

Deletes a single Automation resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteAutomationRequest request =
       DeleteAutomationRequest.newBuilder()
           .setName(
               AutomationName.of(
                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
                   .toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       cloudDeployClient.deleteAutomationOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteAutomationRequest,Empty,OperationMetadata>

deleteDeliveryPipelineAsync(DeleteDeliveryPipelineRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteDeliveryPipelineAsync(DeleteDeliveryPipelineRequest request)

Deletes a single DeliveryPipeline.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteDeliveryPipelineRequest request =
       DeleteDeliveryPipelineRequest.newBuilder()
           .setName(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setForce(true)
           .setEtag("etag3123477")
           .build();
   cloudDeployClient.deleteDeliveryPipelineAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteDeliveryPipelineRequest

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteDeliveryPipelineAsync(DeliveryPipelineName name)

public final OperationFuture<Empty,OperationMetadata> deleteDeliveryPipelineAsync(DeliveryPipelineName name)

Deletes a single DeliveryPipeline.

Sample code:


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

Required. The name of the DeliveryPipeline to delete. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteDeliveryPipelineAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteDeliveryPipelineAsync(String name)

Deletes a single DeliveryPipeline.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String name =
       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
   cloudDeployClient.deleteDeliveryPipelineAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the DeliveryPipeline to delete. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteDeliveryPipelineCallable()

public final UnaryCallable<DeleteDeliveryPipelineRequest,Operation> deleteDeliveryPipelineCallable()

Deletes a single DeliveryPipeline.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteDeliveryPipelineRequest request =
       DeleteDeliveryPipelineRequest.newBuilder()
           .setName(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setForce(true)
           .setEtag("etag3123477")
           .build();
   ApiFuture<Operation> future =
       cloudDeployClient.deleteDeliveryPipelineCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteDeliveryPipelineRequest,Operation>

deleteDeliveryPipelineOperationCallable()

public final OperationCallable<DeleteDeliveryPipelineRequest,Empty,OperationMetadata> deleteDeliveryPipelineOperationCallable()

Deletes a single DeliveryPipeline.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteDeliveryPipelineRequest request =
       DeleteDeliveryPipelineRequest.newBuilder()
           .setName(
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                   .toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setForce(true)
           .setEtag("etag3123477")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       cloudDeployClient.deleteDeliveryPipelineOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteDeliveryPipelineRequest,Empty,OperationMetadata>

deleteTargetAsync(DeleteTargetRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteTargetAsync(DeleteTargetRequest request)

Deletes a single Target.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteTargetRequest request =
       DeleteTargetRequest.newBuilder()
           .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   cloudDeployClient.deleteTargetAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteTargetRequest

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

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteTargetAsync(TargetName name)

public final OperationFuture<Empty,OperationMetadata> deleteTargetAsync(TargetName name)

Deletes a single Target.

Sample code:


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

Required. The name of the Target to delete. Format should be projects/{project_id}/locations/{location_name}/targets/{target_name}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteTargetAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteTargetAsync(String name)

Deletes a single Target.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   String name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString();
   cloudDeployClient.deleteTargetAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the Target to delete. Format should be projects/{project_id}/locations/{location_name}/targets/{target_name}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteTargetCallable()

public final UnaryCallable<DeleteTargetRequest,Operation> deleteTargetCallable()

Deletes a single Target.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteTargetRequest request =
       DeleteTargetRequest.newBuilder()
           .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   ApiFuture<Operation> future = cloudDeployClient.deleteTargetCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteTargetRequest,Operation>

deleteTargetOperationCallable()

public final OperationCallable<DeleteTargetRequest,Empty,OperationMetadata> deleteTargetOperationCallable()

Deletes a single Target.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
   DeleteTargetRequest request =
       DeleteTargetRequest.newBuilder()
           .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       cloudDeployClient.deleteTargetOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteTargetRequest,Empty,OperationMetadata>