public class CloudDeployClient implements BackgroundResource
Service Description: CloudDeploy service creates and manages Continuous Delivery operations on Google Cloud Platform via Skaffold (https://skaffold.dev).
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
DeliveryPipelineName name =
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
}
Note: close() needs to be called on the CloudDeployClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of CloudDeploySettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CloudDeploySettings cloudDeploySettings =
CloudDeploySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CloudDeploySettings cloudDeploySettings =
CloudDeploySettings.newBuilder().setEndpoint(myEndpoint).build();
CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CloudDeploySettings cloudDeploySettings = CloudDeploySettings.newHttpJsonBuilder().build();
CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final CloudDeployClient create()
Constructs an instance of CloudDeployClient with default settings.
Type | Description |
CloudDeployClient |
Type | Description |
IOException |
create(CloudDeploySettings settings)
public static final CloudDeployClient create(CloudDeploySettings settings)
Constructs an instance of CloudDeployClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | CloudDeploySettings |
Type | Description |
CloudDeployClient |
Type | Description |
IOException |
create(CloudDeployStub stub)
public static final CloudDeployClient create(CloudDeployStub stub)
Constructs an instance of CloudDeployClient, using the given stub for making calls. This is for advanced usage - prefer using create(CloudDeploySettings).
Name | Description |
stub | CloudDeployStub |
Type | Description |
CloudDeployClient |
Constructors
CloudDeployClient(CloudDeploySettings settings)
protected CloudDeployClient(CloudDeploySettings settings)
Constructs an instance of CloudDeployClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Name | Description |
settings | CloudDeploySettings |
CloudDeployClient(CloudDeployStub stub)
protected CloudDeployClient(CloudDeployStub stub)
Name | Description |
stub | CloudDeployStub |
Methods
abandonRelease(AbandonReleaseRequest request)
public final AbandonReleaseResponse abandonRelease(AbandonReleaseRequest request)
Abandons a Release in the Delivery Pipeline.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
AbandonReleaseRequest request =
AbandonReleaseRequest.newBuilder()
.setName(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.build();
AbandonReleaseResponse response = cloudDeployClient.abandonRelease(request);
}
Name | Description |
request | AbandonReleaseRequest The request object containing all of the parameters for the API call. |
Type | Description |
AbandonReleaseResponse |
abandonRelease(ReleaseName name)
public final AbandonReleaseResponse abandonRelease(ReleaseName name)
Abandons a Release in the Delivery Pipeline.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
ReleaseName name =
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name);
}
Name | Description |
name | ReleaseName Required. Name of the Release. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}. |
Type | Description |
AbandonReleaseResponse |
abandonRelease(String name)
public final AbandonReleaseResponse abandonRelease(String name)
Abandons a Release in the Delivery Pipeline.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
String name =
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name);
}
Name | Description |
name | String Required. Name of the Release. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}. |
Type | Description |
AbandonReleaseResponse |
abandonReleaseCallable()
public final UnaryCallable<AbandonReleaseRequest,AbandonReleaseResponse> abandonReleaseCallable()
Abandons a Release in the Delivery Pipeline.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
AbandonReleaseRequest request =
AbandonReleaseRequest.newBuilder()
.setName(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.build();
ApiFuture<AbandonReleaseResponse> future =
cloudDeployClient.abandonReleaseCallable().futureCall(request);
// Do something.
AbandonReleaseResponse response = future.get();
}
Type | Description |
UnaryCallable<AbandonReleaseRequest,AbandonReleaseResponse> |
approveRollout(ApproveRolloutRequest request)
public final ApproveRolloutResponse approveRollout(ApproveRolloutRequest request)
Approves a Rollout.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
ApproveRolloutRequest request =
ApproveRolloutRequest.newBuilder()
.setName(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setApproved(true)
.build();
ApproveRolloutResponse response = cloudDeployClient.approveRollout(request);
}
Name | Description |
request | ApproveRolloutRequest The request object containing all of the parameters for the API call. |
Type | Description |
ApproveRolloutResponse |
approveRollout(RolloutName name)
public final ApproveRolloutResponse approveRollout(RolloutName name)
Approves a Rollout.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
RolloutName name =
RolloutName.of(
"[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
ApproveRolloutResponse response = cloudDeployClient.approveRollout(name);
}
Name | Description |
name | RolloutName Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}. |
Type | Description |
ApproveRolloutResponse |
approveRollout(String name)
public final ApproveRolloutResponse approveRollout(String name)
Approves a Rollout.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
String name =
RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
.toString();
ApproveRolloutResponse response = cloudDeployClient.approveRollout(name);
}
Name | Description |
name | String Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}. |
Type | Description |
ApproveRolloutResponse |
approveRolloutCallable()
public final UnaryCallable<ApproveRolloutRequest,ApproveRolloutResponse> approveRolloutCallable()
Approves a Rollout.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
ApproveRolloutRequest request =
ApproveRolloutRequest.newBuilder()
.setName(
RolloutName.of(
"[PROJECT]",
"[LOCATION]",
"[DELIVERY_PIPELINE]",
"[RELEASE]",
"[ROLLOUT]")
.toString())
.setApproved(true)
.build();
ApiFuture<ApproveRolloutResponse> future =
cloudDeployClient.approveRolloutCallable().futureCall(request);
// Do something.
ApproveRolloutResponse response = future.get();
}
Type | Description |
UnaryCallable<ApproveRolloutRequest,ApproveRolloutResponse> |
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createDeliveryPipelineAsync(CreateDeliveryPipelineRequest request)
public final OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(CreateDeliveryPipelineRequest request)
Creates a new DeliveryPipeline in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateDeliveryPipelineRequest request =
CreateDeliveryPipelineRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDeliveryPipelineId("deliveryPipelineId-632411535")
.setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
DeliveryPipeline response = cloudDeployClient.createDeliveryPipelineAsync(request).get();
}
Name | Description |
request | CreateDeliveryPipelineRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<DeliveryPipeline,OperationMetadata> |
createDeliveryPipelineAsync(LocationName parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)
public final OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(LocationName parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)
Creates a new DeliveryPipeline in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
String deliveryPipelineId = "deliveryPipelineId-632411535";
DeliveryPipeline response =
cloudDeployClient
.createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId)
.get();
}
Name | Description |
parent | LocationName Required. The parent collection in which the |
deliveryPipeline | DeliveryPipeline Required. The |
deliveryPipelineId | String Required. ID of the |
Type | Description |
OperationFuture<DeliveryPipeline,OperationMetadata> |
createDeliveryPipelineAsync(String parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)
public final OperationFuture<DeliveryPipeline,OperationMetadata> createDeliveryPipelineAsync(String parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId)
Creates a new DeliveryPipeline in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
String deliveryPipelineId = "deliveryPipelineId-632411535";
DeliveryPipeline response =
cloudDeployClient
.createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId)
.get();
}
Name | Description |
parent | String Required. The parent collection in which the |
deliveryPipeline | DeliveryPipeline Required. The |
deliveryPipelineId | String Required. ID of the |
Type | Description |
OperationFuture<DeliveryPipeline,OperationMetadata> |
createDeliveryPipelineCallable()
public final UnaryCallable<CreateDeliveryPipelineRequest,Operation> createDeliveryPipelineCallable()
Creates a new DeliveryPipeline in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateDeliveryPipelineRequest request =
CreateDeliveryPipelineRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDeliveryPipelineId("deliveryPipelineId-632411535")
.setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
cloudDeployClient.createDeliveryPipelineCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateDeliveryPipelineRequest,Operation> |
createDeliveryPipelineOperationCallable()
public final OperationCallable<CreateDeliveryPipelineRequest,DeliveryPipeline,OperationMetadata> createDeliveryPipelineOperationCallable()
Creates a new DeliveryPipeline in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateDeliveryPipelineRequest request =
CreateDeliveryPipelineRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDeliveryPipelineId("deliveryPipelineId-632411535")
.setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
OperationFuture<DeliveryPipeline, OperationMetadata> future =
cloudDeployClient.createDeliveryPipelineOperationCallable().futureCall(request);
// Do something.
DeliveryPipeline response = future.get();
}
Type | Description |
OperationCallable<CreateDeliveryPipelineRequest,DeliveryPipeline,OperationMetadata> |
createReleaseAsync(CreateReleaseRequest request)
public final OperationFuture<Release,OperationMetadata> createReleaseAsync(CreateReleaseRequest request)
Creates a new Release in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateReleaseRequest request =
CreateReleaseRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setReleaseId("releaseId89607042")
.setRelease(Release.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
Release response = cloudDeployClient.createReleaseAsync(request).get();
}
Name | Description |
request | CreateReleaseRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Release,OperationMetadata> |
createReleaseAsync(DeliveryPipelineName parent, Release release, String releaseId)
public final OperationFuture<Release,OperationMetadata> createReleaseAsync(DeliveryPipelineName parent, Release release, String releaseId)
Creates a new Release in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
DeliveryPipelineName parent =
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
Release release = Release.newBuilder().build();
String releaseId = "releaseId89607042";
Release response = cloudDeployClient.createReleaseAsync(parent, release, releaseId).get();
}
Name | Description |
parent | DeliveryPipelineName Required. The parent collection in which the |
release | Release Required. The |
releaseId | String Required. ID of the |
Type | Description |
OperationFuture<Release,OperationMetadata> |
createReleaseAsync(String parent, Release release, String releaseId)
public final OperationFuture<Release,OperationMetadata> createReleaseAsync(String parent, Release release, String releaseId)
Creates a new Release in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
String parent =
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
Release release = Release.newBuilder().build();
String releaseId = "releaseId89607042";
Release response = cloudDeployClient.createReleaseAsync(parent, release, releaseId).get();
}
Name | Description |
parent | String Required. The parent collection in which the |
release | Release Required. The |
releaseId | String Required. ID of the |
Type | Description |
OperationFuture<Release,OperationMetadata> |
createReleaseCallable()
public final UnaryCallable<CreateReleaseRequest,Operation> createReleaseCallable()
Creates a new Release in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateReleaseRequest request =
CreateReleaseRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setReleaseId("releaseId89607042")
.setRelease(Release.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = cloudDeployClient.createReleaseCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateReleaseRequest,Operation> |
createReleaseOperationCallable()
public final OperationCallable<CreateReleaseRequest,Release,OperationMetadata> createReleaseOperationCallable()
Creates a new Release in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateReleaseRequest request =
CreateReleaseRequest.newBuilder()
.setParent(
DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
.toString())
.setReleaseId("releaseId89607042")
.setRelease(Release.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
OperationFuture<Release, OperationMetadata> future =
cloudDeployClient.createReleaseOperationCallable().futureCall(request);
// Do something.
Release response = future.get();
}
Type | Description |
OperationCallable<CreateReleaseRequest,Release,OperationMetadata> |
createRolloutAsync(CreateRolloutRequest request)
public final OperationFuture<Rollout,OperationMetadata> createRolloutAsync(CreateRolloutRequest request)
Creates a new Rollout in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateRolloutRequest request =
CreateRolloutRequest.newBuilder()
.setParent(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.setRolloutId("rolloutId551248556")
.setRollout(Rollout.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
Rollout response = cloudDeployClient.createRolloutAsync(request).get();
}
Name | Description |
request | CreateRolloutRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Rollout,OperationMetadata> |
createRolloutAsync(ReleaseName parent, Rollout rollout, String rolloutId)
public final OperationFuture<Rollout,OperationMetadata> createRolloutAsync(ReleaseName parent, Rollout rollout, String rolloutId)
Creates a new Rollout in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
ReleaseName parent =
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
Rollout rollout = Rollout.newBuilder().build();
String rolloutId = "rolloutId551248556";
Rollout response = cloudDeployClient.createRolloutAsync(parent, rollout, rolloutId).get();
}
Name | Description |
parent | ReleaseName Required. The parent collection in which the |
rollout | Rollout Required. The |
rolloutId | String Required. ID of the |
Type | Description |
OperationFuture<Rollout,OperationMetadata> |
createRolloutAsync(String parent, Rollout rollout, String rolloutId)
public final OperationFuture<Rollout,OperationMetadata> createRolloutAsync(String parent, Rollout rollout, String rolloutId)
Creates a new Rollout in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
String parent =
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
Rollout rollout = Rollout.newBuilder().build();
String rolloutId = "rolloutId551248556";
Rollout response = cloudDeployClient.createRolloutAsync(parent, rollout, rolloutId).get();
}
Name | Description |
parent | String Required. The parent collection in which the |
rollout | Rollout Required. The |
rolloutId | String Required. ID of the |
Type | Description |
OperationFuture<Rollout,OperationMetadata> |
createRolloutCallable()
public final UnaryCallable<CreateRolloutRequest,Operation> createRolloutCallable()
Creates a new Rollout in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateRolloutRequest request =
CreateRolloutRequest.newBuilder()
.setParent(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.setRolloutId("rolloutId551248556")
.setRollout(Rollout.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = cloudDeployClient.createRolloutCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateRolloutRequest,Operation> |
createRolloutOperationCallable()
public final OperationCallable<CreateRolloutRequest,Rollout,OperationMetadata> createRolloutOperationCallable()
Creates a new Rollout in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateRolloutRequest request =
CreateRolloutRequest.newBuilder()
.setParent(
ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
.toString())
.setRolloutId("rolloutId551248556")
.setRollout(Rollout.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
OperationFuture<Rollout, OperationMetadata> future =
cloudDeployClient.createRolloutOperationCallable().futureCall(request);
// Do something.
Rollout response = future.get();
}
Type | Description |
OperationCallable<CreateRolloutRequest,Rollout,OperationMetadata> |
createTargetAsync(CreateTargetRequest request)
public final OperationFuture<Target,OperationMetadata> createTargetAsync(CreateTargetRequest request)
Creates a new Target in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateTargetRequest request =
CreateTargetRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTargetId("targetId-441951604")
.setTarget(Target.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
Target response = cloudDeployClient.createTargetAsync(request).get();
}
Name | Description |
request | CreateTargetRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Target,OperationMetadata> |
createTargetAsync(LocationName parent, Target target, String targetId)
public final OperationFuture<Target,OperationMetadata> createTargetAsync(LocationName parent, Target target, String targetId)
Creates a new Target in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Target target = Target.newBuilder().build();
String targetId = "targetId-441951604";
Target response = cloudDeployClient.createTargetAsync(parent, target, targetId).get();
}
Name | Description |
parent | LocationName Required. The parent collection in which the |
target | Target Required. The |
targetId | String Required. ID of the |
Type | Description |
OperationFuture<Target,OperationMetadata> |
createTargetAsync(String parent, Target target, String targetId)
public final OperationFuture<Target,OperationMetadata> createTargetAsync(String parent, Target target, String targetId)
Creates a new Target in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Target target = Target.newBuilder().build();
String targetId = "targetId-441951604";
Target response = cloudDeployClient.createTargetAsync(parent, target, targetId).get();
}
Name | Description |
parent | String Required. The parent collection in which the |
target | Target Required. The |
targetId | String Required. ID of the |
Type | Description |
OperationFuture<Target,OperationMetadata> |
createTargetCallable()
public final UnaryCallable<CreateTargetRequest,Operation> createTargetCallable()
Creates a new Target in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateTargetRequest request =
CreateTargetRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTargetId("targetId-441951604")
.setTarget(Target.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = cloudDeployClient.createTargetCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateTargetRequest,Operation> |
createTargetOperationCallable()
public final OperationCallable<CreateTargetRequest,Target,OperationMetadata> createTargetOperationCallable()
Creates a new Target in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
CreateTargetRequest request =
CreateTargetRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTargetId("targetId-441951604")
.setTarget(Target.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
OperationFuture<Target, OperationMetadata> future =
cloudDeployClient.createTargetOperationCallable().futureCall(request);
// Do something.
Target response = future.get();
}
Type | Description |
OperationCallable<CreateTargetRequest,Target,OperationMetadata> |
deleteDeliveryPipelineAsync(DeleteDeliveryPipelineRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteDeliveryPipelineAsync(DeleteDeliveryPipelineRequest request)
Deletes a single DeliveryPipeline.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying re