@Generated(value="by gapic-generator-java") public class CloudDeployClient extends Object implements com.google.api.gax.core.BackgroundResource
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().
| Method | Description | Method Variants |
|---|---|---|
ListDeliveryPipelines |
Lists DeliveryPipelines in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDeliveryPipeline |
Gets details of a single DeliveryPipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDeliveryPipeline |
Creates a new DeliveryPipeline in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDeliveryPipeline |
Updates the parameters of a single DeliveryPipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDeliveryPipeline |
Deletes a single DeliveryPipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTargets |
Lists Targets in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RollbackTarget |
Creates a `Rollout` to roll back the specified target. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTarget |
Gets details of a single Target. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTarget |
Creates a new Target in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTarget |
Updates the parameters of a single Target. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTarget |
Deletes a single Target. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListCustomTargetTypes |
Lists CustomTargetTypes in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetCustomTargetType |
Gets details of a single CustomTargetType. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateCustomTargetType |
Creates a new CustomTargetType in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateCustomTargetType |
Updates a single CustomTargetType. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteCustomTargetType |
Deletes a single CustomTargetType. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListReleases |
Lists Releases in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRelease |
Gets details of a single Release. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateRelease |
Creates a new Release in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AbandonRelease |
Abandons a Release in the Delivery Pipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ApproveRollout |
Approves a Rollout. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AdvanceRollout |
Advances a Rollout in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelRollout |
Cancels a Rollout in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListRollouts |
Lists Rollouts in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRollout |
Gets details of a single Rollout. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateRollout |
Creates a new Rollout in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
IgnoreJob |
Ignores the specified Job in a Rollout. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RetryJob |
Retries the specified Job in a Rollout. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListJobRuns |
Lists JobRuns in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetJobRun |
Gets details of a single JobRun. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TerminateJobRun |
Terminates a Job Run in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetConfig |
Gets the configuration for a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateAutomation |
Creates a new Automation in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAutomation |
Updates the parameters of a single Automation resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAutomation |
Deletes a single Automation resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAutomation |
Gets details of a single Automation. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAutomations |
Lists Automations in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAutomationRun |
Gets details of a single AutomationRun. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAutomationRuns |
Lists AutomationRuns in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelAutomationRun |
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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return 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.
| Modifier | Constructor and Description |
|---|---|
protected |
CloudDeployClient(CloudDeploySettings settings)
Constructs an instance of CloudDeployClient, using the given settings.
|
protected |
CloudDeployClient(CloudDeployStub stub) |
| Modifier and Type | Method and Description |
|---|---|
AbandonReleaseResponse |
abandonRelease(AbandonReleaseRequest request)
Abandons a Release in the Delivery Pipeline.
|
AbandonReleaseResponse |
abandonRelease(ReleaseName name)
Abandons a Release in the Delivery Pipeline.
|
AbandonReleaseResponse |
abandonRelease(String name)
Abandons a Release in the Delivery Pipeline.
|
com.google.api.gax.rpc.UnaryCallable<AbandonReleaseRequest,AbandonReleaseResponse> |
abandonReleaseCallable()
Abandons a Release in the Delivery Pipeline.
|
AdvanceRolloutResponse |
advanceRollout(AdvanceRolloutRequest request)
Advances a Rollout in a given project and location.
|
AdvanceRolloutResponse |
advanceRollout(RolloutName name,
String phaseId)
Advances a Rollout in a given project and location.
|
AdvanceRolloutResponse |
advanceRollout(String name,
String phaseId)
Advances a Rollout in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<AdvanceRolloutRequest,AdvanceRolloutResponse> |
advanceRolloutCallable()
Advances a Rollout in a given project and location.
|
ApproveRolloutResponse |
approveRollout(ApproveRolloutRequest request)
Approves a Rollout.
|
ApproveRolloutResponse |
approveRollout(RolloutName name)
Approves a Rollout.
|
ApproveRolloutResponse |
approveRollout(String name)
Approves a Rollout.
|
com.google.api.gax.rpc.UnaryCallable<ApproveRolloutRequest,ApproveRolloutResponse> |
approveRolloutCallable()
Approves a Rollout.
|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
CancelAutomationRunResponse |
cancelAutomationRun(AutomationRunName name)
Cancels an AutomationRun.
|
CancelAutomationRunResponse |
cancelAutomationRun(CancelAutomationRunRequest request)
Cancels an AutomationRun.
|
CancelAutomationRunResponse |
cancelAutomationRun(String name)
Cancels an AutomationRun.
|
com.google.api.gax.rpc.UnaryCallable<CancelAutomationRunRequest,CancelAutomationRunResponse> |
cancelAutomationRunCallable()
Cancels an AutomationRun.
|
CancelRolloutResponse |
cancelRollout(CancelRolloutRequest request)
Cancels a Rollout in a given project and location.
|
CancelRolloutResponse |
cancelRollout(RolloutName name)
Cancels a Rollout in a given project and location.
|
CancelRolloutResponse |
cancelRollout(String name)
Cancels a Rollout in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CancelRolloutRequest,CancelRolloutResponse> |
cancelRolloutCallable()
Cancels a Rollout in a given project and location.
|
void |
close() |
static CloudDeployClient |
create()
Constructs an instance of CloudDeployClient with default settings.
|
static CloudDeployClient |
create(CloudDeploySettings settings)
Constructs an instance of CloudDeployClient, using the given settings.
|
static CloudDeployClient |
create(CloudDeployStub stub)
Constructs an instance of CloudDeployClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> |
createAutomationAsync(CreateAutomationRequest request)
Creates a new Automation in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> |
createAutomationAsync(DeliveryPipelineName parent,
Automation automation,
String automationId)
Creates a new Automation in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> |
createAutomationAsync(String parent,
Automation automation,
String automationId)
Creates a new Automation in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateAutomationRequest,com.google.longrunning.Operation> |
createAutomationCallable()
Creates a new Automation in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateAutomationRequest,Automation,OperationMetadata> |
createAutomationOperationCallable()
Creates a new Automation in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> |
createCustomTargetTypeAsync(CreateCustomTargetTypeRequest request)
Creates a new CustomTargetType in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> |
createCustomTargetTypeAsync(LocationName parent,
CustomTargetType customTargetType,
String customTargetTypeId)
Creates a new CustomTargetType in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> |
createCustomTargetTypeAsync(String parent,
CustomTargetType customTargetType,
String customTargetTypeId)
Creates a new CustomTargetType in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateCustomTargetTypeRequest,com.google.longrunning.Operation> |
createCustomTargetTypeCallable()
Creates a new CustomTargetType in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateCustomTargetTypeRequest,CustomTargetType,OperationMetadata> |
createCustomTargetTypeOperationCallable()
Creates a new CustomTargetType in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> |
createDeliveryPipelineAsync(CreateDeliveryPipelineRequest request)
Creates a new DeliveryPipeline in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> |
createDeliveryPipelineAsync(LocationName parent,
DeliveryPipeline deliveryPipeline,
String deliveryPipelineId)
Creates a new DeliveryPipeline in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> |
createDeliveryPipelineAsync(String parent,
DeliveryPipeline deliveryPipeline,
String deliveryPipelineId)
Creates a new DeliveryPipeline in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateDeliveryPipelineRequest,com.google.longrunning.Operation> |
createDeliveryPipelineCallable()
Creates a new DeliveryPipeline in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateDeliveryPipelineRequest,DeliveryPipeline,OperationMetadata> |
createDeliveryPipelineOperationCallable()
Creates a new DeliveryPipeline in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Release,OperationMetadata> |
createReleaseAsync(CreateReleaseRequest request)
Creates a new Release in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Release,OperationMetadata> |
createReleaseAsync(DeliveryPipelineName parent,
Release release,
String releaseId)
Creates a new Release in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Release,OperationMetadata> |
createReleaseAsync(String parent,
Release release,
String releaseId)
Creates a new Release in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateReleaseRequest,com.google.longrunning.Operation> |
createReleaseCallable()
Creates a new Release in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateReleaseRequest,Release,OperationMetadata> |
createReleaseOperationCallable()
Creates a new Release in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Rollout,OperationMetadata> |
createRolloutAsync(CreateRolloutRequest request)
Creates a new Rollout in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Rollout,OperationMetadata> |
createRolloutAsync(ReleaseName parent,
Rollout rollout,
String rolloutId)
Creates a new Rollout in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Rollout,OperationMetadata> |
createRolloutAsync(String parent,
Rollout rollout,
String rolloutId)
Creates a new Rollout in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateRolloutRequest,com.google.longrunning.Operation> |
createRolloutCallable()
Creates a new Rollout in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateRolloutRequest,Rollout,OperationMetadata> |
createRolloutOperationCallable()
Creates a new Rollout in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> |
createTargetAsync(CreateTargetRequest request)
Creates a new Target in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> |
createTargetAsync(LocationName parent,
Target target,
String targetId)
Creates a new Target in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> |
createTargetAsync(String parent,
Target target,
String targetId)
Creates a new Target in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<CreateTargetRequest,com.google.longrunning.Operation> |
createTargetCallable()
Creates a new Target in a given project and location.
|
com.google.api.gax.rpc.OperationCallable<CreateTargetRequest,Target,OperationMetadata> |
createTargetOperationCallable()
Creates a new Target in a given project and location.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAutomationAsync(AutomationName name)
Deletes a single Automation resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAutomationAsync(DeleteAutomationRequest request)
Deletes a single Automation resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAutomationAsync(String name)
Deletes a single Automation resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAutomationRequest,com.google.longrunning.Operation> |
deleteAutomationCallable()
Deletes a single Automation resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteAutomationRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteAutomationOperationCallable()
Deletes a single Automation resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteCustomTargetTypeAsync(CustomTargetTypeName name)
Deletes a single CustomTargetType.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteCustomTargetTypeAsync(DeleteCustomTargetTypeRequest request)
Deletes a single CustomTargetType.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteCustomTargetTypeAsync(String name)
Deletes a single CustomTargetType.
|
com.google.api.gax.rpc.UnaryCallable<DeleteCustomTargetTypeRequest,com.google.longrunning.Operation> |
deleteCustomTargetTypeCallable()
Deletes a single CustomTargetType.
|
com.google.api.gax.rpc.OperationCallable<DeleteCustomTargetTypeRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteCustomTargetTypeOperationCallable()
Deletes a single CustomTargetType.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDeliveryPipelineAsync(DeleteDeliveryPipelineRequest request)
Deletes a single DeliveryPipeline.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDeliveryPipelineAsync(DeliveryPipelineName name)
Deletes a single DeliveryPipeline.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDeliveryPipelineAsync(String name)
Deletes a single DeliveryPipeline.
|
com.google.api.gax.rpc.UnaryCallable<DeleteDeliveryPipelineRequest,com.google.longrunning.Operation> |
deleteDeliveryPipelineCallable()
Deletes a single DeliveryPipeline.
|
com.google.api.gax.rpc.OperationCallable<DeleteDeliveryPipelineRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteDeliveryPipelineOperationCallable()
Deletes a single DeliveryPipeline.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteTargetAsync(DeleteTargetRequest request)
Deletes a single Target.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteTargetAsync(String name)
Deletes a single Target.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteTargetAsync(TargetName name)
Deletes a single Target.
|
com.google.api.gax.rpc.UnaryCallable<DeleteTargetRequest,com.google.longrunning.Operation> |
deleteTargetCallable()
Deletes a single Target.
|
com.google.api.gax.rpc.OperationCallable<DeleteTargetRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteTargetOperationCallable()
Deletes a single Target.
|
Automation |
getAutomation(AutomationName name)
Gets details of a single Automation.
|
Automation |
getAutomation(GetAutomationRequest request)
Gets details of a single Automation.
|
Automation |
getAutomation(String name)
Gets details of a single Automation.
|
com.google.api.gax.rpc.UnaryCallable<GetAutomationRequest,Automation> |
getAutomationCallable()
Gets details of a single Automation.
|
AutomationRun |
getAutomationRun(AutomationRunName name)
Gets details of a single AutomationRun.
|
AutomationRun |
getAutomationRun(GetAutomationRunRequest request)
Gets details of a single AutomationRun.
|
AutomationRun |
getAutomationRun(String name)
Gets details of a single AutomationRun.
|
com.google.api.gax.rpc.UnaryCallable<GetAutomationRunRequest,AutomationRun> |
getAutomationRunCallable()
Gets details of a single AutomationRun.
|
Config |
getConfig(ConfigName name)
Gets the configuration for a location.
|
Config |
getConfig(GetConfigRequest request)
Gets the configuration for a location.
|
Config |
getConfig(String name)
Gets the configuration for a location.
|
com.google.api.gax.rpc.UnaryCallable<GetConfigRequest,Config> |
getConfigCallable()
Gets the configuration for a location.
|
CustomTargetType |
getCustomTargetType(CustomTargetTypeName name)
Gets details of a single CustomTargetType.
|
CustomTargetType |
getCustomTargetType(GetCustomTargetTypeRequest request)
Gets details of a single CustomTargetType.
|
CustomTargetType |
getCustomTargetType(String name)
Gets details of a single CustomTargetType.
|
com.google.api.gax.rpc.UnaryCallable<GetCustomTargetTypeRequest,CustomTargetType> |
getCustomTargetTypeCallable()
Gets details of a single CustomTargetType.
|
DeliveryPipeline |
getDeliveryPipeline(DeliveryPipelineName name)
Gets details of a single DeliveryPipeline.
|
DeliveryPipeline |
getDeliveryPipeline(GetDeliveryPipelineRequest request)
Gets details of a single DeliveryPipeline.
|
DeliveryPipeline |
getDeliveryPipeline(String name)
Gets details of a single DeliveryPipeline.
|
com.google.api.gax.rpc.UnaryCallable<GetDeliveryPipelineRequest,DeliveryPipeline> |
getDeliveryPipelineCallable()
Gets details of a single DeliveryPipeline.
|
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.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Gets the access control policy for a resource.
|
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.
|
JobRun |
getJobRun(GetJobRunRequest request)
Gets details of a single JobRun.
|
JobRun |
getJobRun(JobRunName name)
Gets details of a single JobRun.
|
JobRun |
getJobRun(String name)
Gets details of a single JobRun.
|
com.google.api.gax.rpc.UnaryCallable<GetJobRunRequest,JobRun> |
getJobRunCallable()
Gets details of a single JobRun.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
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.
|
Release |
getRelease(GetReleaseRequest request)
Gets details of a single Release.
|
Release |
getRelease(ReleaseName name)
Gets details of a single Release.
|
Release |
getRelease(String name)
Gets details of a single Release.
|
com.google.api.gax.rpc.UnaryCallable<GetReleaseRequest,Release> |
getReleaseCallable()
Gets details of a single Release.
|
Rollout |
getRollout(GetRolloutRequest request)
Gets details of a single Rollout.
|
Rollout |
getRollout(RolloutName name)
Gets details of a single Rollout.
|
Rollout |
getRollout(String name)
Gets details of a single Rollout.
|
com.google.api.gax.rpc.UnaryCallable<GetRolloutRequest,Rollout> |
getRolloutCallable()
Gets details of a single Rollout.
|
CloudDeploySettings |
getSettings() |
CloudDeployStub |
getStub() |
Target |
getTarget(GetTargetRequest request)
Gets details of a single Target.
|
Target |
getTarget(String name)
Gets details of a single Target.
|
Target |
getTarget(TargetName name)
Gets details of a single Target.
|
com.google.api.gax.rpc.UnaryCallable<GetTargetRequest,Target> |
getTargetCallable()
Gets details of a single Target.
|
IgnoreJobResponse |
ignoreJob(IgnoreJobRequest request)
Ignores the specified Job in a Rollout.
|
IgnoreJobResponse |
ignoreJob(RolloutName rollout,
String phaseId,
String jobId)
Ignores the specified Job in a Rollout.
|
IgnoreJobResponse |
ignoreJob(String rollout,
String phaseId,
String jobId)
Ignores the specified Job in a Rollout.
|
com.google.api.gax.rpc.UnaryCallable<IgnoreJobRequest,IgnoreJobResponse> |
ignoreJobCallable()
Ignores the specified Job in a Rollout.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
CloudDeployClient.ListAutomationRunsPagedResponse |
listAutomationRuns(DeliveryPipelineName parent)
Lists AutomationRuns in a given project and location.
|
CloudDeployClient.ListAutomationRunsPagedResponse |
listAutomationRuns(ListAutomationRunsRequest request)
Lists AutomationRuns in a given project and location.
|
CloudDeployClient.ListAutomationRunsPagedResponse |
listAutomationRuns(String parent)
Lists AutomationRuns in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListAutomationRunsRequest,ListAutomationRunsResponse> |
listAutomationRunsCallable()
Lists AutomationRuns in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListAutomationRunsRequest,CloudDeployClient.ListAutomationRunsPagedResponse> |
listAutomationRunsPagedCallable()
Lists AutomationRuns in a given project and location.
|
CloudDeployClient.ListAutomationsPagedResponse |
listAutomations(DeliveryPipelineName parent)
Lists Automations in a given project and location.
|
CloudDeployClient.ListAutomationsPagedResponse |
listAutomations(ListAutomationsRequest request)
Lists Automations in a given project and location.
|
CloudDeployClient.ListAutomationsPagedResponse |
listAutomations(String parent)
Lists Automations in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListAutomationsRequest,ListAutomationsResponse> |
listAutomationsCallable()
Lists Automations in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListAutomationsRequest,CloudDeployClient.ListAutomationsPagedResponse> |
listAutomationsPagedCallable()
Lists Automations in a given project and location.
|
CloudDeployClient.ListCustomTargetTypesPagedResponse |
listCustomTargetTypes(ListCustomTargetTypesRequest request)
Lists CustomTargetTypes in a given project and location.
|
CloudDeployClient.ListCustomTargetTypesPagedResponse |
listCustomTargetTypes(LocationName parent)
Lists CustomTargetTypes in a given project and location.
|
CloudDeployClient.ListCustomTargetTypesPagedResponse |
listCustomTargetTypes(String parent)
Lists CustomTargetTypes in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListCustomTargetTypesRequest,ListCustomTargetTypesResponse> |
listCustomTargetTypesCallable()
Lists CustomTargetTypes in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListCustomTargetTypesRequest,CloudDeployClient.ListCustomTargetTypesPagedResponse> |
listCustomTargetTypesPagedCallable()
Lists CustomTargetTypes in a given project and location.
|
CloudDeployClient.ListDeliveryPipelinesPagedResponse |
listDeliveryPipelines(ListDeliveryPipelinesRequest request)
Lists DeliveryPipelines in a given project and location.
|
CloudDeployClient.ListDeliveryPipelinesPagedResponse |
listDeliveryPipelines(LocationName parent)
Lists DeliveryPipelines in a given project and location.
|
CloudDeployClient.ListDeliveryPipelinesPagedResponse |
listDeliveryPipelines(String parent)
Lists DeliveryPipelines in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListDeliveryPipelinesRequest,ListDeliveryPipelinesResponse> |
listDeliveryPipelinesCallable()
Lists DeliveryPipelines in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListDeliveryPipelinesRequest,CloudDeployClient.ListDeliveryPipelinesPagedResponse> |
listDeliveryPipelinesPagedCallable()
Lists DeliveryPipelines in a given project and location.
|
CloudDeployClient.ListJobRunsPagedResponse |
listJobRuns(ListJobRunsRequest request)
Lists JobRuns in a given project and location.
|
CloudDeployClient.ListJobRunsPagedResponse |
listJobRuns(RolloutName parent)
Lists JobRuns in a given project and location.
|
CloudDeployClient.ListJobRunsPagedResponse |
listJobRuns(String parent)
Lists JobRuns in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListJobRunsRequest,ListJobRunsResponse> |
listJobRunsCallable()
Lists JobRuns in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListJobRunsRequest,CloudDeployClient.ListJobRunsPagedResponse> |
listJobRunsPagedCallable()
Lists JobRuns in a given project and location.
|
CloudDeployClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
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.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,CloudDeployClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
CloudDeployClient.ListReleasesPagedResponse |
listReleases(DeliveryPipelineName parent)
Lists Releases in a given project and location.
|
CloudDeployClient.ListReleasesPagedResponse |
listReleases(ListReleasesRequest request)
Lists Releases in a given project and location.
|
CloudDeployClient.ListReleasesPagedResponse |
listReleases(String parent)
Lists Releases in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListReleasesRequest,ListReleasesResponse> |
listReleasesCallable()
Lists Releases in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListReleasesRequest,CloudDeployClient.ListReleasesPagedResponse> |
listReleasesPagedCallable()
Lists Releases in a given project and location.
|
CloudDeployClient.ListRolloutsPagedResponse |
listRollouts(ListRolloutsRequest request)
Lists Rollouts in a given project and location.
|
CloudDeployClient.ListRolloutsPagedResponse |
listRollouts(ReleaseName parent)
Lists Rollouts in a given project and location.
|
CloudDeployClient.ListRolloutsPagedResponse |
listRollouts(String parent)
Lists Rollouts in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListRolloutsRequest,ListRolloutsResponse> |
listRolloutsCallable()
Lists Rollouts in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListRolloutsRequest,CloudDeployClient.ListRolloutsPagedResponse> |
listRolloutsPagedCallable()
Lists Rollouts in a given project and location.
|
CloudDeployClient.ListTargetsPagedResponse |
listTargets(ListTargetsRequest request)
Lists Targets in a given project and location.
|
CloudDeployClient.ListTargetsPagedResponse |
listTargets(LocationName parent)
Lists Targets in a given project and location.
|
CloudDeployClient.ListTargetsPagedResponse |
listTargets(String parent)
Lists Targets in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListTargetsRequest,ListTargetsResponse> |
listTargetsCallable()
Lists Targets in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListTargetsRequest,CloudDeployClient.ListTargetsPagedResponse> |
listTargetsPagedCallable()
Lists Targets in a given project and location.
|
RetryJobResponse |
retryJob(RetryJobRequest request)
Retries the specified Job in a Rollout.
|
RetryJobResponse |
retryJob(RolloutName rollout,
String phaseId,
String jobId)
Retries the specified Job in a Rollout.
|
RetryJobResponse |
retryJob(String rollout,
String phaseId,
String jobId)
Retries the specified Job in a Rollout.
|
com.google.api.gax.rpc.UnaryCallable<RetryJobRequest,RetryJobResponse> |
retryJobCallable()
Retries the specified Job in a Rollout.
|
RollbackTargetResponse |
rollbackTarget(DeliveryPipelineName name,
String targetId,
String rolloutId)
Creates a `Rollout` to roll back the specified target.
|
RollbackTargetResponse |
rollbackTarget(RollbackTargetRequest request)
Creates a `Rollout` to roll back the specified target.
|
RollbackTargetResponse |
rollbackTarget(String name,
String targetId,
String rolloutId)
Creates a `Rollout` to roll back the specified target.
|
com.google.api.gax.rpc.UnaryCallable<RollbackTargetRequest,RollbackTargetResponse> |
rollbackTargetCallable()
Creates a `Rollout` to roll back the specified target.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sets the access control policy on the specified resource.
|
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.
|
void |
shutdown() |
void |
shutdownNow() |
TerminateJobRunResponse |
terminateJobRun(JobRunName name)
Terminates a Job Run in a given project and location.
|
TerminateJobRunResponse |
terminateJobRun(String name)
Terminates a Job Run in a given project and location.
|
TerminateJobRunResponse |
terminateJobRun(TerminateJobRunRequest request)
Terminates a Job Run in a given project and location.
|
com.google.api.gax.rpc.UnaryCallable<TerminateJobRunRequest,TerminateJobRunResponse> |
terminateJobRunCallable()
Terminates a Job Run in a given project and location.
|
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Returns permissions that a caller has on the specified resource.
|
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.
|
com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> |
updateAutomationAsync(Automation automation,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Automation resource.
|
com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> |
updateAutomationAsync(UpdateAutomationRequest request)
Updates the parameters of a single Automation resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateAutomationRequest,com.google.longrunning.Operation> |
updateAutomationCallable()
Updates the parameters of a single Automation resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateAutomationRequest,Automation,OperationMetadata> |
updateAutomationOperationCallable()
Updates the parameters of a single Automation resource.
|
com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> |
updateCustomTargetTypeAsync(CustomTargetType customTargetType,
com.google.protobuf.FieldMask updateMask)
Updates a single CustomTargetType.
|
com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> |
updateCustomTargetTypeAsync(UpdateCustomTargetTypeRequest request)
Updates a single CustomTargetType.
|
com.google.api.gax.rpc.UnaryCallable<UpdateCustomTargetTypeRequest,com.google.longrunning.Operation> |
updateCustomTargetTypeCallable()
Updates a single CustomTargetType.
|
com.google.api.gax.rpc.OperationCallable<UpdateCustomTargetTypeRequest,CustomTargetType,OperationMetadata> |
updateCustomTargetTypeOperationCallable()
Updates a single CustomTargetType.
|
com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> |
updateDeliveryPipelineAsync(DeliveryPipeline deliveryPipeline,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single DeliveryPipeline.
|
com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> |
updateDeliveryPipelineAsync(UpdateDeliveryPipelineRequest request)
Updates the parameters of a single DeliveryPipeline.
|
com.google.api.gax.rpc.UnaryCallable<UpdateDeliveryPipelineRequest,com.google.longrunning.Operation> |
updateDeliveryPipelineCallable()
Updates the parameters of a single DeliveryPipeline.
|
com.google.api.gax.rpc.OperationCallable<UpdateDeliveryPipelineRequest,DeliveryPipeline,OperationMetadata> |
updateDeliveryPipelineOperationCallable()
Updates the parameters of a single DeliveryPipeline.
|
com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> |
updateTargetAsync(Target target,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a single Target.
|
com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> |
updateTargetAsync(UpdateTargetRequest request)
Updates the parameters of a single Target.
|
com.google.api.gax.rpc.UnaryCallable<UpdateTargetRequest,com.google.longrunning.Operation> |
updateTargetCallable()
Updates the parameters of a single Target.
|
com.google.api.gax.rpc.OperationCallable<UpdateTargetRequest,Target,OperationMetadata> |
updateTargetOperationCallable()
Updates the parameters of a single Target.
|
protected CloudDeployClient(CloudDeploySettings settings) throws IOException
IOExceptionprotected CloudDeployClient(CloudDeployStub stub)
public static final CloudDeployClient create() throws IOException
IOExceptionpublic static final CloudDeployClient create(CloudDeploySettings settings) throws IOException
IOExceptionpublic static final CloudDeployClient create(CloudDeployStub stub)
public final CloudDeploySettings getSettings()
public CloudDeployStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final CloudDeployClient.ListDeliveryPipelinesPagedResponse listDeliveryPipelines(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
for (DeliveryPipeline element :
cloudDeployClient.listDeliveryPipelines(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent, which owns this collection of pipelines. Format must be
`projects/{project_id}/locations/{location_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListDeliveryPipelinesPagedResponse listDeliveryPipelines(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
for (DeliveryPipeline element :
cloudDeployClient.listDeliveryPipelines(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent, which owns this collection of pipelines. Format must be
`projects/{project_id}/locations/{location_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListDeliveryPipelinesPagedResponse listDeliveryPipelines(ListDeliveryPipelinesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListDeliveryPipelinesRequest request =
ListDeliveryPipelinesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (DeliveryPipeline element :
cloudDeployClient.listDeliveryPipelines(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListDeliveryPipelinesRequest,CloudDeployClient.ListDeliveryPipelinesPagedResponse> listDeliveryPipelinesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListDeliveryPipelinesRequest request =
ListDeliveryPipelinesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<DeliveryPipeline> future =
cloudDeployClient.listDeliveryPipelinesPagedCallable().futureCall(request);
// Do something.
for (DeliveryPipeline element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListDeliveryPipelinesRequest,ListDeliveryPipelinesResponse> listDeliveryPipelinesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListDeliveryPipelinesRequest request =
ListDeliveryPipelinesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListDeliveryPipelinesResponse response =
cloudDeployClient.listDeliveryPipelinesCallable().call(request);
for (DeliveryPipeline element : response.getDeliveryPipelinesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final DeliveryPipeline getDeliveryPipeline(DeliveryPipelineName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the `DeliveryPipeline`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DeliveryPipeline getDeliveryPipeline(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
}
name - Required. Name of the `DeliveryPipeline`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DeliveryPipeline getDeliveryPipeline(GetDeliveryPipelineRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetDeliveryPipelineRequest request =
GetDeliveryPipelineRequest.newBuilder()
.setName(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.build();
DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDeliveryPipelineRequest,DeliveryPipeline> getDeliveryPipelineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetDeliveryPipelineRequest request =
GetDeliveryPipelineRequest.newBuilder()
.setName(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.build();
ApiFuture<DeliveryPipeline> future =
cloudDeployClient.getDeliveryPipelineCallable().futureCall(request);
// Do something.
DeliveryPipeline response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(LocationName parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - Required. The parent collection in which the `DeliveryPipeline` should be
created. Format should be `projects/{project_id}/locations/{location_name}`.deliveryPipeline - Required. The `DeliveryPipeline` to create.deliveryPipelineId - Required. ID of the `DeliveryPipeline`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(String parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - Required. The parent collection in which the `DeliveryPipeline` should be
created. Format should be `projects/{project_id}/locations/{location_name}`.deliveryPipeline - Required. The `DeliveryPipeline` to create.deliveryPipelineId - Required. ID of the `DeliveryPipeline`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(CreateDeliveryPipelineRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateDeliveryPipelineRequest,DeliveryPipeline,OperationMetadata> createDeliveryPipelineOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateDeliveryPipelineRequest,com.google.longrunning.Operation> createDeliveryPipelineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> updateDeliveryPipelineAsync(DeliveryPipeline deliveryPipeline, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DeliveryPipeline response =
cloudDeployClient.updateDeliveryPipelineAsync(deliveryPipeline, updateMask).get();
}
deliveryPipeline - Required. The `DeliveryPipeline` to update.updateMask - Required. Field mask is used to specify the fields to be overwritten in the
`DeliveryPipeline` 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's in the
mask. If the user doesn't provide a mask then all fields are overwritten.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,OperationMetadata> updateDeliveryPipelineAsync(UpdateDeliveryPipelineRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateDeliveryPipelineRequest request =
UpdateDeliveryPipelineRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
DeliveryPipeline response = cloudDeployClient.updateDeliveryPipelineAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateDeliveryPipelineRequest,DeliveryPipeline,OperationMetadata> updateDeliveryPipelineOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateDeliveryPipelineRequest request =
UpdateDeliveryPipelineRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<DeliveryPipeline, OperationMetadata> future =
cloudDeployClient.updateDeliveryPipelineOperationCallable().futureCall(request);
// Do something.
DeliveryPipeline response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateDeliveryPipelineRequest,com.google.longrunning.Operation> updateDeliveryPipelineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateDeliveryPipelineRequest request =
UpdateDeliveryPipelineRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
cloudDeployClient.updateDeliveryPipelineCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDeliveryPipelineAsync(DeliveryPipelineName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
name - Required. The name of the `DeliveryPipeline` to delete. Format should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDeliveryPipelineAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
name - Required. The name of the `DeliveryPipeline` to delete. Format should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDeliveryPipelineAsync(DeleteDeliveryPipelineRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteDeliveryPipelineRequest,com.google.protobuf.Empty,OperationMetadata> deleteDeliveryPipelineOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteDeliveryPipelineRequest,com.google.longrunning.Operation> deleteDeliveryPipelineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final CloudDeployClient.ListTargetsPagedResponse listTargets(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
for (Target element : cloudDeployClient.listTargets(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent, which owns this collection of targets. Format must be
`projects/{project_id}/locations/{location_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListTargetsPagedResponse listTargets(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
for (Target element : cloudDeployClient.listTargets(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent, which owns this collection of targets. Format must be
`projects/{project_id}/locations/{location_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListTargetsPagedResponse listTargets(ListTargetsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListTargetsRequest request =
ListTargetsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Target element : cloudDeployClient.listTargets(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListTargetsRequest,CloudDeployClient.ListTargetsPagedResponse> listTargetsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListTargetsRequest request =
ListTargetsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Target> future = cloudDeployClient.listTargetsPagedCallable().futureCall(request);
// Do something.
for (Target element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListTargetsRequest,ListTargetsResponse> listTargetsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListTargetsRequest request =
ListTargetsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListTargetsResponse response = cloudDeployClient.listTargetsCallable().call(request);
for (Target element : response.getTargetsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final RollbackTargetResponse rollbackTarget(DeliveryPipelineName name, String targetId, String rolloutId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
String targetId = "targetId-441951604";
String rolloutId = "rolloutId551248556";
RollbackTargetResponse response = cloudDeployClient.rollbackTarget(name, targetId, rolloutId);
}
name - Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
created. Format should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.targetId - Required. ID of the `Target` that is being rolled back.rolloutId - Required. ID of the rollback `Rollout` to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RollbackTargetResponse rollbackTarget(String name, String targetId, String rolloutId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
String targetId = "targetId-441951604";
String rolloutId = "rolloutId551248556";
RollbackTargetResponse response = cloudDeployClient.rollbackTarget(name, targetId, rolloutId);
}
name - Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
created. Format should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.targetId - Required. ID of the `Target` that is being rolled back.rolloutId - Required. ID of the rollback `Rollout` to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RollbackTargetResponse rollbackTarget(RollbackTargetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
RollbackTargetRequest request =
RollbackTargetRequest.newBuilder()
.setName(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setTargetId("targetId-441951604")
.setRolloutId("rolloutId551248556")
.setReleaseId("releaseId89607042")
.setRolloutToRollBack("rolloutToRollBack-1195544784")
.setRollbackConfig(RollbackTargetConfig.newBuilder().build())
.setValidateOnly(true)
.build();
RollbackTargetResponse response = cloudDeployClient.rollbackTarget(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<RollbackTargetRequest,RollbackTargetResponse> rollbackTargetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
RollbackTargetRequest request =
RollbackTargetRequest.newBuilder()
.setName(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setTargetId("targetId-441951604")
.setRolloutId("rolloutId551248556")
.setReleaseId("releaseId89607042")
.setRolloutToRollBack("rolloutToRollBack-1195544784")
.setRollbackConfig(RollbackTargetConfig.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<RollbackTargetResponse> future =
cloudDeployClient.rollbackTargetCallable().futureCall(request);
// Do something.
RollbackTargetResponse response = future.get();
}
public final Target getTarget(TargetName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
Target response = cloudDeployClient.getTarget(name);
}
name - Required. Name of the `Target`. Format must be
`projects/{project_id}/locations/{location_name}/targets/{target_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Target getTarget(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
Target response = cloudDeployClient.getTarget(name);
}
name - Required. Name of the `Target`. Format must be
`projects/{project_id}/locations/{location_name}/targets/{target_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Target getTarget(GetTargetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetTargetRequest request =
GetTargetRequest.newBuilder()
.setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
.build();
Target response = cloudDeployClient.getTarget(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetTargetRequest,Target> getTargetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetTargetRequest request =
GetTargetRequest.newBuilder()
.setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
.build();
ApiFuture<Target> future = cloudDeployClient.getTargetCallable().futureCall(request);
// Do something.
Target response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> createTargetAsync(LocationName parent, Target target, String targetId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - Required. The parent collection in which the `Target` should be created. Format
should be `projects/{project_id}/locations/{location_name}`.target - Required. The `Target` to create.targetId - Required. ID of the `Target`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> createTargetAsync(String parent, Target target, String targetId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - Required. The parent collection in which the `Target` should be created. Format
should be `projects/{project_id}/locations/{location_name}`.target - Required. The `Target` to create.targetId - Required. ID of the `Target`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> createTargetAsync(CreateTargetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateTargetRequest,Target,OperationMetadata> createTargetOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateTargetRequest,com.google.longrunning.Operation> createTargetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> updateTargetAsync(Target target, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
Target target = Target.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Target response = cloudDeployClient.updateTargetAsync(target, updateMask).get();
}
target - Required. The `Target` to update.updateMask - Required. Field mask is used to specify the fields to be overwritten in the
Target 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's in the mask. If the
user doesn't provide a mask then all fields are overwritten.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Target,OperationMetadata> updateTargetAsync(UpdateTargetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateTargetRequest request =
UpdateTargetRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTarget(Target.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
Target response = cloudDeployClient.updateTargetAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateTargetRequest,Target,OperationMetadata> updateTargetOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateTargetRequest request =
UpdateTargetRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTarget(Target.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<Target, OperationMetadata> future =
cloudDeployClient.updateTargetOperationCallable().futureCall(request);
// Do something.
Target response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateTargetRequest,com.google.longrunning.Operation> updateTargetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateTargetRequest request =
UpdateTargetRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTarget(Target.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = cloudDeployClient.updateTargetCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTargetAsync(TargetName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
name - Required. The name of the `Target` to delete. Format should be
`projects/{project_id}/locations/{location_name}/targets/{target_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTargetAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
name - Required. The name of the `Target` to delete. Format should be
`projects/{project_id}/locations/{location_name}/targets/{target_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTargetAsync(DeleteTargetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteTargetRequest,com.google.protobuf.Empty,OperationMetadata> deleteTargetOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteTargetRequest,com.google.longrunning.Operation> deleteTargetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final CloudDeployClient.ListCustomTargetTypesPagedResponse listCustomTargetTypes(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
for (CustomTargetType element :
cloudDeployClient.listCustomTargetTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent that owns this collection of custom target types. Format
must be `projects/{project_id}/locations/{location_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListCustomTargetTypesPagedResponse listCustomTargetTypes(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
for (CustomTargetType element :
cloudDeployClient.listCustomTargetTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent that owns this collection of custom target types. Format
must be `projects/{project_id}/locations/{location_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListCustomTargetTypesPagedResponse listCustomTargetTypes(ListCustomTargetTypesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListCustomTargetTypesRequest request =
ListCustomTargetTypesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (CustomTargetType element :
cloudDeployClient.listCustomTargetTypes(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListCustomTargetTypesRequest,CloudDeployClient.ListCustomTargetTypesPagedResponse> listCustomTargetTypesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListCustomTargetTypesRequest request =
ListCustomTargetTypesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<CustomTargetType> future =
cloudDeployClient.listCustomTargetTypesPagedCallable().futureCall(request);
// Do something.
for (CustomTargetType element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListCustomTargetTypesRequest,ListCustomTargetTypesResponse> listCustomTargetTypesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListCustomTargetTypesRequest request =
ListCustomTargetTypesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListCustomTargetTypesResponse response =
cloudDeployClient.listCustomTargetTypesCallable().call(request);
for (CustomTargetType element : response.getCustomTargetTypesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final CustomTargetType getCustomTargetType(CustomTargetTypeName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
CustomTargetTypeName name =
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]");
CustomTargetType response = cloudDeployClient.getCustomTargetType(name);
}
name - Required. Name of the `CustomTargetType`. Format must be
`projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomTargetType getCustomTargetType(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 =
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]").toString();
CustomTargetType response = cloudDeployClient.getCustomTargetType(name);
}
name - Required. Name of the `CustomTargetType`. Format must be
`projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CustomTargetType getCustomTargetType(GetCustomTargetTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetCustomTargetTypeRequest request =
GetCustomTargetTypeRequest.newBuilder()
.setName(
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]")
.toString())
.build();
CustomTargetType response = cloudDeployClient.getCustomTargetType(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetCustomTargetTypeRequest,CustomTargetType> getCustomTargetTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetCustomTargetTypeRequest request =
GetCustomTargetTypeRequest.newBuilder()
.setName(
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]")
.toString())
.build();
ApiFuture<CustomTargetType> future =
cloudDeployClient.getCustomTargetTypeCallable().futureCall(request);
// Do something.
CustomTargetType response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> createCustomTargetTypeAsync(LocationName parent, CustomTargetType customTargetType, String customTargetTypeId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
CustomTargetType customTargetType = CustomTargetType.newBuilder().build();
String customTargetTypeId = "customTargetTypeId1451302135";
CustomTargetType response =
cloudDeployClient
.createCustomTargetTypeAsync(parent, customTargetType, customTargetTypeId)
.get();
}
parent - Required. The parent collection in which the `CustomTargetType` should be
created. Format should be `projects/{project_id}/locations/{location_name}`.customTargetType - Required. The `CustomTargetType` to create.customTargetTypeId - Required. ID of the `CustomTargetType`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> createCustomTargetTypeAsync(String parent, CustomTargetType customTargetType, String customTargetTypeId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
CustomTargetType customTargetType = CustomTargetType.newBuilder().build();
String customTargetTypeId = "customTargetTypeId1451302135";
CustomTargetType response =
cloudDeployClient
.createCustomTargetTypeAsync(parent, customTargetType, customTargetTypeId)
.get();
}
parent - Required. The parent collection in which the `CustomTargetType` should be
created. Format should be `projects/{project_id}/locations/{location_name}`.customTargetType - Required. The `CustomTargetType` to create.customTargetTypeId - Required. ID of the `CustomTargetType`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> createCustomTargetTypeAsync(CreateCustomTargetTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
CreateCustomTargetTypeRequest request =
CreateCustomTargetTypeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setCustomTargetTypeId("customTargetTypeId1451302135")
.setCustomTargetType(CustomTargetType.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
CustomTargetType response = cloudDeployClient.createCustomTargetTypeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateCustomTargetTypeRequest,CustomTargetType,OperationMetadata> createCustomTargetTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
CreateCustomTargetTypeRequest request =
CreateCustomTargetTypeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setCustomTargetTypeId("customTargetTypeId1451302135")
.setCustomTargetType(CustomTargetType.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
OperationFuture<CustomTargetType, OperationMetadata> future =
cloudDeployClient.createCustomTargetTypeOperationCallable().futureCall(request);
// Do something.
CustomTargetType response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateCustomTargetTypeRequest,com.google.longrunning.Operation> createCustomTargetTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
CreateCustomTargetTypeRequest request =
CreateCustomTargetTypeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setCustomTargetTypeId("customTargetTypeId1451302135")
.setCustomTargetType(CustomTargetType.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
cloudDeployClient.createCustomTargetTypeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> updateCustomTargetTypeAsync(CustomTargetType customTargetType, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
CustomTargetType customTargetType = CustomTargetType.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
CustomTargetType response =
cloudDeployClient.updateCustomTargetTypeAsync(customTargetType, updateMask).get();
}
customTargetType - Required. The `CustomTargetType` to update.updateMask - Required. Field mask is used to specify the fields to be overwritten in the
`CustomTargetType` 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's in the
mask. If the user doesn't provide a mask then all fields are overwritten.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<CustomTargetType,OperationMetadata> updateCustomTargetTypeAsync(UpdateCustomTargetTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateCustomTargetTypeRequest request =
UpdateCustomTargetTypeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCustomTargetType(CustomTargetType.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
CustomTargetType response = cloudDeployClient.updateCustomTargetTypeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateCustomTargetTypeRequest,CustomTargetType,OperationMetadata> updateCustomTargetTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateCustomTargetTypeRequest request =
UpdateCustomTargetTypeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCustomTargetType(CustomTargetType.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<CustomTargetType, OperationMetadata> future =
cloudDeployClient.updateCustomTargetTypeOperationCallable().futureCall(request);
// Do something.
CustomTargetType response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateCustomTargetTypeRequest,com.google.longrunning.Operation> updateCustomTargetTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateCustomTargetTypeRequest request =
UpdateCustomTargetTypeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setCustomTargetType(CustomTargetType.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
cloudDeployClient.updateCustomTargetTypeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCustomTargetTypeAsync(CustomTargetTypeName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
CustomTargetTypeName name =
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]");
cloudDeployClient.deleteCustomTargetTypeAsync(name).get();
}
name - Required. The name of the `CustomTargetType` to delete. Format must be
`projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCustomTargetTypeAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 =
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]").toString();
cloudDeployClient.deleteCustomTargetTypeAsync(name).get();
}
name - Required. The name of the `CustomTargetType` to delete. Format must be
`projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCustomTargetTypeAsync(DeleteCustomTargetTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
DeleteCustomTargetTypeRequest request =
DeleteCustomTargetTypeRequest.newBuilder()
.setName(
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]")
.toString())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
cloudDeployClient.deleteCustomTargetTypeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteCustomTargetTypeRequest,com.google.protobuf.Empty,OperationMetadata> deleteCustomTargetTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
DeleteCustomTargetTypeRequest request =
DeleteCustomTargetTypeRequest.newBuilder()
.setName(
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]")
.toString())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
cloudDeployClient.deleteCustomTargetTypeOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteCustomTargetTypeRequest,com.google.longrunning.Operation> deleteCustomTargetTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
DeleteCustomTargetTypeRequest request =
DeleteCustomTargetTypeRequest.newBuilder()
.setName(
CustomTargetTypeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_TARGET_TYPE]")
.toString())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
cloudDeployClient.deleteCustomTargetTypeCallable().futureCall(request);
// Do something.
future.get();
}
public final CloudDeployClient.ListReleasesPagedResponse listReleases(DeliveryPipelineName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
for (Release element : cloudDeployClient.listReleases(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The `DeliveryPipeline` which owns this collection of `Release` objects.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListReleasesPagedResponse listReleases(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
for (Release element : cloudDeployClient.listReleases(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The `DeliveryPipeline` which owns this collection of `Release` objects.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListReleasesPagedResponse listReleases(ListReleasesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListReleasesRequest request =
ListReleasesRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Release element : cloudDeployClient.listReleases(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListReleasesRequest,CloudDeployClient.ListReleasesPagedResponse> listReleasesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListReleasesRequest request =
ListReleasesRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Release> future = cloudDeployClient.listReleasesPagedCallable().futureCall(request);
// Do something.
for (Release element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListReleasesRequest,ListReleasesResponse> listReleasesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListReleasesRequest request =
ListReleasesRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListReleasesResponse response = cloudDeployClient.listReleasesCallable().call(request);
for (Release element : response.getReleasesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Release getRelease(ReleaseName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
Release response = cloudDeployClient.getRelease(name);
}
name - Required. Name of the `Release`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Release getRelease(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
Release response = cloudDeployClient.getRelease(name);
}
name - Required. Name of the `Release`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Release getRelease(GetReleaseRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetReleaseRequest request =
GetReleaseRequest.newBuilder()
.setName(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.build();
Release response = cloudDeployClient.getRelease(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetReleaseRequest,Release> getReleaseCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetReleaseRequest request =
GetReleaseRequest.newBuilder()
.setName(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.build();
ApiFuture<Release> future = cloudDeployClient.getReleaseCallable().futureCall(request);
// Do something.
Release response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Release,OperationMetadata> createReleaseAsync(DeliveryPipelineName parent, Release release, String releaseId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - Required. The parent collection in which the `Release` should be created. Format
should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.release - Required. The `Release` to create.releaseId - Required. ID of the `Release`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Release,OperationMetadata> createReleaseAsync(String parent, Release release, String releaseId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - Required. The parent collection in which the `Release` should be created. Format
should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.release - Required. The `Release` to create.releaseId - Required. ID of the `Release`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Release,OperationMetadata> createReleaseAsync(CreateReleaseRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateReleaseRequest,Release,OperationMetadata> createReleaseOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateReleaseRequest,com.google.longrunning.Operation> createReleaseCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final AbandonReleaseResponse abandonRelease(ReleaseName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the Release. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AbandonReleaseResponse abandonRelease(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the Release. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AbandonReleaseResponse abandonRelease(AbandonReleaseRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<AbandonReleaseRequest,AbandonReleaseResponse> abandonReleaseCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final ApproveRolloutResponse approveRollout(RolloutName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ApproveRolloutResponse approveRollout(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ApproveRolloutResponse approveRollout(ApproveRolloutRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ApproveRolloutRequest,ApproveRolloutResponse> approveRolloutCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final AdvanceRolloutResponse advanceRollout(RolloutName name, String phaseId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.phaseId - Required. The phase ID to advance the `Rollout` to.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AdvanceRolloutResponse advanceRollout(String name, String phaseId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.phaseId - Required. The phase ID to advance the `Rollout` to.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AdvanceRolloutResponse advanceRollout(AdvanceRolloutRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<AdvanceRolloutRequest,AdvanceRolloutResponse> advanceRolloutCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final CancelRolloutResponse cancelRollout(RolloutName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CancelRolloutResponse cancelRollout(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CancelRolloutResponse cancelRollout(CancelRolloutRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CancelRolloutRequest,CancelRolloutResponse> cancelRolloutCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final CloudDeployClient.ListRolloutsPagedResponse listRollouts(ReleaseName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
for (Rollout element : cloudDeployClient.listRollouts(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The `Release` which owns this collection of `Rollout` objects.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListRolloutsPagedResponse listRollouts(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
for (Rollout element : cloudDeployClient.listRollouts(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The `Release` which owns this collection of `Rollout` objects.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListRolloutsPagedResponse listRollouts(ListRolloutsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListRolloutsRequest request =
ListRolloutsRequest.newBuilder()
.setParent(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Rollout element : cloudDeployClient.listRollouts(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListRolloutsRequest,CloudDeployClient.ListRolloutsPagedResponse> listRolloutsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListRolloutsRequest request =
ListRolloutsRequest.newBuilder()
.setParent(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Rollout> future = cloudDeployClient.listRolloutsPagedCallable().futureCall(request);
// Do something.
for (Rollout element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListRolloutsRequest,ListRolloutsResponse> listRolloutsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListRolloutsRequest request =
ListRolloutsRequest.newBuilder()
.setParent(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListRolloutsResponse response = cloudDeployClient.listRolloutsCallable().call(request);
for (Rollout element : response.getRolloutsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Rollout getRollout(RolloutName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
Rollout response = cloudDeployClient.getRollout(name);
}
name - Required. Name of the `Rollout`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Rollout getRollout(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
Rollout response = cloudDeployClient.getRollout(name);
}
name - Required. Name of the `Rollout`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Rollout getRollout(GetRolloutRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetRolloutRequest request =
GetRolloutRequest.newBuilder()
.setName(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.build();
Rollout response = cloudDeployClient.getRollout(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetRolloutRequest,Rollout> getRolloutCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetRolloutRequest request =
GetRolloutRequest.newBuilder()
.setName(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.build();
ApiFuture<Rollout> future = cloudDeployClient.getRolloutCallable().futureCall(request);
// Do something.
Rollout response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Rollout,OperationMetadata> createRolloutAsync(ReleaseName parent, Rollout rollout, String rolloutId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - 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}`.rollout - Required. The `Rollout` to create.rolloutId - Required. ID of the `Rollout`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Rollout,OperationMetadata> createRolloutAsync(String parent, Rollout rollout, String rolloutId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - 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}`.rollout - Required. The `Rollout` to create.rolloutId - Required. ID of the `Rollout`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Rollout,OperationMetadata> createRolloutAsync(CreateRolloutRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateRolloutRequest,Rollout,OperationMetadata> createRolloutOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateRolloutRequest,com.google.longrunning.Operation> createRolloutCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final IgnoreJobResponse ignoreJob(RolloutName rollout, String phaseId, String jobId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 rollout =
RolloutName.of(
"[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
String phaseId = "phaseId-608264202";
String jobId = "jobId101296568";
IgnoreJobResponse response = cloudDeployClient.ignoreJob(rollout, phaseId, jobId);
}
rollout - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.phaseId - Required. The phase ID the Job to ignore belongs to.jobId - Required. The job ID for the Job to ignore.com.google.api.gax.rpc.ApiException - if the remote call failspublic final IgnoreJobResponse ignoreJob(String rollout, String phaseId, String jobId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 rollout =
RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
.toString();
String phaseId = "phaseId-608264202";
String jobId = "jobId101296568";
IgnoreJobResponse response = cloudDeployClient.ignoreJob(rollout, phaseId, jobId);
}
rollout - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.phaseId - Required. The phase ID the Job to ignore belongs to.jobId - Required. The job ID for the Job to ignore.com.google.api.gax.rpc.ApiException - if the remote call failspublic final IgnoreJobResponse ignoreJob(IgnoreJobRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
IgnoreJobRequest request =
IgnoreJobRequest.newBuilder()
.setRollout(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setPhaseId("phaseId-608264202")
.setJobId("jobId101296568")
.build();
IgnoreJobResponse response = cloudDeployClient.ignoreJob(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<IgnoreJobRequest,IgnoreJobResponse> ignoreJobCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
IgnoreJobRequest request =
IgnoreJobRequest.newBuilder()
.setRollout(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setPhaseId("phaseId-608264202")
.setJobId("jobId101296568")
.build();
ApiFuture<IgnoreJobResponse> future =
cloudDeployClient.ignoreJobCallable().futureCall(request);
// Do something.
IgnoreJobResponse response = future.get();
}
public final RetryJobResponse retryJob(RolloutName rollout, String phaseId, String jobId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 rollout =
RolloutName.of(
"[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
String phaseId = "phaseId-608264202";
String jobId = "jobId101296568";
RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId);
}
rollout - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.phaseId - Required. The phase ID the Job to retry belongs to.jobId - Required. The job ID for the Job to retry.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RetryJobResponse retryJob(String rollout, String phaseId, String jobId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 rollout =
RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
.toString();
String phaseId = "phaseId-608264202";
String jobId = "jobId101296568";
RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId);
}
rollout - Required. Name of the Rollout. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.phaseId - Required. The phase ID the Job to retry belongs to.jobId - Required. The job ID for the Job to retry.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RetryJobResponse retryJob(RetryJobRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
RetryJobRequest request =
RetryJobRequest.newBuilder()
.setRollout(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setPhaseId("phaseId-608264202")
.setJobId("jobId101296568")
.build();
RetryJobResponse response = cloudDeployClient.retryJob(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<RetryJobRequest,RetryJobResponse> retryJobCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
RetryJobRequest request =
RetryJobRequest.newBuilder()
.setRollout(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setPhaseId("phaseId-608264202")
.setJobId("jobId101296568")
.build();
ApiFuture<RetryJobResponse> future = cloudDeployClient.retryJobCallable().futureCall(request);
// Do something.
RetryJobResponse response = future.get();
}
public final CloudDeployClient.ListJobRunsPagedResponse listJobRuns(RolloutName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 parent =
RolloutName.of(
"[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The `Rollout` which owns this collection of `JobRun` objects.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListJobRunsPagedResponse listJobRuns(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 =
RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
.toString();
for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The `Rollout` which owns this collection of `JobRun` objects.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListJobRunsPagedResponse listJobRuns(ListJobRunsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListJobRunsRequest request =
ListJobRunsRequest.newBuilder()
.setParent(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (JobRun element : cloudDeployClient.listJobRuns(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListJobRunsRequest,CloudDeployClient.ListJobRunsPagedResponse> listJobRunsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListJobRunsRequest request =
ListJobRunsRequest.newBuilder()
.setParent(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<JobRun> future = cloudDeployClient.listJobRunsPagedCallable().futureCall(request);
// Do something.
for (JobRun element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListJobRunsRequest,ListJobRunsResponse> listJobRunsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListJobRunsRequest request =
ListJobRunsRequest.newBuilder()
.setParent(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListJobRunsResponse response = cloudDeployClient.listJobRunsCallable().call(request);
for (JobRun element : response.getJobRunsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final JobRun getJobRun(JobRunName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
JobRunName name =
JobRunName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]",
"[JOB_RUN]");
JobRun response = cloudDeployClient.getJobRun(name);
}
name - Required. Name of the `JobRun`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final JobRun getJobRun(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 =
JobRunName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]",
"[JOB_RUN]")
.toString();
JobRun response = cloudDeployClient.getJobRun(name);
}
name - Required. Name of the `JobRun`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final JobRun getJobRun(GetJobRunRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetJobRunRequest request =
GetJobRunRequest.newBuilder()
.setName(
JobRunName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]",
"[JOB_RUN]")
.toString())
.build();
JobRun response = cloudDeployClient.getJobRun(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetJobRunRequest,JobRun> getJobRunCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetJobRunRequest request =
GetJobRunRequest.newBuilder()
.setName(
JobRunName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]",
"[JOB_RUN]")
.toString())
.build();
ApiFuture<JobRun> future = cloudDeployClient.getJobRunCallable().futureCall(request);
// Do something.
JobRun response = future.get();
}
public final TerminateJobRunResponse terminateJobRun(JobRunName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
JobRunName name =
JobRunName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]",
"[JOB_RUN]");
TerminateJobRunResponse response = cloudDeployClient.terminateJobRun(name);
}
name - Required. Name of the `JobRun`. Format must be
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TerminateJobRunResponse terminateJobRun(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 =
JobRunName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]",
"[JOB_RUN]")
.toString();
TerminateJobRunResponse response = cloudDeployClient.terminateJobRun(name);
}
name - Required. Name of the `JobRun`. Format must be
`projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TerminateJobRunResponse terminateJobRun(TerminateJobRunRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
TerminateJobRunRequest request =
TerminateJobRunRequest.newBuilder()
.setName(
JobRunName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]",
"[JOB_RUN]")
.toString())
.build();
TerminateJobRunResponse response = cloudDeployClient.terminateJobRun(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<TerminateJobRunRequest,TerminateJobRunResponse> terminateJobRunCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
TerminateJobRunRequest request =
TerminateJobRunRequest.newBuilder()
.setName(
JobRunName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]",
"[JOB_RUN]")
.toString())
.build();
ApiFuture<TerminateJobRunResponse> future =
cloudDeployClient.terminateJobRunCallable().futureCall(request);
// Do something.
TerminateJobRunResponse response = future.get();
}
public final Config getConfig(ConfigName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]");
Config response = cloudDeployClient.getConfig(name);
}
name - Required. Name of requested configuration.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Config getConfig(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 = ConfigName.of("[PROJECT]", "[LOCATION]").toString();
Config response = cloudDeployClient.getConfig(name);
}
name - Required. Name of requested configuration.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Config getConfig(GetConfigRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetConfigRequest request =
GetConfigRequest.newBuilder()
.setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
Config response = cloudDeployClient.getConfig(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetConfigRequest,Config> getConfigCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetConfigRequest request =
GetConfigRequest.newBuilder()
.setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
ApiFuture<Config> future = cloudDeployClient.getConfigCallable().futureCall(request);
// Do something.
Config response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> createAutomationAsync(DeliveryPipelineName parent, Automation automation, String automationId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - Required. The parent collection in which the `Automation` should be created.
Format should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.automation - Required. The `Automation` to create.automationId - Required. ID of the `Automation`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> createAutomationAsync(String parent, Automation automation, String automationId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
parent - Required. The parent collection in which the `Automation` should be created.
Format should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.automation - Required. The `Automation` to create.automationId - Required. ID of the `Automation`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> createAutomationAsync(CreateAutomationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateAutomationRequest,Automation,OperationMetadata> createAutomationOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAutomationRequest,com.google.longrunning.Operation> createAutomationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> updateAutomationAsync(Automation automation, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
Automation automation = Automation.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Automation response = cloudDeployClient.updateAutomationAsync(automation, updateMask).get();
}
automation - Required. The `Automation` to update.updateMask - Required. Field mask is used to specify the fields to be overwritten in the
`Automation` 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's in the mask. If
the user doesn't provide a mask then all fields are overwritten.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Automation,OperationMetadata> updateAutomationAsync(UpdateAutomationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateAutomationRequest request =
UpdateAutomationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAutomation(Automation.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
Automation response = cloudDeployClient.updateAutomationAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateAutomationRequest,Automation,OperationMetadata> updateAutomationOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateAutomationRequest request =
UpdateAutomationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAutomation(Automation.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<Automation, OperationMetadata> future =
cloudDeployClient.updateAutomationOperationCallable().futureCall(request);
// Do something.
Automation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateAutomationRequest,com.google.longrunning.Operation> updateAutomationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
UpdateAutomationRequest request =
UpdateAutomationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAutomation(Automation.newBuilder().build())
.setRequestId("requestId693933066")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
cloudDeployClient.updateAutomationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAutomationAsync(AutomationName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
name - Required. The name of the `Automation` to delete. Format should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAutomationAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
name - Required. The name of the `Automation` to delete. Format should be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAutomationAsync(DeleteAutomationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteAutomationRequest,com.google.protobuf.Empty,OperationMetadata> deleteAutomationOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAutomationRequest,com.google.longrunning.Operation> deleteAutomationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final Automation getAutomation(AutomationName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
Automation response = cloudDeployClient.getAutomation(name);
}
name - Required. Name of the `Automation`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Automation getAutomation(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
Automation response = cloudDeployClient.getAutomation(name);
}
name - Required. Name of the `Automation`. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Automation getAutomation(GetAutomationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetAutomationRequest request =
GetAutomationRequest.newBuilder()
.setName(
AutomationName.of(
"[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
.toString())
.build();
Automation response = cloudDeployClient.getAutomation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAutomationRequest,Automation> getAutomationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetAutomationRequest request =
GetAutomationRequest.newBuilder()
.setName(
AutomationName.of(
"[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
.toString())
.build();
ApiFuture<Automation> future = cloudDeployClient.getAutomationCallable().futureCall(request);
// Do something.
Automation response = future.get();
}
public final CloudDeployClient.ListAutomationsPagedResponse listAutomations(DeliveryPipelineName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
for (Automation element : cloudDeployClient.listAutomations(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent `Delivery Pipeline`, which owns this collection of
automations. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListAutomationsPagedResponse listAutomations(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
for (Automation element : cloudDeployClient.listAutomations(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent `Delivery Pipeline`, which owns this collection of
automations. Format must be
`projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListAutomationsPagedResponse listAutomations(ListAutomationsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListAutomationsRequest request =
ListAutomationsRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Automation element : cloudDeployClient.listAutomations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAutomationsRequest,CloudDeployClient.ListAutomationsPagedResponse> listAutomationsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListAutomationsRequest request =
ListAutomationsRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Automation> future =
cloudDeployClient.listAutomationsPagedCallable().futureCall(request);
// Do something.
for (Automation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAutomationsRequest,ListAutomationsResponse> listAutomationsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListAutomationsRequest request =
ListAutomationsRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListAutomationsResponse response =
cloudDeployClient.listAutomationsCallable().call(request);
for (Automation element : response.getAutomationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final AutomationRun getAutomationRun(AutomationRunName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
AutomationRun response = cloudDeployClient.getAutomationRun(name);
}
name - Required. Name of the `AutomationRun`. Format must be
`projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AutomationRun getAutomationRun(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
AutomationRun response = cloudDeployClient.getAutomationRun(name);
}
name - Required. Name of the `AutomationRun`. Format must be
`projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AutomationRun getAutomationRun(GetAutomationRunRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetAutomationRunRequest request =
GetAutomationRunRequest.newBuilder()
.setName(
AutomationRunName.of(
"[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
.toString())
.build();
AutomationRun response = cloudDeployClient.getAutomationRun(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAutomationRunRequest,AutomationRun> getAutomationRunCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetAutomationRunRequest request =
GetAutomationRunRequest.newBuilder()
.setName(
AutomationRunName.of(
"[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
.toString())
.build();
ApiFuture<AutomationRun> future =
cloudDeployClient.getAutomationRunCallable().futureCall(request);
// Do something.
AutomationRun response = future.get();
}
public final CloudDeployClient.ListAutomationRunsPagedResponse listAutomationRuns(DeliveryPipelineName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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]");
for (AutomationRun element : cloudDeployClient.listAutomationRuns(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent `Delivery Pipeline`, which owns this collection of
automationRuns. Format must be
`projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListAutomationRunsPagedResponse listAutomationRuns(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
for (AutomationRun element : cloudDeployClient.listAutomationRuns(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent `Delivery Pipeline`, which owns this collection of
automationRuns. Format must be
`projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudDeployClient.ListAutomationRunsPagedResponse listAutomationRuns(ListAutomationRunsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListAutomationRunsRequest request =
ListAutomationRunsRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (AutomationRun element : cloudDeployClient.listAutomationRuns(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAutomationRunsRequest,CloudDeployClient.ListAutomationRunsPagedResponse> listAutomationRunsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListAutomationRunsRequest request =
ListAutomationRunsRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<AutomationRun> future =
cloudDeployClient.listAutomationRunsPagedCallable().futureCall(request);
// Do something.
for (AutomationRun element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAutomationRunsRequest,ListAutomationRunsResponse> listAutomationRunsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListAutomationRunsRequest request =
ListAutomationRunsRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListAutomationRunsResponse response =
cloudDeployClient.listAutomationRunsCallable().call(request);
for (AutomationRun element : response.getAutomationRunsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final CancelAutomationRunResponse cancelAutomationRun(AutomationRunName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the `AutomationRun`. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CancelAutomationRunResponse cancelAutomationRun(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
name - Required. Name of the `AutomationRun`. Format is
`projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CancelAutomationRunResponse cancelAutomationRun(CancelAutomationRunRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CancelAutomationRunRequest,CancelAutomationRunResponse> cancelAutomationRunCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final CloudDeployClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : cloudDeployClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,CloudDeployClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
cloudDeployClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response = cloudDeployClient.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;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = cloudDeployClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = cloudDeployClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = cloudDeployClient.setIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicyCallable()
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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future = cloudDeployClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = cloudDeployClient.getIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future = cloudDeployClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = cloudDeployClient.testIamPermissions(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsCallable()
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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
cloudDeployClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.