- 1.63.0 (latest)
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
public class RegionInstanceGroupManagersClient implements BackgroundResource
Service Description: The RegionInstanceGroupManagers 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:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
InstanceGroupManager response =
regionInstanceGroupManagersClient.get(project, region, instanceGroupManager);
}
Note: close() needs to be called on the RegionInstanceGroupManagersClient 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 RegionInstanceGroupManagersSettings to create(). For example:
To customize credentials:
RegionInstanceGroupManagersSettings regionInstanceGroupManagersSettings =
RegionInstanceGroupManagersSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create(regionInstanceGroupManagersSettings);
To customize the endpoint:
RegionInstanceGroupManagersSettings regionInstanceGroupManagersSettings =
RegionInstanceGroupManagersSettings.newBuilder().setEndpoint(myEndpoint).build();
RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create(regionInstanceGroupManagersSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final RegionInstanceGroupManagersClient create()
Constructs an instance of RegionInstanceGroupManagersClient with default settings.
Type | Description |
RegionInstanceGroupManagersClient |
Type | Description |
IOException |
create(RegionInstanceGroupManagersSettings settings)
public static final RegionInstanceGroupManagersClient create(RegionInstanceGroupManagersSettings settings)
Constructs an instance of RegionInstanceGroupManagersClient, 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 | RegionInstanceGroupManagersSettings |
Type | Description |
RegionInstanceGroupManagersClient |
Type | Description |
IOException |
create(RegionInstanceGroupManagersStub stub)
public static final RegionInstanceGroupManagersClient create(RegionInstanceGroupManagersStub stub)
Constructs an instance of RegionInstanceGroupManagersClient, using the given stub for making calls. This is for advanced usage - prefer using create(RegionInstanceGroupManagersSettings).
Name | Description |
stub | RegionInstanceGroupManagersStub |
Type | Description |
RegionInstanceGroupManagersClient |
Constructors
RegionInstanceGroupManagersClient(RegionInstanceGroupManagersSettings settings)
protected RegionInstanceGroupManagersClient(RegionInstanceGroupManagersSettings settings)
Constructs an instance of RegionInstanceGroupManagersClient, 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 | RegionInstanceGroupManagersSettings |
RegionInstanceGroupManagersClient(RegionInstanceGroupManagersStub stub)
protected RegionInstanceGroupManagersClient(RegionInstanceGroupManagersStub stub)
Name | Description |
stub | RegionInstanceGroupManagersStub |
Methods
abandonInstancesAsync(AbandonInstancesRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> abandonInstancesAsync(AbandonInstancesRegionInstanceGroupManagerRequest request)
Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
AbandonInstancesRegionInstanceGroupManagerRequest request =
AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersAbandonInstancesRequestResource(
RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Operation response = regionInstanceGroupManagersClient.abandonInstancesAsync(request).get();
}
Name | Description |
request | AbandonInstancesRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
abandonInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersAbandonInstancesRequest regionInstanceGroupManagersAbandonInstancesRequestResource)
public final OperationFuture<Operation,Operation> abandonInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersAbandonInstancesRequest regionInstanceGroupManagersAbandonInstancesRequestResource)
Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagersAbandonInstancesRequest
regionInstanceGroupManagersAbandonInstancesRequestResource =
RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.abandonInstancesAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagersAbandonInstancesRequestResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String Name of the managed instance group. |
regionInstanceGroupManagersAbandonInstancesRequestResource | RegionInstanceGroupManagersAbandonInstancesRequest The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
abandonInstancesCallable()
public final UnaryCallable<AbandonInstancesRegionInstanceGroupManagerRequest,Operation> abandonInstancesCallable()
Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
AbandonInstancesRegionInstanceGroupManagerRequest request =
AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersAbandonInstancesRequestResource(
RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.abandonInstancesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<AbandonInstancesRegionInstanceGroupManagerRequest,Operation> |
abandonInstancesOperationCallable()
public final OperationCallable<AbandonInstancesRegionInstanceGroupManagerRequest,Operation,Operation> abandonInstancesOperationCallable()
Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
AbandonInstancesRegionInstanceGroupManagerRequest request =
AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersAbandonInstancesRequestResource(
RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<AbandonInstancesRegionInstanceGroupManagerRequest,Operation,Operation> |
applyUpdatesToInstancesAsync(ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> applyUpdatesToInstancesAsync(ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request)
Apply updates to selected instances the managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request =
ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersApplyUpdatesRequestResource(
RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build())
.build();
Operation response =
regionInstanceGroupManagersClient.applyUpdatesToInstancesAsync(request).get();
}
Name | Description |
request | ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
applyUpdatesToInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersApplyUpdatesRequest regionInstanceGroupManagersApplyUpdatesRequestResource)
public final OperationFuture<Operation,Operation> applyUpdatesToInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersApplyUpdatesRequest regionInstanceGroupManagersApplyUpdatesRequestResource)
Apply updates to selected instances the managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagersApplyUpdatesRequest
regionInstanceGroupManagersApplyUpdatesRequestResource =
RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.applyUpdatesToInstancesAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagersApplyUpdatesRequestResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request, should conform to RFC1035. |
instanceGroupManager | String The name of the managed instance group, should conform to RFC1035. |
regionInstanceGroupManagersApplyUpdatesRequestResource | RegionInstanceGroupManagersApplyUpdatesRequest The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
applyUpdatesToInstancesCallable()
public final UnaryCallable<ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest,Operation> applyUpdatesToInstancesCallable()
Apply updates to selected instances the managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request =
ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersApplyUpdatesRequestResource(
RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build())
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.applyUpdatesToInstancesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest,Operation> |
applyUpdatesToInstancesOperationCallable()
public final OperationCallable<ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest,Operation,Operation> applyUpdatesToInstancesOperationCallable()
Apply updates to selected instances the managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request =
ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersApplyUpdatesRequestResource(
RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build())
.build();
OperationFuture
Type | Description |
OperationCallable<ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest,Operation,Operation> |
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()
createInstancesAsync(CreateInstancesRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> createInstancesAsync(CreateInstancesRegionInstanceGroupManagerRequest request)
Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
CreateInstancesRegionInstanceGroupManagerRequest request =
CreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersCreateInstancesRequestResource(
RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Operation response = regionInstanceGroupManagersClient.createInstancesAsync(request).get();
}
Name | Description |
request | CreateInstancesRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
createInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersCreateInstancesRequest regionInstanceGroupManagersCreateInstancesRequestResource)
public final OperationFuture<Operation,Operation> createInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersCreateInstancesRequest regionInstanceGroupManagersCreateInstancesRequestResource)
Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagersCreateInstancesRequest
regionInstanceGroupManagersCreateInstancesRequestResource =
RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.createInstancesAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagersCreateInstancesRequestResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String The name of the region where the managed instance group is located. It should conform to RFC1035. |
instanceGroupManager | String The name of the managed instance group. It should conform to RFC1035. |
regionInstanceGroupManagersCreateInstancesRequestResource | RegionInstanceGroupManagersCreateInstancesRequest The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
createInstancesCallable()
public final UnaryCallable<CreateInstancesRegionInstanceGroupManagerRequest,Operation> createInstancesCallable()
Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
CreateInstancesRegionInstanceGroupManagerRequest request =
CreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersCreateInstancesRequestResource(
RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.createInstancesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateInstancesRegionInstanceGroupManagerRequest,Operation> |
createInstancesOperationCallable()
public final OperationCallable<CreateInstancesRegionInstanceGroupManagerRequest,Operation,Operation> createInstancesOperationCallable()
Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
CreateInstancesRegionInstanceGroupManagerRequest request =
CreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersCreateInstancesRequestResource(
RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<CreateInstancesRegionInstanceGroupManagerRequest,Operation,Operation> |
deleteAsync(DeleteRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> deleteAsync(DeleteRegionInstanceGroupManagerRequest request)
Deletes the specified managed instance group and all of the instances in that group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeleteRegionInstanceGroupManagerRequest request =
DeleteRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
Operation response = regionInstanceGroupManagersClient.deleteAsync(request).get();
}
Name | Description |
request | DeleteRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
deleteAsync(String project, String region, String instanceGroupManager)
public final OperationFuture<Operation,Operation> deleteAsync(String project, String region, String instanceGroupManager)
Deletes the specified managed instance group and all of the instances in that group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
Operation response =
regionInstanceGroupManagersClient
.deleteAsync(project, region, instanceGroupManager)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String Name of the managed instance group to delete. |
Type | Description |
OperationFuture<Operation,Operation> |
deleteCallable()
public final UnaryCallable<DeleteRegionInstanceGroupManagerRequest,Operation> deleteCallable()
Deletes the specified managed instance group and all of the instances in that group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeleteRegionInstanceGroupManagerRequest request =
DeleteRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.deleteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeleteRegionInstanceGroupManagerRequest,Operation> |
deleteInstancesAsync(DeleteInstancesRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> deleteInstancesAsync(DeleteInstancesRegionInstanceGroupManagerRequest request)
Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeleteInstancesRegionInstanceGroupManagerRequest request =
DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersDeleteInstancesRequestResource(
RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Operation response = regionInstanceGroupManagersClient.deleteInstancesAsync(request).get();
}
Name | Description |
request | DeleteInstancesRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
deleteInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersDeleteInstancesRequest regionInstanceGroupManagersDeleteInstancesRequestResource)
public final OperationFuture<Operation,Operation> deleteInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersDeleteInstancesRequest regionInstanceGroupManagersDeleteInstancesRequestResource)
Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagersDeleteInstancesRequest
regionInstanceGroupManagersDeleteInstancesRequestResource =
RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.deleteInstancesAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagersDeleteInstancesRequestResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String Name of the managed instance group. |
regionInstanceGroupManagersDeleteInstancesRequestResource | RegionInstanceGroupManagersDeleteInstancesRequest The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
deleteInstancesCallable()
public final UnaryCallable<DeleteInstancesRegionInstanceGroupManagerRequest,Operation> deleteInstancesCallable()
Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeleteInstancesRegionInstanceGroupManagerRequest request =
DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersDeleteInstancesRequestResource(
RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.deleteInstancesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeleteInstancesRegionInstanceGroupManagerRequest,Operation> |
deleteInstancesOperationCallable()
public final OperationCallable<DeleteInstancesRegionInstanceGroupManagerRequest,Operation,Operation> deleteInstancesOperationCallable()
Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeleteInstancesRegionInstanceGroupManagerRequest request =
DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersDeleteInstancesRequestResource(
RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<DeleteInstancesRegionInstanceGroupManagerRequest,Operation,Operation> |
deleteOperationCallable()
public final OperationCallable<DeleteRegionInstanceGroupManagerRequest,Operation,Operation> deleteOperationCallable()
Deletes the specified managed instance group and all of the instances in that group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeleteRegionInstanceGroupManagerRequest request =
DeleteRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<DeleteRegionInstanceGroupManagerRequest,Operation,Operation> |
deletePerInstanceConfigsAsync(DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> deletePerInstanceConfigsAsync(DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request)
Deletes selected per-instance configs for the managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request =
DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerDeleteInstanceConfigReqResource(
RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build())
.build();
Operation response =
regionInstanceGroupManagersClient.deletePerInstanceConfigsAsync(request).get();
}
Name | Description |
request | DeletePerInstanceConfigsRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
deletePerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerDeleteInstanceConfigReq regionInstanceGroupManagerDeleteInstanceConfigReqResource)
public final OperationFuture<Operation,Operation> deletePerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerDeleteInstanceConfigReq regionInstanceGroupManagerDeleteInstanceConfigReqResource)
Deletes selected per-instance configs for the managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagerDeleteInstanceConfigReq
regionInstanceGroupManagerDeleteInstanceConfigReqResource =
RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.deletePerInstanceConfigsAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagerDeleteInstanceConfigReqResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request, should conform to RFC1035. |
instanceGroupManager | String The name of the managed instance group. It should conform to RFC1035. |
regionInstanceGroupManagerDeleteInstanceConfigReqResource | RegionInstanceGroupManagerDeleteInstanceConfigReq The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
deletePerInstanceConfigsCallable()
public final UnaryCallable<DeletePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> deletePerInstanceConfigsCallable()
Deletes selected per-instance configs for the managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request =
DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerDeleteInstanceConfigReqResource(
RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build())
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.deletePerInstanceConfigsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeletePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> |
deletePerInstanceConfigsOperationCallable()
public final OperationCallable<DeletePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> deletePerInstanceConfigsOperationCallable()
Deletes selected per-instance configs for the managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request =
DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerDeleteInstanceConfigReqResource(
RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build())
.build();
OperationFuture
Type | Description |
OperationCallable<DeletePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> |
get(GetRegionInstanceGroupManagerRequest request)
public final InstanceGroupManager get(GetRegionInstanceGroupManagerRequest request)
Returns all of the details about the specified managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
GetRegionInstanceGroupManagerRequest request =
GetRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.build();
InstanceGroupManager response = regionInstanceGroupManagersClient.get(request);
}
Name | Description |
request | GetRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
InstanceGroupManager |
get(String project, String region, String instanceGroupManager)
public final InstanceGroupManager get(String project, String region, String instanceGroupManager)
Returns all of the details about the specified managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
InstanceGroupManager response =
regionInstanceGroupManagersClient.get(project, region, instanceGroupManager);
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String Name of the managed instance group to return. |
Type | Description |
InstanceGroupManager |
getCallable()
public final UnaryCallable<GetRegionInstanceGroupManagerRequest,InstanceGroupManager> getCallable()
Returns all of the details about the specified managed instance group.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
GetRegionInstanceGroupManagerRequest request =
GetRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.build();
ApiFuture
Type | Description |
UnaryCallable<GetRegionInstanceGroupManagerRequest,InstanceGroupManager> |
getSettings()
public final RegionInstanceGroupManagersSettings getSettings()
Type | Description |
RegionInstanceGroupManagersSettings |
getStub()
public RegionInstanceGroupManagersStub getStub()
Type | Description |
RegionInstanceGroupManagersStub |
insertAsync(InsertRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> insertAsync(InsertRegionInstanceGroupManagerRequest request)
Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
InsertRegionInstanceGroupManagerRequest request =
InsertRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
Operation response = regionInstanceGroupManagersClient.insertAsync(request).get();
}
Name | Description |
request | InsertRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
insertAsync(String project, String region, InstanceGroupManager instanceGroupManagerResource)
public final OperationFuture<Operation,Operation> insertAsync(String project, String region, InstanceGroupManager instanceGroupManagerResource)
Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.insertAsync(project, region, instanceGroupManagerResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManagerResource | InstanceGroupManager The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
insertCallable()
public final UnaryCallable<InsertRegionInstanceGroupManagerRequest,Operation> insertCallable()
Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
InsertRegionInstanceGroupManagerRequest request =
InsertRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.insertCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<InsertRegionInstanceGroupManagerRequest,Operation> |
insertOperationCallable()
public final OperationCallable<InsertRegionInstanceGroupManagerRequest,Operation,Operation> insertOperationCallable()
Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
InsertRegionInstanceGroupManagerRequest request =
InsertRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<InsertRegionInstanceGroupManagerRequest,Operation,Operation> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
list(ListRegionInstanceGroupManagersRequest request)
public final RegionInstanceGroupManagersClient.ListPagedResponse list(ListRegionInstanceGroupManagersRequest request)
Retrieves the list of managed instance groups that are contained within the specified region.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListRegionInstanceGroupManagersRequest request =
ListRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
for (InstanceGroupManager element :
regionInstanceGroupManagersClient.list(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListRegionInstanceGroupManagersRequest The request object containing all of the parameters for the API call. |
Type | Description |
RegionInstanceGroupManagersClient.ListPagedResponse |
list(String project, String region)
public final RegionInstanceGroupManagersClient.ListPagedResponse list(String project, String region)
Retrieves the list of managed instance groups that are contained within the specified region.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
for (InstanceGroupManager element :
regionInstanceGroupManagersClient.list(project, region).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
Type | Description |
RegionInstanceGroupManagersClient.ListPagedResponse |
listCallable()
public final UnaryCallable<ListRegionInstanceGroupManagersRequest,RegionInstanceGroupManagerList> listCallable()
Retrieves the list of managed instance groups that are contained within the specified region.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListRegionInstanceGroupManagersRequest request =
ListRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
while (true) {
RegionInstanceGroupManagerList response =
regionInstanceGroupManagersClient.listCallable().call(request);
for (InstanceGroupManager element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListRegionInstanceGroupManagersRequest,RegionInstanceGroupManagerList> |
listErrors(ListErrorsRegionInstanceGroupManagersRequest request)
public final RegionInstanceGroupManagersClient.ListErrorsPagedResponse listErrors(ListErrorsRegionInstanceGroupManagersRequest request)
Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListErrorsRegionInstanceGroupManagersRequest request =
ListErrorsRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
for (InstanceManagedByIgmError element :
regionInstanceGroupManagersClient.listErrors(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListErrorsRegionInstanceGroupManagersRequest The request object containing all of the parameters for the API call. |
Type | Description |
RegionInstanceGroupManagersClient.ListErrorsPagedResponse |
listErrors(String project, String region, String instanceGroupManager)
public final RegionInstanceGroupManagersClient.ListErrorsPagedResponse listErrors(String project, String region, String instanceGroupManager)
Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
for (InstanceManagedByIgmError element :
regionInstanceGroupManagersClient
.listErrors(project, region, instanceGroupManager)
.iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. This should conform to RFC1035. |
instanceGroupManager | String The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:a-z?)|1-9{0,19}. |
Type | Description |
RegionInstanceGroupManagersClient.ListErrorsPagedResponse |
listErrorsCallable()
public final UnaryCallable<ListErrorsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListErrorsResponse> listErrorsCallable()
Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListErrorsRegionInstanceGroupManagersRequest request =
ListErrorsRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
while (true) {
RegionInstanceGroupManagersListErrorsResponse response =
regionInstanceGroupManagersClient.listErrorsCallable().call(request);
for (InstanceManagedByIgmError element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListErrorsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListErrorsResponse> |
listErrorsPagedCallable()
public final UnaryCallable<ListErrorsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersClient.ListErrorsPagedResponse> listErrorsPagedCallable()
Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListErrorsRegionInstanceGroupManagersRequest request =
ListErrorsRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
ApiFuture
Type | Description |
UnaryCallable<ListErrorsRegionInstanceGroupManagersRequest,ListErrorsPagedResponse> |
listManagedInstances(ListManagedInstancesRegionInstanceGroupManagersRequest request)
public final RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse listManagedInstances(ListManagedInstancesRegionInstanceGroupManagersRequest request)
Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListManagedInstancesRegionInstanceGroupManagersRequest request =
ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
for (ManagedInstance element :
regionInstanceGroupManagersClient.listManagedInstances(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListManagedInstancesRegionInstanceGroupManagersRequest The request object containing all of the parameters for the API call. |
Type | Description |
RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse |
listManagedInstances(String project, String region, String instanceGroupManager)
public final RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse listManagedInstances(String project, String region, String instanceGroupManager)
Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
for (ManagedInstance element :
regionInstanceGroupManagersClient
.listManagedInstances(project, region, instanceGroupManager)
.iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String The name of the managed instance group. |
Type | Description |
RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse |
listManagedInstancesCallable()
public final UnaryCallable<ListManagedInstancesRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListInstancesResponse> listManagedInstancesCallable()
Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListManagedInstancesRegionInstanceGroupManagersRequest request =
ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
while (true) {
RegionInstanceGroupManagersListInstancesResponse response =
regionInstanceGroupManagersClient.listManagedInstancesCallable().call(request);
for (ManagedInstance element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListManagedInstancesRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListInstancesResponse> |
listManagedInstancesPagedCallable()
public final UnaryCallable<ListManagedInstancesRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse> listManagedInstancesPagedCallable()
Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListManagedInstancesRegionInstanceGroupManagersRequest request =
ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
ApiFuture
Type | Description |
UnaryCallable<ListManagedInstancesRegionInstanceGroupManagersRequest,ListManagedInstancesPagedResponse> |
listPagedCallable()
public final UnaryCallable<ListRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersClient.ListPagedResponse> listPagedCallable()
Retrieves the list of managed instance groups that are contained within the specified region.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListRegionInstanceGroupManagersRequest request =
ListRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
ApiFuture
Type | Description |
UnaryCallable<ListRegionInstanceGroupManagersRequest,ListPagedResponse> |
listPerInstanceConfigs(ListPerInstanceConfigsRegionInstanceGroupManagersRequest request)
public final RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse listPerInstanceConfigs(ListPerInstanceConfigsRegionInstanceGroupManagersRequest request)
Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListPerInstanceConfigsRegionInstanceGroupManagersRequest request =
ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
for (PerInstanceConfig element :
regionInstanceGroupManagersClient.listPerInstanceConfigs(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListPerInstanceConfigsRegionInstanceGroupManagersRequest The request object containing all of the parameters for the API call. |
Type | Description |
RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse |
listPerInstanceConfigs(String project, String region, String instanceGroupManager)
public final RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse listPerInstanceConfigs(String project, String region, String instanceGroupManager)
Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
for (PerInstanceConfig element :
regionInstanceGroupManagersClient
.listPerInstanceConfigs(project, region, instanceGroupManager)
.iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request, should conform to RFC1035. |
instanceGroupManager | String The name of the managed instance group. It should conform to RFC1035. |
Type | Description |
RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse |
listPerInstanceConfigsCallable()
public final UnaryCallable<ListPerInstanceConfigsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListInstanceConfigsResp> listPerInstanceConfigsCallable()
Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListPerInstanceConfigsRegionInstanceGroupManagersRequest request =
ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
while (true) {
RegionInstanceGroupManagersListInstanceConfigsResp response =
regionInstanceGroupManagersClient.listPerInstanceConfigsCallable().call(request);
for (PerInstanceConfig element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListPerInstanceConfigsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListInstanceConfigsResp> |
listPerInstanceConfigsPagedCallable()
public final UnaryCallable<ListPerInstanceConfigsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse> listPerInstanceConfigsPagedCallable()
Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ListPerInstanceConfigsRegionInstanceGroupManagersRequest request =
ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder()
.setFilter("filter-1274492040")
.setInstanceGroupManager("instanceGroupManager-388242077")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
ApiFuture
Type | Description |
UnaryCallable<ListPerInstanceConfigsRegionInstanceGroupManagersRequest,ListPerInstanceConfigsPagedResponse> |
patchAsync(PatchRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> patchAsync(PatchRegionInstanceGroupManagerRequest request)
Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
PatchRegionInstanceGroupManagerRequest request =
PatchRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
Operation response = regionInstanceGroupManagersClient.patchAsync(request).get();
}
Name | Description |
request | PatchRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
patchAsync(String project, String region, String instanceGroupManager, InstanceGroupManager instanceGroupManagerResource)
public final OperationFuture<Operation,Operation> patchAsync(String project, String region, String instanceGroupManager, InstanceGroupManager instanceGroupManagerResource)
Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.patchAsync(project, region, instanceGroupManager, instanceGroupManagerResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String The name of the instance group manager. |
instanceGroupManagerResource | InstanceGroupManager The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
patchCallable()
public final UnaryCallable<PatchRegionInstanceGroupManagerRequest,Operation> patchCallable()
Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
PatchRegionInstanceGroupManagerRequest request =
PatchRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.patchCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<PatchRegionInstanceGroupManagerRequest,Operation> |
patchOperationCallable()
public final OperationCallable<PatchRegionInstanceGroupManagerRequest,Operation,Operation> patchOperationCallable()
Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
PatchRegionInstanceGroupManagerRequest request =
PatchRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<PatchRegionInstanceGroupManagerRequest,Operation,Operation> |
patchPerInstanceConfigsAsync(PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> patchPerInstanceConfigsAsync(PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request)
Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request =
PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerPatchInstanceConfigReqResource(
RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Operation response =
regionInstanceGroupManagersClient.patchPerInstanceConfigsAsync(request).get();
}
Name | Description |
request | PatchPerInstanceConfigsRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
patchPerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerPatchInstanceConfigReq regionInstanceGroupManagerPatchInstanceConfigReqResource)
public final OperationFuture<Operation,Operation> patchPerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerPatchInstanceConfigReq regionInstanceGroupManagerPatchInstanceConfigReqResource)
Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagerPatchInstanceConfigReq
regionInstanceGroupManagerPatchInstanceConfigReqResource =
RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.patchPerInstanceConfigsAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagerPatchInstanceConfigReqResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request, should conform to RFC1035. |
instanceGroupManager | String The name of the managed instance group. It should conform to RFC1035. |
regionInstanceGroupManagerPatchInstanceConfigReqResource | RegionInstanceGroupManagerPatchInstanceConfigReq The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
patchPerInstanceConfigsCallable()
public final UnaryCallable<PatchPerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> patchPerInstanceConfigsCallable()
Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request =
PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerPatchInstanceConfigReqResource(
RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.patchPerInstanceConfigsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<PatchPerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> |
patchPerInstanceConfigsOperationCallable()
public final OperationCallable<PatchPerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> patchPerInstanceConfigsOperationCallable()
Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request =
PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerPatchInstanceConfigReqResource(
RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<PatchPerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> |
recreateInstancesAsync(RecreateInstancesRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> recreateInstancesAsync(RecreateInstancesRegionInstanceGroupManagerRequest request)
Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
RecreateInstancesRegionInstanceGroupManagerRequest request =
RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersRecreateRequestResource(
RegionInstanceGroupManagersRecreateRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Operation response = regionInstanceGroupManagersClient.recreateInstancesAsync(request).get();
}
Name | Description |
request | RecreateInstancesRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
recreateInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersRecreateRequest regionInstanceGroupManagersRecreateRequestResource)
public final OperationFuture<Operation,Operation> recreateInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersRecreateRequest regionInstanceGroupManagersRecreateRequestResource)
Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagersRecreateRequest
regionInstanceGroupManagersRecreateRequestResource =
RegionInstanceGroupManagersRecreateRequest.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.recreateInstancesAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagersRecreateRequestResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String Name of the managed instance group. |
regionInstanceGroupManagersRecreateRequestResource | RegionInstanceGroupManagersRecreateRequest The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
recreateInstancesCallable()
public final UnaryCallable<RecreateInstancesRegionInstanceGroupManagerRequest,Operation> recreateInstancesCallable()
Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
RecreateInstancesRegionInstanceGroupManagerRequest request =
RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersRecreateRequestResource(
RegionInstanceGroupManagersRecreateRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.recreateInstancesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<RecreateInstancesRegionInstanceGroupManagerRequest,Operation> |
recreateInstancesOperationCallable()
public final OperationCallable<RecreateInstancesRegionInstanceGroupManagerRequest,Operation,Operation> recreateInstancesOperationCallable()
Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
RecreateInstancesRegionInstanceGroupManagerRequest request =
RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersRecreateRequestResource(
RegionInstanceGroupManagersRecreateRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<RecreateInstancesRegionInstanceGroupManagerRequest,Operation,Operation> |
resizeAsync(ResizeRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> resizeAsync(ResizeRegionInstanceGroupManagerRequest request)
Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ResizeRegionInstanceGroupManagerRequest request =
ResizeRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setSize(3530753)
.build();
Operation response = regionInstanceGroupManagersClient.resizeAsync(request).get();
}
Name | Description |
request | ResizeRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
resizeAsync(String project, String region, String instanceGroupManager, int size)
public final OperationFuture<Operation,Operation> resizeAsync(String project, String region, String instanceGroupManager, int size)
Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
int size = 3530753;
Operation response =
regionInstanceGroupManagersClient
.resizeAsync(project, region, instanceGroupManager, size)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String Name of the managed instance group. |
size | int Number of instances that should exist in this instance group manager. |
Type | Description |
OperationFuture<Operation,Operation> |
resizeCallable()
public final UnaryCallable<ResizeRegionInstanceGroupManagerRequest,Operation> resizeCallable()
Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ResizeRegionInstanceGroupManagerRequest request =
ResizeRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setSize(3530753)
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.resizeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<ResizeRegionInstanceGroupManagerRequest,Operation> |
resizeOperationCallable()
public final OperationCallable<ResizeRegionInstanceGroupManagerRequest,Operation,Operation> resizeOperationCallable()
Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
ResizeRegionInstanceGroupManagerRequest request =
ResizeRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setSize(3530753)
.build();
OperationFuture
Type | Description |
OperationCallable<ResizeRegionInstanceGroupManagerRequest,Operation,Operation> |
setInstanceTemplateAsync(SetInstanceTemplateRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> setInstanceTemplateAsync(SetInstanceTemplateRegionInstanceGroupManagerRequest request)
Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
SetInstanceTemplateRegionInstanceGroupManagerRequest request =
SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersSetTemplateRequestResource(
RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Operation response =
regionInstanceGroupManagersClient.setInstanceTemplateAsync(request).get();
}
Name | Description |
request | SetInstanceTemplateRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
setInstanceTemplateAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersSetTemplateRequest regionInstanceGroupManagersSetTemplateRequestResource)
public final OperationFuture<Operation,Operation> setInstanceTemplateAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersSetTemplateRequest regionInstanceGroupManagersSetTemplateRequestResource)
Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagersSetTemplateRequest
regionInstanceGroupManagersSetTemplateRequestResource =
RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.setInstanceTemplateAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagersSetTemplateRequestResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String The name of the managed instance group. |
regionInstanceGroupManagersSetTemplateRequestResource | RegionInstanceGroupManagersSetTemplateRequest The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
setInstanceTemplateCallable()
public final UnaryCallable<SetInstanceTemplateRegionInstanceGroupManagerRequest,Operation> setInstanceTemplateCallable()
Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
SetInstanceTemplateRegionInstanceGroupManagerRequest request =
SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersSetTemplateRequestResource(
RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.setInstanceTemplateCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<SetInstanceTemplateRegionInstanceGroupManagerRequest,Operation> |
setInstanceTemplateOperationCallable()
public final OperationCallable<SetInstanceTemplateRegionInstanceGroupManagerRequest,Operation,Operation> setInstanceTemplateOperationCallable()
Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
SetInstanceTemplateRegionInstanceGroupManagerRequest request =
SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersSetTemplateRequestResource(
RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<SetInstanceTemplateRegionInstanceGroupManagerRequest,Operation,Operation> |
setTargetPoolsAsync(SetTargetPoolsRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> setTargetPoolsAsync(SetTargetPoolsRegionInstanceGroupManagerRequest request)
Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
SetTargetPoolsRegionInstanceGroupManagerRequest request =
SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersSetTargetPoolsRequestResource(
RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Operation response = regionInstanceGroupManagersClient.setTargetPoolsAsync(request).get();
}
Name | Description |
request | SetTargetPoolsRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
setTargetPoolsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersSetTargetPoolsRequest regionInstanceGroupManagersSetTargetPoolsRequestResource)
public final OperationFuture<Operation,Operation> setTargetPoolsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersSetTargetPoolsRequest regionInstanceGroupManagersSetTargetPoolsRequestResource)
Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagersSetTargetPoolsRequest
regionInstanceGroupManagersSetTargetPoolsRequestResource =
RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.setTargetPoolsAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagersSetTargetPoolsRequestResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request. |
instanceGroupManager | String Name of the managed instance group. |
regionInstanceGroupManagersSetTargetPoolsRequestResource | RegionInstanceGroupManagersSetTargetPoolsRequest The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
setTargetPoolsCallable()
public final UnaryCallable<SetTargetPoolsRegionInstanceGroupManagerRequest,Operation> setTargetPoolsCallable()
Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
SetTargetPoolsRegionInstanceGroupManagerRequest request =
SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersSetTargetPoolsRequestResource(
RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.setTargetPoolsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<SetTargetPoolsRegionInstanceGroupManagerRequest,Operation> |
setTargetPoolsOperationCallable()
public final OperationCallable<SetTargetPoolsRegionInstanceGroupManagerRequest,Operation,Operation> setTargetPoolsOperationCallable()
Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
SetTargetPoolsRegionInstanceGroupManagerRequest request =
SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagersSetTargetPoolsRequestResource(
RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<SetTargetPoolsRegionInstanceGroupManagerRequest,Operation,Operation> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updatePerInstanceConfigsAsync(UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request)
public final OperationFuture<Operation,Operation> updatePerInstanceConfigsAsync(UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request)
Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request =
UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerUpdateInstanceConfigReqResource(
RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Operation response =
regionInstanceGroupManagersClient.updatePerInstanceConfigsAsync(request).get();
}
Name | Description |
request | UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
updatePerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerUpdateInstanceConfigReq regionInstanceGroupManagerUpdateInstanceConfigReqResource)
public final OperationFuture<Operation,Operation> updatePerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerUpdateInstanceConfigReq regionInstanceGroupManagerUpdateInstanceConfigReqResource)
Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String instanceGroupManager = "instanceGroupManager-388242077";
RegionInstanceGroupManagerUpdateInstanceConfigReq
regionInstanceGroupManagerUpdateInstanceConfigReqResource =
RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build();
Operation response =
regionInstanceGroupManagersClient
.updatePerInstanceConfigsAsync(
project,
region,
instanceGroupManager,
regionInstanceGroupManagerUpdateInstanceConfigReqResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
region | String Name of the region scoping this request, should conform to RFC1035. |
instanceGroupManager | String The name of the managed instance group. It should conform to RFC1035. |
regionInstanceGroupManagerUpdateInstanceConfigReqResource | RegionInstanceGroupManagerUpdateInstanceConfigReq The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
updatePerInstanceConfigsCallable()
public final UnaryCallable<UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> updatePerInstanceConfigsCallable()
Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request =
UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerUpdateInstanceConfigReqResource(
RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
regionInstanceGroupManagersClient.updatePerInstanceConfigsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> |
updatePerInstanceConfigsOperationCallable()
public final OperationCallable<UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> updatePerInstanceConfigsOperationCallable()
Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
Sample code:
try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
RegionInstanceGroupManagersClient.create()) {
UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request =
UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
.setInstanceGroupManager("instanceGroupManager-388242077")
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionInstanceGroupManagerUpdateInstanceConfigReqResource(
RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> |