| GitHub Repository | Product Reference |
Service Description: The Rollouts API.
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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
String project = "project-309310695";
String rollout = "rollout1377108401";
Rollout response = rolloutsClient.get(project, rollout);
}
Note: close() needs to be called on the RolloutsClient 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 |
|---|---|---|
Advance |
Advances a Rollout to the next wave, or completes it if no waves remain. |
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
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Cancel |
Cancels a Rollout. |
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
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Delete |
Deletes a Rollout. |
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
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Get |
Gets details of a single project-scoped 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.
|
List |
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.
|
Pause |
Pauses a Rollout. |
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
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Resume |
Resumes a Rollout. |
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
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 RolloutsSettings 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
RolloutsSettings rolloutsSettings =
RolloutsSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RolloutsClient rolloutsClient = RolloutsClient.create(rolloutsSettings);
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
RolloutsSettings rolloutsSettings =
RolloutsSettings.newBuilder().setEndpoint(myEndpoint).build();
RolloutsClient rolloutsClient = RolloutsClient.create(rolloutsSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final RolloutsClient create()Constructs an instance of RolloutsClient with default settings.
| Returns | |
|---|---|
| Type | Description |
RolloutsClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(RolloutsSettings settings)
public static final RolloutsClient create(RolloutsSettings settings)Constructs an instance of RolloutsClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
RolloutsSettings |
| Returns | |
|---|---|
| Type | Description |
RolloutsClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(RolloutsStub stub)
public static final RolloutsClient create(RolloutsStub stub)Constructs an instance of RolloutsClient, using the given stub for making calls. This is for advanced usage - prefer using create(RolloutsSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
RolloutsStub |
| Returns | |
|---|---|
| Type | Description |
RolloutsClient |
|
Constructors
RolloutsClient(RolloutsSettings settings)
protected RolloutsClient(RolloutsSettings settings)Constructs an instance of RolloutsClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
RolloutsSettings |
RolloutsClient(RolloutsStub stub)
protected RolloutsClient(RolloutsStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
RolloutsStub |
Methods
advanceAsync(AdvanceRolloutRequest request)
public final OperationFuture<Operation,Operation> advanceAsync(AdvanceRolloutRequest request)Advances a Rollout to the next wave, or completes it if no waves remain.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RolloutsClient rolloutsClient = RolloutsClient.create()) {
AdvanceRolloutRequest request =
AdvanceRolloutRequest.newBuilder()
.setCurrentWaveNumber(-1432331895)
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
Operation response = rolloutsClient.advanceAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
AdvanceRolloutRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
advanceAsync(String project, String rollout)
public final OperationFuture<Operation,Operation> advanceAsync(String project, String rollout)Advances a Rollout to the next wave, or completes it if no waves remain.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RolloutsClient rolloutsClient = RolloutsClient.create()) {
String project = "project-309310695";
String rollout = "rollout1377108401";
Operation response = rolloutsClient.advanceAsync(project, rollout).get();
}
| Parameters | |
|---|---|
| Name | Description |
project |
StringRequired. Project ID for this request. |
rollout |
StringRequired. Name of the Rollout resource to advance. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
advanceCallable()
public final UnaryCallable<AdvanceRolloutRequest,Operation> advanceCallable()Advances a Rollout to the next wave, or completes it if no waves remain.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RolloutsClient rolloutsClient = RolloutsClient.create()) {
AdvanceRolloutRequest request =
AdvanceRolloutRequest.newBuilder()
.setCurrentWaveNumber(-1432331895)
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
ApiFuture<Operation> future = rolloutsClient.advanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<AdvanceRolloutRequest,Operation> |
|
advanceOperationCallable()
public final OperationCallable<AdvanceRolloutRequest,Operation,Operation> advanceOperationCallable()Advances a Rollout to the next wave, or completes it if no waves remain.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RolloutsClient rolloutsClient = RolloutsClient.create()) {
AdvanceRolloutRequest request =
AdvanceRolloutRequest.newBuilder()
.setCurrentWaveNumber(-1432331895)
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
OperationFuture<Operation, Operation> future =
rolloutsClient.advanceOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<AdvanceRolloutRequest,Operation,Operation> |
|
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
cancelAsync(CancelRolloutRequest request)
public final OperationFuture<Operation,Operation> cancelAsync(CancelRolloutRequest request)Cancels 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
CancelRolloutRequest request =
CancelRolloutRequest.newBuilder()
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollback(true)
.setRollout("rollout1377108401")
.build();
Operation response = rolloutsClient.cancelAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CancelRolloutRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
cancelAsync(String project, String rollout)
public final OperationFuture<Operation,Operation> cancelAsync(String project, String rollout)Cancels 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
String project = "project-309310695";
String rollout = "rollout1377108401";
Operation response = rolloutsClient.cancelAsync(project, rollout).get();
}
| Parameters | |
|---|---|
| Name | Description |
project |
StringProject ID for this request. |
rollout |
StringName of the Rollout resource to cancel. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
cancelCallable()
public final UnaryCallable<CancelRolloutRequest,Operation> cancelCallable()Cancels 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
CancelRolloutRequest request =
CancelRolloutRequest.newBuilder()
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollback(true)
.setRollout("rollout1377108401")
.build();
ApiFuture<Operation> future = rolloutsClient.cancelCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CancelRolloutRequest,Operation> |
|
cancelOperationCallable()
public final OperationCallable<CancelRolloutRequest,Operation,Operation> cancelOperationCallable()Cancels 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
CancelRolloutRequest request =
CancelRolloutRequest.newBuilder()
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollback(true)
.setRollout("rollout1377108401")
.build();
OperationFuture<Operation, Operation> future =
rolloutsClient.cancelOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CancelRolloutRequest,Operation,Operation> |
|
close()
public final void close()deleteAsync(DeleteRolloutRequest request)
public final OperationFuture<Operation,Operation> deleteAsync(DeleteRolloutRequest request)Deletes 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
DeleteRolloutRequest request =
DeleteRolloutRequest.newBuilder()
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
Operation response = rolloutsClient.deleteAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteRolloutRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
deleteAsync(String project, String rollout)
public final OperationFuture<Operation,Operation> deleteAsync(String project, String rollout)Deletes 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
String project = "project-309310695";
String rollout = "rollout1377108401";
Operation response = rolloutsClient.deleteAsync(project, rollout).get();
}
| Parameters | |
|---|---|
| Name | Description |
project |
StringProject ID for this request. |
rollout |
StringName of the Rollout resource to delete. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
deleteCallable()
public final UnaryCallable<DeleteRolloutRequest,Operation> deleteCallable()Deletes 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
DeleteRolloutRequest request =
DeleteRolloutRequest.newBuilder()
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
ApiFuture<Operation> future = rolloutsClient.deleteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteRolloutRequest,Operation> |
|
deleteOperationCallable()
public final OperationCallable<DeleteRolloutRequest,Operation,Operation> deleteOperationCallable()Deletes 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
DeleteRolloutRequest request =
DeleteRolloutRequest.newBuilder()
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
OperationFuture<Operation, Operation> future =
rolloutsClient.deleteOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteRolloutRequest,Operation,Operation> |
|
get(GetRolloutRequest request)
public final Rollout get(GetRolloutRequest request)Gets details of a single project-scoped 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
GetRolloutRequest request =
GetRolloutRequest.newBuilder()
.setProject("project-309310695")
.setRollout("rollout1377108401")
.build();
Rollout response = rolloutsClient.get(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetRolloutRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Rollout |
|
get(String project, String rollout)
public final Rollout get(String project, String rollout)Gets details of a single project-scoped 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
String project = "project-309310695";
String rollout = "rollout1377108401";
Rollout response = rolloutsClient.get(project, rollout);
}
| Parameters | |
|---|---|
| Name | Description |
project |
StringProject ID for this request. |
rollout |
StringName of the persistent rollout to return. |
| Returns | |
|---|---|
| Type | Description |
Rollout |
|
getCallable()
public final UnaryCallable<GetRolloutRequest,Rollout> getCallable()Gets details of a single project-scoped 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
GetRolloutRequest request =
GetRolloutRequest.newBuilder()
.setProject("project-309310695")
.setRollout("rollout1377108401")
.build();
ApiFuture<Rollout> future = rolloutsClient.getCallable().futureCall(request);
// Do something.
Rollout response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetRolloutRequest,Rollout> |
|
getSettings()
public final @Nullable RolloutsSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.cloud.compute.v1.RolloutsSettings |
|
getStub()
public RolloutsStub getStub()| Returns | |
|---|---|
| Type | Description |
RolloutsStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
list(ListRolloutsRequest request)
public final RolloutsClient.ListPagedResponse list(ListRolloutsRequest request)Lists Rollouts 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
ListRolloutsRequest request =
ListRolloutsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
for (Rollout element : rolloutsClient.list(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListRolloutsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
RolloutsClient.ListPagedResponse |
|
list(String project)
public final RolloutsClient.ListPagedResponse list(String project)Lists Rollouts 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
String project = "project-309310695";
for (Rollout element : rolloutsClient.list(project).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
project |
StringProject ID for this request. |
| Returns | |
|---|---|
| Type | Description |
RolloutsClient.ListPagedResponse |
|
listCallable()
public final UnaryCallable<ListRolloutsRequest,RolloutsListResponse> listCallable()Lists Rollouts 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
ListRolloutsRequest request =
ListRolloutsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
while (true) {
RolloutsListResponse response = rolloutsClient.listCallable().call(request);
for (Rollout element : response.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListRolloutsRequest,RolloutsListResponse> |
|
listPagedCallable()
public final UnaryCallable<ListRolloutsRequest,RolloutsClient.ListPagedResponse> listPagedCallable()Lists Rollouts 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
ListRolloutsRequest request =
ListRolloutsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
ApiFuture<Rollout> future = rolloutsClient.listPagedCallable().futureCall(request);
// Do something.
for (Rollout element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListRolloutsRequest,ListPagedResponse> |
|
pauseAsync(PauseRolloutRequest request)
public final OperationFuture<Operation,Operation> pauseAsync(PauseRolloutRequest request)Pauses 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
PauseRolloutRequest request =
PauseRolloutRequest.newBuilder()
.setEtag("etag3123477")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
Operation response = rolloutsClient.pauseAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
PauseRolloutRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
pauseAsync(String project, String rollout)
public final OperationFuture<Operation,Operation> pauseAsync(String project, String rollout)Pauses 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
String project = "project-309310695";
String rollout = "rollout1377108401";
Operation response = rolloutsClient.pauseAsync(project, rollout).get();
}
| Parameters | |
|---|---|
| Name | Description |
project |
StringRequired. Project ID for this request. |
rollout |
StringRequired. Name of the Rollout resource to pause. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
pauseCallable()
public final UnaryCallable<PauseRolloutRequest,Operation> pauseCallable()Pauses 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
PauseRolloutRequest request =
PauseRolloutRequest.newBuilder()
.setEtag("etag3123477")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
ApiFuture<Operation> future = rolloutsClient.pauseCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<PauseRolloutRequest,Operation> |
|
pauseOperationCallable()
public final OperationCallable<PauseRolloutRequest,Operation,Operation> pauseOperationCallable()Pauses 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
PauseRolloutRequest request =
PauseRolloutRequest.newBuilder()
.setEtag("etag3123477")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
OperationFuture<Operation, Operation> future =
rolloutsClient.pauseOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<PauseRolloutRequest,Operation,Operation> |
|
resumeAsync(ResumeRolloutRequest request)
public final OperationFuture<Operation,Operation> resumeAsync(ResumeRolloutRequest request)Resumes 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
ResumeRolloutRequest request =
ResumeRolloutRequest.newBuilder()
.setEtag("etag3123477")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
Operation response = rolloutsClient.resumeAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
ResumeRolloutRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
resumeAsync(String project, String rollout)
public final OperationFuture<Operation,Operation> resumeAsync(String project, String rollout)Resumes 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
String project = "project-309310695";
String rollout = "rollout1377108401";
Operation response = rolloutsClient.resumeAsync(project, rollout).get();
}
| Parameters | |
|---|---|
| Name | Description |
project |
StringRequired. Project ID for this request. |
rollout |
StringRequired. Name of the Rollout resource to resume. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Operation,Operation> |
|
resumeCallable()
public final UnaryCallable<ResumeRolloutRequest,Operation> resumeCallable()Resumes 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
ResumeRolloutRequest request =
ResumeRolloutRequest.newBuilder()
.setEtag("etag3123477")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
ApiFuture<Operation> future = rolloutsClient.resumeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ResumeRolloutRequest,Operation> |
|
resumeOperationCallable()
public final OperationCallable<ResumeRolloutRequest,Operation,Operation> resumeOperationCallable()Resumes 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 (RolloutsClient rolloutsClient = RolloutsClient.create()) {
ResumeRolloutRequest request =
ResumeRolloutRequest.newBuilder()
.setEtag("etag3123477")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setRollout("rollout1377108401")
.build();
OperationFuture<Operation, Operation> future =
rolloutsClient.resumeOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<ResumeRolloutRequest,Operation,Operation> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()