|
403 | 403 | * </td>
|
404 | 404 | * </tr>
|
405 | 405 | * <tr>
|
| 406 | + * <td><p> PerformMaintenance</td> |
| 407 | + * <td><p> Perform a manual maintenance on the instance.</td> |
| 408 | + * <td> |
| 409 | + * <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p> |
| 410 | + * <ul> |
| 411 | + * <li><p> performMaintenanceAsync(PerformMaintenanceInstanceRequest request) |
| 412 | + * </ul> |
| 413 | + * <p>Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.</p> |
| 414 | + * <ul> |
| 415 | + * <li><p> performMaintenanceAsync(String project, String zone, String instance) |
| 416 | + * </ul> |
| 417 | + * <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p> |
| 418 | + * <ul> |
| 419 | + * <li><p> performMaintenanceOperationCallable() |
| 420 | + * <li><p> performMaintenanceCallable() |
| 421 | + * </ul> |
| 422 | + * </td> |
| 423 | + * </tr> |
| 424 | + * <tr> |
406 | 425 | * <td><p> RemoveResourcePolicies</td>
|
407 | 426 | * <td><p> Removes resource policies from an instance.</td>
|
408 | 427 | * <td>
|
@@ -3355,6 +3374,140 @@ public final ListReferrersPagedResponse listReferrers(ListReferrersInstancesRequ
|
3355 | 3374 | return stub.listReferrersCallable();
|
3356 | 3375 | }
|
3357 | 3376 |
|
| 3377 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 3378 | + /** |
| 3379 | + * Perform a manual maintenance on the instance. |
| 3380 | + * |
| 3381 | + * <p>Sample code: |
| 3382 | + * |
| 3383 | + * <pre>{@code |
| 3384 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 3385 | + * // It will require modifications to work: |
| 3386 | + * // - It may require correct/in-range values for request initialization. |
| 3387 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 3388 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 3389 | + * try (InstancesClient instancesClient = InstancesClient.create()) { |
| 3390 | + * String project = "project-309310695"; |
| 3391 | + * String zone = "zone3744684"; |
| 3392 | + * String instance = "instance555127957"; |
| 3393 | + * Operation response = instancesClient.performMaintenanceAsync(project, zone, instance).get(); |
| 3394 | + * } |
| 3395 | + * }</pre> |
| 3396 | + * |
| 3397 | + * @param project Project ID for this request. |
| 3398 | + * @param zone The name of the zone for this request. |
| 3399 | + * @param instance Name of the instance scoping this request. |
| 3400 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 3401 | + */ |
| 3402 | + public final OperationFuture<Operation, Operation> performMaintenanceAsync( |
| 3403 | + String project, String zone, String instance) { |
| 3404 | + PerformMaintenanceInstanceRequest request = |
| 3405 | + PerformMaintenanceInstanceRequest.newBuilder() |
| 3406 | + .setProject(project) |
| 3407 | + .setZone(zone) |
| 3408 | + .setInstance(instance) |
| 3409 | + .build(); |
| 3410 | + return performMaintenanceAsync(request); |
| 3411 | + } |
| 3412 | + |
| 3413 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 3414 | + /** |
| 3415 | + * Perform a manual maintenance on the instance. |
| 3416 | + * |
| 3417 | + * <p>Sample code: |
| 3418 | + * |
| 3419 | + * <pre>{@code |
| 3420 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 3421 | + * // It will require modifications to work: |
| 3422 | + * // - It may require correct/in-range values for request initialization. |
| 3423 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 3424 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 3425 | + * try (InstancesClient instancesClient = InstancesClient.create()) { |
| 3426 | + * PerformMaintenanceInstanceRequest request = |
| 3427 | + * PerformMaintenanceInstanceRequest.newBuilder() |
| 3428 | + * .setInstance("instance555127957") |
| 3429 | + * .setProject("project-309310695") |
| 3430 | + * .setRequestId("requestId693933066") |
| 3431 | + * .setZone("zone3744684") |
| 3432 | + * .build(); |
| 3433 | + * Operation response = instancesClient.performMaintenanceAsync(request).get(); |
| 3434 | + * } |
| 3435 | + * }</pre> |
| 3436 | + * |
| 3437 | + * @param request The request object containing all of the parameters for the API call. |
| 3438 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 3439 | + */ |
| 3440 | + @BetaApi( |
| 3441 | + "The surface for long-running operations is not stable yet and may change in the future.") |
| 3442 | + public final OperationFuture<Operation, Operation> performMaintenanceAsync( |
| 3443 | + PerformMaintenanceInstanceRequest request) { |
| 3444 | + return performMaintenanceOperationCallable().futureCall(request); |
| 3445 | + } |
| 3446 | + |
| 3447 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 3448 | + /** |
| 3449 | + * Perform a manual maintenance on the instance. |
| 3450 | + * |
| 3451 | + * <p>Sample code: |
| 3452 | + * |
| 3453 | + * <pre>{@code |
| 3454 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 3455 | + * // It will require modifications to work: |
| 3456 | + * // - It may require correct/in-range values for request initialization. |
| 3457 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 3458 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 3459 | + * try (InstancesClient instancesClient = InstancesClient.create()) { |
| 3460 | + * PerformMaintenanceInstanceRequest request = |
| 3461 | + * PerformMaintenanceInstanceRequest.newBuilder() |
| 3462 | + * .setInstance("instance555127957") |
| 3463 | + * .setProject("project-309310695") |
| 3464 | + * .setRequestId("requestId693933066") |
| 3465 | + * .setZone("zone3744684") |
| 3466 | + * .build(); |
| 3467 | + * OperationFuture<Operation, Operation> future = |
| 3468 | + * instancesClient.performMaintenanceOperationCallable().futureCall(request); |
| 3469 | + * // Do something. |
| 3470 | + * Operation response = future.get(); |
| 3471 | + * } |
| 3472 | + * }</pre> |
| 3473 | + */ |
| 3474 | + public final OperationCallable<PerformMaintenanceInstanceRequest, Operation, Operation> |
| 3475 | + performMaintenanceOperationCallable() { |
| 3476 | + return stub.performMaintenanceOperationCallable(); |
| 3477 | + } |
| 3478 | + |
| 3479 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 3480 | + /** |
| 3481 | + * Perform a manual maintenance on the instance. |
| 3482 | + * |
| 3483 | + * <p>Sample code: |
| 3484 | + * |
| 3485 | + * <pre>{@code |
| 3486 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 3487 | + * // It will require modifications to work: |
| 3488 | + * // - It may require correct/in-range values for request initialization. |
| 3489 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 3490 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 3491 | + * try (InstancesClient instancesClient = InstancesClient.create()) { |
| 3492 | + * PerformMaintenanceInstanceRequest request = |
| 3493 | + * PerformMaintenanceInstanceRequest.newBuilder() |
| 3494 | + * .setInstance("instance555127957") |
| 3495 | + * .setProject("project-309310695") |
| 3496 | + * .setRequestId("requestId693933066") |
| 3497 | + * .setZone("zone3744684") |
| 3498 | + * .build(); |
| 3499 | + * ApiFuture<Operation> future = |
| 3500 | + * instancesClient.performMaintenanceCallable().futureCall(request); |
| 3501 | + * // Do something. |
| 3502 | + * Operation response = future.get(); |
| 3503 | + * } |
| 3504 | + * }</pre> |
| 3505 | + */ |
| 3506 | + public final UnaryCallable<PerformMaintenanceInstanceRequest, Operation> |
| 3507 | + performMaintenanceCallable() { |
| 3508 | + return stub.performMaintenanceCallable(); |
| 3509 | + } |
| 3510 | + |
3358 | 3511 | // AUTO-GENERATED DOCUMENTATION AND METHOD.
|
3359 | 3512 | /**
|
3360 | 3513 | * Removes resource policies from an instance.
|
@@ -5970,6 +6123,7 @@ public final OperationFuture<Operation, Operation> simulateMaintenanceEventAsync
|
5970 | 6123 | * .setInstance("instance555127957")
|
5971 | 6124 | * .setProject("project-309310695")
|
5972 | 6125 | * .setRequestId("requestId693933066")
|
| 6126 | + * .setWithExtendedNotifications(true) |
5973 | 6127 | * .setZone("zone3744684")
|
5974 | 6128 | * .build();
|
5975 | 6129 | * Operation response = instancesClient.simulateMaintenanceEventAsync(request).get();
|
@@ -6005,6 +6159,7 @@ public final OperationFuture<Operation, Operation> simulateMaintenanceEventAsync
|
6005 | 6159 | * .setInstance("instance555127957")
|
6006 | 6160 | * .setProject("project-309310695")
|
6007 | 6161 | * .setRequestId("requestId693933066")
|
| 6162 | + * .setWithExtendedNotifications(true) |
6008 | 6163 | * .setZone("zone3744684")
|
6009 | 6164 | * .build();
|
6010 | 6165 | * OperationFuture<Operation, Operation> future =
|
@@ -6038,6 +6193,7 @@ public final OperationFuture<Operation, Operation> simulateMaintenanceEventAsync
|
6038 | 6193 | * .setInstance("instance555127957")
|
6039 | 6194 | * .setProject("project-309310695")
|
6040 | 6195 | * .setRequestId("requestId693933066")
|
| 6196 | + * .setWithExtendedNotifications(true) |
6041 | 6197 | * .setZone("zone3744684")
|
6042 | 6198 | * .build();
|
6043 | 6199 | * ApiFuture<Operation> future =
|
|
0 commit comments