- 0.53.0 (latest)
- 0.52.0
- 0.51.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.8
- 0.2.1
- 0.1.1
public class BareMetalSolutionClient implements BackgroundResource
Service Description: Performs management operations on Bare Metal Solution servers.
The baremetalsolution.googleapis.com
service provides management capabilities for Bare Metal
Solution servers. To access the API methods, you must assign Bare Metal Solution IAM roles
containing the desired permissions to your staff in your Google Cloud project. You must also
enable the Bare Metal Solution API. Once enabled, the methods act upon specific servers in your
Bare Metal Solution environment.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = bareMetalSolutionClient.getInstance(name);
}
Note: close() needs to be called on the BareMetalSolutionClient 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 BareMetalSolutionSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
BareMetalSolutionSettings bareMetalSolutionSettings =
BareMetalSolutionSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
BareMetalSolutionClient bareMetalSolutionClient =
BareMetalSolutionClient.create(bareMetalSolutionSettings);
To customize the endpoint:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
BareMetalSolutionSettings bareMetalSolutionSettings =
BareMetalSolutionSettings.newBuilder().setEndpoint(myEndpoint).build();
BareMetalSolutionClient bareMetalSolutionClient =
BareMetalSolutionClient.create(bareMetalSolutionSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final BareMetalSolutionClient create()
Constructs an instance of BareMetalSolutionClient with default settings.
Type | Description |
BareMetalSolutionClient |
Type | Description |
IOException |
create(BareMetalSolutionSettings settings)
public static final BareMetalSolutionClient create(BareMetalSolutionSettings settings)
Constructs an instance of BareMetalSolutionClient, 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 | BareMetalSolutionSettings |
Type | Description |
BareMetalSolutionClient |
Type | Description |
IOException |
create(BareMetalSolutionStub stub)
public static final BareMetalSolutionClient create(BareMetalSolutionStub stub)
Constructs an instance of BareMetalSolutionClient, using the given stub for making calls. This is for advanced usage - prefer using create(BareMetalSolutionSettings).
Name | Description |
stub | BareMetalSolutionStub |
Type | Description |
BareMetalSolutionClient |
Constructors
BareMetalSolutionClient(BareMetalSolutionSettings settings)
protected BareMetalSolutionClient(BareMetalSolutionSettings settings)
Constructs an instance of BareMetalSolutionClient, 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 | BareMetalSolutionSettings |
BareMetalSolutionClient(BareMetalSolutionStub stub)
protected BareMetalSolutionClient(BareMetalSolutionStub stub)
Name | Description |
stub | BareMetalSolutionStub |
Methods
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()
createSnapshotSchedulePolicy(CreateSnapshotSchedulePolicyRequest request)
public final SnapshotSchedulePolicy createSnapshotSchedulePolicy(CreateSnapshotSchedulePolicyRequest request)
Create a snapshot schedule policy in the specified project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
CreateSnapshotSchedulePolicyRequest request =
CreateSnapshotSchedulePolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setSnapshotSchedulePolicy(SnapshotSchedulePolicy.newBuilder().build())
.setSnapshotSchedulePolicyId("snapshotSchedulePolicyId1929948040")
.build();
SnapshotSchedulePolicy response =
bareMetalSolutionClient.createSnapshotSchedulePolicy(request);
}
Name | Description |
request | CreateSnapshotSchedulePolicyRequest The request object containing all of the parameters for the API call. |
Type | Description |
SnapshotSchedulePolicy |
createSnapshotSchedulePolicy(LocationName parent, SnapshotSchedulePolicy snapshotSchedulePolicy, String snapshotSchedulePolicyId)
public final SnapshotSchedulePolicy createSnapshotSchedulePolicy(LocationName parent, SnapshotSchedulePolicy snapshotSchedulePolicy, String snapshotSchedulePolicyId)
Create a snapshot schedule policy in the specified project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build();
String snapshotSchedulePolicyId = "snapshotSchedulePolicyId1929948040";
SnapshotSchedulePolicy response =
bareMetalSolutionClient.createSnapshotSchedulePolicy(
parent, snapshotSchedulePolicy, snapshotSchedulePolicyId);
}
Name | Description |
parent | LocationName Required. The parent project and location containing the SnapshotSchedulePolicy. |
snapshotSchedulePolicy | SnapshotSchedulePolicy Required. The SnapshotSchedulePolicy to create. |
snapshotSchedulePolicyId | String Required. Snapshot policy ID |
Type | Description |
SnapshotSchedulePolicy |
createSnapshotSchedulePolicy(String parent, SnapshotSchedulePolicy snapshotSchedulePolicy, String snapshotSchedulePolicyId)
public final SnapshotSchedulePolicy createSnapshotSchedulePolicy(String parent, SnapshotSchedulePolicy snapshotSchedulePolicy, String snapshotSchedulePolicyId)
Create a snapshot schedule policy in the specified project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build();
String snapshotSchedulePolicyId = "snapshotSchedulePolicyId1929948040";
SnapshotSchedulePolicy response =
bareMetalSolutionClient.createSnapshotSchedulePolicy(
parent, snapshotSchedulePolicy, snapshotSchedulePolicyId);
}
Name | Description |
parent | String Required. The parent project and location containing the SnapshotSchedulePolicy. |
snapshotSchedulePolicy | SnapshotSchedulePolicy Required. The SnapshotSchedulePolicy to create. |
snapshotSchedulePolicyId | String Required. Snapshot policy ID |
Type | Description |
SnapshotSchedulePolicy |
createSnapshotSchedulePolicyCallable()
public final UnaryCallable<CreateSnapshotSchedulePolicyRequest,SnapshotSchedulePolicy> createSnapshotSchedulePolicyCallable()
Create a snapshot schedule policy in the specified project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
CreateSnapshotSchedulePolicyRequest request =
CreateSnapshotSchedulePolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setSnapshotSchedulePolicy(SnapshotSchedulePolicy.newBuilder().build())
.setSnapshotSchedulePolicyId("snapshotSchedulePolicyId1929948040")
.build();
ApiFuture<SnapshotSchedulePolicy> future =
bareMetalSolutionClient.createSnapshotSchedulePolicyCallable().futureCall(request);
// Do something.
SnapshotSchedulePolicy response = future.get();
}
Type | Description |
UnaryCallable<CreateSnapshotSchedulePolicyRequest,SnapshotSchedulePolicy> |
createVolumeSnapshot(CreateVolumeSnapshotRequest request)
public final VolumeSnapshot createVolumeSnapshot(CreateVolumeSnapshotRequest request)
Create a storage volume snapshot in a containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
CreateVolumeSnapshotRequest request =
CreateVolumeSnapshotRequest.newBuilder()
.setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.setVolumeSnapshot(VolumeSnapshot.newBuilder().build())
.build();
VolumeSnapshot response = bareMetalSolutionClient.createVolumeSnapshot(request);
}
Name | Description |
request | CreateVolumeSnapshotRequest The request object containing all of the parameters for the API call. |
Type | Description |
VolumeSnapshot |
createVolumeSnapshot(VolumeName parent, VolumeSnapshot volumeSnapshot)
public final VolumeSnapshot createVolumeSnapshot(VolumeName parent, VolumeSnapshot volumeSnapshot)
Create a storage volume snapshot in a containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build();
VolumeSnapshot response =
bareMetalSolutionClient.createVolumeSnapshot(parent, volumeSnapshot);
}
Name | Description |
parent | VolumeName Required. The volume to snapshot. |
volumeSnapshot | VolumeSnapshot Required. The volume snapshot to create. Only the description field may be specified. |
Type | Description |
VolumeSnapshot |
createVolumeSnapshot(String parent, VolumeSnapshot volumeSnapshot)
public final VolumeSnapshot createVolumeSnapshot(String parent, VolumeSnapshot volumeSnapshot)
Create a storage volume snapshot in a containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build();
VolumeSnapshot response =
bareMetalSolutionClient.createVolumeSnapshot(parent, volumeSnapshot);
}
Name | Description |
parent | String Required. The volume to snapshot. |
volumeSnapshot | VolumeSnapshot Required. The volume snapshot to create. Only the description field may be specified. |
Type | Description |
VolumeSnapshot |
createVolumeSnapshotCallable()
public final UnaryCallable<CreateVolumeSnapshotRequest,VolumeSnapshot> createVolumeSnapshotCallable()
Create a storage volume snapshot in a containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
CreateVolumeSnapshotRequest request =
CreateVolumeSnapshotRequest.newBuilder()
.setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.setVolumeSnapshot(VolumeSnapshot.newBuilder().build())
.build();
ApiFuture<VolumeSnapshot> future =
bareMetalSolutionClient.createVolumeSnapshotCallable().futureCall(request);
// Do something.
VolumeSnapshot response = future.get();
}
Type | Description |
UnaryCallable<CreateVolumeSnapshotRequest,VolumeSnapshot> |
deleteSnapshotSchedulePolicy(DeleteSnapshotSchedulePolicyRequest request)
public final void deleteSnapshotSchedulePolicy(DeleteSnapshotSchedulePolicyRequest request)
Delete a named snapshot schedule policy.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
DeleteSnapshotSchedulePolicyRequest request =
DeleteSnapshotSchedulePolicyRequest.newBuilder()
.setName(
SnapshotSchedulePolicyName.of(
"[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
.toString())
.build();
bareMetalSolutionClient.deleteSnapshotSchedulePolicy(request);
}
Name | Description |
request | DeleteSnapshotSchedulePolicyRequest The request object containing all of the parameters for the API call. |
deleteSnapshotSchedulePolicy(SnapshotSchedulePolicyName name)
public final void deleteSnapshotSchedulePolicy(SnapshotSchedulePolicyName name)
Delete a named snapshot schedule policy.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
SnapshotSchedulePolicyName name =
SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]");
bareMetalSolutionClient.deleteSnapshotSchedulePolicy(name);
}
Name | Description |
name | SnapshotSchedulePolicyName Required. The name of the snapshot schedule policy to delete. |
deleteSnapshotSchedulePolicy(String name)
public final void deleteSnapshotSchedulePolicy(String name)
Delete a named snapshot schedule policy.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name =
SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
.toString();
bareMetalSolutionClient.deleteSnapshotSchedulePolicy(name);
}
Name | Description |
name | String Required. The name of the snapshot schedule policy to delete. |
deleteSnapshotSchedulePolicyCallable()
public final UnaryCallable<DeleteSnapshotSchedulePolicyRequest,Empty> deleteSnapshotSchedulePolicyCallable()
Delete a named snapshot schedule policy.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
DeleteSnapshotSchedulePolicyRequest request =
DeleteSnapshotSchedulePolicyRequest.newBuilder()
.setName(
SnapshotSchedulePolicyName.of(
"[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
.toString())
.build();
ApiFuture<Empty> future =
bareMetalSolutionClient.deleteSnapshotSchedulePolicyCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteSnapshotSchedulePolicyRequest,Empty> |
deleteVolumeSnapshot(DeleteVolumeSnapshotRequest request)
public final void deleteVolumeSnapshot(DeleteVolumeSnapshotRequest request)
Deletes a storage volume snapshot for a given volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
DeleteVolumeSnapshotRequest request =
DeleteVolumeSnapshotRequest.newBuilder()
.setName(
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
.toString())
.build();
bareMetalSolutionClient.deleteVolumeSnapshot(request);
}
Name | Description |
request | DeleteVolumeSnapshotRequest The request object containing all of the parameters for the API call. |
deleteVolumeSnapshot(VolumeSnapshotName name)
public final void deleteVolumeSnapshot(VolumeSnapshotName name)
Deletes a storage volume snapshot for a given volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
VolumeSnapshotName name =
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]");
bareMetalSolutionClient.deleteVolumeSnapshot(name);
}
Name | Description |
name | VolumeSnapshotName Required. The name of the snapshot to delete. |
deleteVolumeSnapshot(String name)
public final void deleteVolumeSnapshot(String name)
Deletes a storage volume snapshot for a given volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name =
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString();
bareMetalSolutionClient.deleteVolumeSnapshot(name);
}
Name | Description |
name | String Required. The name of the snapshot to delete. |
deleteVolumeSnapshotCallable()
public final UnaryCallable<DeleteVolumeSnapshotRequest,Empty> deleteVolumeSnapshotCallable()
Deletes a storage volume snapshot for a given volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
DeleteVolumeSnapshotRequest request =
DeleteVolumeSnapshotRequest.newBuilder()
.setName(
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
.toString())
.build();
ApiFuture<Empty> future =
bareMetalSolutionClient.deleteVolumeSnapshotCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteVolumeSnapshotRequest,Empty> |
getInstance(GetInstanceRequest request)
public final Instance getInstance(GetInstanceRequest request)
Get details about a single server.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetInstanceRequest request =
GetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
Instance response = bareMetalSolutionClient.getInstance(request);
}
Name | Description |
request | GetInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
Instance |
getInstance(InstanceName name)
public final Instance getInstance(InstanceName name)
Get details about a single server.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = bareMetalSolutionClient.getInstance(name);
}
Name | Description |
name | InstanceName Required. Name of the resource. |
Type | Description |
Instance |
getInstance(String name)
public final Instance getInstance(String name)
Get details about a single server.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
Instance response = bareMetalSolutionClient.getInstance(name);
}
Name | Description |
name | String Required. Name of the resource. |
Type | Description |
Instance |
getInstanceCallable()
public final UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()
Get details about a single server.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetInstanceRequest request =
GetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
ApiFuture<Instance> future =
bareMetalSolutionClient.getInstanceCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
Type | Description |
UnaryCallable<GetInstanceRequest,Instance> |
getLun(GetLunRequest request)
public final Lun getLun(GetLunRequest request)
Get details of a single storage logical unit number(LUN).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetLunRequest request =
GetLunRequest.newBuilder()
.setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
.build();
Lun response = bareMetalSolutionClient.getLun(request);
}
Name | Description |
request | GetLunRequest The request object containing all of the parameters for the API call. |
Type | Description |
Lun |
getLun(LunName name)
public final Lun getLun(LunName name)
Get details of a single storage logical unit number(LUN).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
Lun response = bareMetalSolutionClient.getLun(name);
}
Name | Description |
name | LunName Required. Name of the resource. |
Type | Description |
Lun |
getLun(String name)
public final Lun getLun(String name)
Get details of a single storage logical unit number(LUN).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString();
Lun response = bareMetalSolutionClient.getLun(name);
}
Name | Description |
name | String Required. Name of the resource. |
Type | Description |
Lun |
getLunCallable()
public final UnaryCallable<GetLunRequest,Lun> getLunCallable()
Get details of a single storage logical unit number(LUN).
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetLunRequest request =
GetLunRequest.newBuilder()
.setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
.build();
ApiFuture<Lun> future = bareMetalSolutionClient.getLunCallable().futureCall(request);
// Do something.
Lun response = future.get();
}
Type | Description |
UnaryCallable<GetLunRequest,Lun> |
getNetwork(GetNetworkRequest request)
public final Network getNetwork(GetNetworkRequest request)
Get details of a single network.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetNetworkRequest request =
GetNetworkRequest.newBuilder()
.setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString())
.build();
Network response = bareMetalSolutionClient.getNetwork(request);
}
Name | Description |
request | GetNetworkRequest The request object containing all of the parameters for the API call. |
Type | Description |
Network |
getNetwork(NetworkName name)
public final Network getNetwork(NetworkName name)
Get details of a single network.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]");
Network response = bareMetalSolutionClient.getNetwork(name);
}
Name | Description |
name | NetworkName Required. Name of the resource. |
Type | Description |
Network |
getNetwork(String name)
public final Network getNetwork(String name)
Get details of a single network.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString();
Network response = bareMetalSolutionClient.getNetwork(name);
}
Name | Description |
name | String Required. Name of the resource. |
Type | Description |
Network |
getNetworkCallable()
public final UnaryCallable<GetNetworkRequest,Network> getNetworkCallable()
Get details of a single network.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetNetworkRequest request =
GetNetworkRequest.newBuilder()
.setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[NETWORK]").toString())
.build();
ApiFuture<Network> future = bareMetalSolutionClient.getNetworkCallable().futureCall(request);
// Do something.
Network response = future.get();
}
Type | Description |
UnaryCallable<GetNetworkRequest,Network> |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Type | Description |
OperationsClient |
getSettings()
public final BareMetalSolutionSettings getSettings()
Type | Description |
BareMetalSolutionSettings |
getSnapshotSchedulePolicy(GetSnapshotSchedulePolicyRequest request)
public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(GetSnapshotSchedulePolicyRequest request)
Get details of a single snapshot schedule policy.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetSnapshotSchedulePolicyRequest request =
GetSnapshotSchedulePolicyRequest.newBuilder()
.setName(
SnapshotSchedulePolicyName.of(
"[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
.toString())
.build();
SnapshotSchedulePolicy response = bareMetalSolutionClient.getSnapshotSchedulePolicy(request);
}
Name | Description |
request | GetSnapshotSchedulePolicyRequest The request object containing all of the parameters for the API call. |
Type | Description |
SnapshotSchedulePolicy |
getSnapshotSchedulePolicy(SnapshotSchedulePolicyName name)
public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(SnapshotSchedulePolicyName name)
Get details of a single snapshot schedule policy.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
SnapshotSchedulePolicyName name =
SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]");
SnapshotSchedulePolicy response = bareMetalSolutionClient.getSnapshotSchedulePolicy(name);
}
Name | Description |
name | SnapshotSchedulePolicyName Required. Name of the resource. |
Type | Description |
SnapshotSchedulePolicy |
getSnapshotSchedulePolicy(String name)
public final SnapshotSchedulePolicy getSnapshotSchedulePolicy(String name)
Get details of a single snapshot schedule policy.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name =
SnapshotSchedulePolicyName.of("[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
.toString();
SnapshotSchedulePolicy response = bareMetalSolutionClient.getSnapshotSchedulePolicy(name);
}
Name | Description |
name | String Required. Name of the resource. |
Type | Description |
SnapshotSchedulePolicy |
getSnapshotSchedulePolicyCallable()
public final UnaryCallable<GetSnapshotSchedulePolicyRequest,SnapshotSchedulePolicy> getSnapshotSchedulePolicyCallable()
Get details of a single snapshot schedule policy.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetSnapshotSchedulePolicyRequest request =
GetSnapshotSchedulePolicyRequest.newBuilder()
.setName(
SnapshotSchedulePolicyName.of(
"[PROJECT]", "[LOCATION]", "[SNAPSHOT_SCHEDULE_POLICY]")
.toString())
.build();
ApiFuture<SnapshotSchedulePolicy> future =
bareMetalSolutionClient.getSnapshotSchedulePolicyCallable().futureCall(request);
// Do something.
SnapshotSchedulePolicy response = future.get();
}
Type | Description |
UnaryCallable<GetSnapshotSchedulePolicyRequest,SnapshotSchedulePolicy> |
getStub()
public BareMetalSolutionStub getStub()
Type | Description |
BareMetalSolutionStub |
getVolume(GetVolumeRequest request)
public final Volume getVolume(GetVolumeRequest request)
Get details of a single storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetVolumeRequest request =
GetVolumeRequest.newBuilder()
.setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.build();
Volume response = bareMetalSolutionClient.getVolume(request);
}
Name | Description |
request | GetVolumeRequest The request object containing all of the parameters for the API call. |
Type | Description |
Volume |
getVolume(VolumeName name)
public final Volume getVolume(VolumeName name)
Get details of a single storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
Volume response = bareMetalSolutionClient.getVolume(name);
}
Name | Description |
name | VolumeName Required. Name of the resource. |
Type | Description |
Volume |
getVolume(String name)
public final Volume getVolume(String name)
Get details of a single storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
Volume response = bareMetalSolutionClient.getVolume(name);
}
Name | Description |
name | String Required. Name of the resource. |
Type | Description |
Volume |
getVolumeCallable()
public final UnaryCallable<GetVolumeRequest,Volume> getVolumeCallable()
Get details of a single storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetVolumeRequest request =
GetVolumeRequest.newBuilder()
.setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.build();
ApiFuture<Volume> future = bareMetalSolutionClient.getVolumeCallable().futureCall(request);
// Do something.
Volume response = future.get();
}
Type | Description |
UnaryCallable<GetVolumeRequest,Volume> |
getVolumeSnapshot(GetVolumeSnapshotRequest request)
public final VolumeSnapshot getVolumeSnapshot(GetVolumeSnapshotRequest request)
Get details of a single storage volume snapshot.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetVolumeSnapshotRequest request =
GetVolumeSnapshotRequest.newBuilder()
.setName(
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
.toString())
.build();
VolumeSnapshot response = bareMetalSolutionClient.getVolumeSnapshot(request);
}
Name | Description |
request | GetVolumeSnapshotRequest The request object containing all of the parameters for the API call. |
Type | Description |
VolumeSnapshot |
getVolumeSnapshot(VolumeSnapshotName name)
public final VolumeSnapshot getVolumeSnapshot(VolumeSnapshotName name)
Get details of a single storage volume snapshot.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
VolumeSnapshotName name =
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]");
VolumeSnapshot response = bareMetalSolutionClient.getVolumeSnapshot(name);
}
Name | Description |
name | VolumeSnapshotName Required. Name of the resource. |
Type | Description |
VolumeSnapshot |
getVolumeSnapshot(String name)
public final VolumeSnapshot getVolumeSnapshot(String name)
Get details of a single storage volume snapshot.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name =
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString();
VolumeSnapshot response = bareMetalSolutionClient.getVolumeSnapshot(name);
}
Name | Description |
name | String Required. Name of the resource. |
Type | Description |
VolumeSnapshot |
getVolumeSnapshotCallable()
public final UnaryCallable<GetVolumeSnapshotRequest,VolumeSnapshot> getVolumeSnapshotCallable()
Get details of a single storage volume snapshot.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
GetVolumeSnapshotRequest request =
GetVolumeSnapshotRequest.newBuilder()
.setName(
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
.toString())
.build();
ApiFuture<VolumeSnapshot> future =
bareMetalSolutionClient.getVolumeSnapshotCallable().futureCall(request);
// Do something.
VolumeSnapshot response = future.get();
}
Type | Description |
UnaryCallable<GetVolumeSnapshotRequest,VolumeSnapshot> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listInstances(ListInstancesRequest request)
public final BareMetalSolutionClient.ListInstancesPagedResponse listInstances(ListInstancesRequest request)
List servers in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Instance element : bareMetalSolutionClient.listInstances(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListInstancesRequest The request object containing all of the parameters for the API call. |
Type | Description |
BareMetalSolutionClient.ListInstancesPagedResponse |
listInstances(LocationName parent)
public final BareMetalSolutionClient.ListInstancesPagedResponse listInstances(LocationName parent)
List servers in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Instance element : bareMetalSolutionClient.listInstances(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. Parent value for ListInstancesRequest. |
Type | Description |
BareMetalSolutionClient.ListInstancesPagedResponse |
listInstances(String parent)
public final BareMetalSolutionClient.ListInstancesPagedResponse listInstances(String parent)
List servers in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Instance element : bareMetalSolutionClient.listInstances(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Parent value for ListInstancesRequest. |
Type | Description |
BareMetalSolutionClient.ListInstancesPagedResponse |
listInstancesCallable()
public final UnaryCallable<ListInstancesRequest,ListInstancesResponse> listInstancesCallable()
List servers in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListInstancesResponse response =
bareMetalSolutionClient.listInstancesCallable().call(request);
for (Instance element : response.getInstancesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListInstancesRequest,ListInstancesResponse> |
listInstancesPagedCallable()
public final UnaryCallable<ListInstancesRequest,BareMetalSolutionClient.ListInstancesPagedResponse> listInstancesPagedCallable()
List servers in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Instance> future =
bareMetalSolutionClient.listInstancesPagedCallable().futureCall(request);
// Do something.
for (Instance element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListInstancesRequest,ListInstancesPagedResponse> |
listLuns(ListLunsRequest request)
public final BareMetalSolutionClient.ListLunsPagedResponse listLuns(ListLunsRequest request)
List storage volume luns for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListLunsRequest request =
ListLunsRequest.newBuilder()
.setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Lun element : bareMetalSolutionClient.listLuns(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListLunsRequest The request object containing all of the parameters for the API call. |
Type | Description |
BareMetalSolutionClient.ListLunsPagedResponse |
listLuns(VolumeName parent)
public final BareMetalSolutionClient.ListLunsPagedResponse listLuns(VolumeName parent)
List storage volume luns for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
for (Lun element : bareMetalSolutionClient.listLuns(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | VolumeName Required. Parent value for ListLunsRequest. |
Type | Description |
BareMetalSolutionClient.ListLunsPagedResponse |
listLuns(String parent)
public final BareMetalSolutionClient.ListLunsPagedResponse listLuns(String parent)
List storage volume luns for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
for (Lun element : bareMetalSolutionClient.listLuns(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Parent value for ListLunsRequest. |
Type | Description |
BareMetalSolutionClient.ListLunsPagedResponse |
listLunsCallable()
public final UnaryCallable<ListLunsRequest,ListLunsResponse> listLunsCallable()
List storage volume luns for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListLunsRequest request =
ListLunsRequest.newBuilder()
.setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLunsResponse response = bareMetalSolutionClient.listLunsCallable().call(request);
for (Lun element : response.getLunsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListLunsRequest,ListLunsResponse> |
listLunsPagedCallable()
public final UnaryCallable<ListLunsRequest,BareMetalSolutionClient.ListLunsPagedResponse> listLunsPagedCallable()
List storage volume luns for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListLunsRequest request =
ListLunsRequest.newBuilder()
.setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Lun> future = bareMetalSolutionClient.listLunsPagedCallable().futureCall(request);
// Do something.
for (Lun element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListLunsRequest,ListLunsPagedResponse> |
listNetworks(ListNetworksRequest request)
public final BareMetalSolutionClient.ListNetworksPagedResponse listNetworks(ListNetworksRequest request)
List network in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListNetworksRequest request =
ListNetworksRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Network element : bareMetalSolutionClient.listNetworks(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListNetworksRequest The request object containing all of the parameters for the API call. |
Type | Description |
BareMetalSolutionClient.ListNetworksPagedResponse |
listNetworks(LocationName parent)
public final BareMetalSolutionClient.ListNetworksPagedResponse listNetworks(LocationName parent)
List network in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Network element : bareMetalSolutionClient.listNetworks(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. Parent value for ListNetworksRequest. |
Type | Description |
BareMetalSolutionClient.ListNetworksPagedResponse |
listNetworks(String parent)
public final BareMetalSolutionClient.ListNetworksPagedResponse listNetworks(String parent)
List network in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Network element : bareMetalSolutionClient.listNetworks(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Parent value for ListNetworksRequest. |
Type | Description |
BareMetalSolutionClient.ListNetworksPagedResponse |
listNetworksCallable()
public final UnaryCallable<ListNetworksRequest,ListNetworksResponse> listNetworksCallable()
List network in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListNetworksRequest request =
ListNetworksRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListNetworksResponse response =
bareMetalSolutionClient.listNetworksCallable().call(request);
for (Network element : response.getNetworksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListNetworksRequest,ListNetworksResponse> |
listNetworksPagedCallable()
public final UnaryCallable<ListNetworksRequest,BareMetalSolutionClient.ListNetworksPagedResponse> listNetworksPagedCallable()
List network in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListNetworksRequest request =
ListNetworksRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Network> future =
bareMetalSolutionClient.listNetworksPagedCallable().futureCall(request);
// Do something.
for (Network element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListNetworksRequest,ListNetworksPagedResponse> |
listSnapshotSchedulePolicies(ListSnapshotSchedulePoliciesRequest request)
public final BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolicies(ListSnapshotSchedulePoliciesRequest request)
List snapshot schedule policies in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListSnapshotSchedulePoliciesRequest request =
ListSnapshotSchedulePoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (SnapshotSchedulePolicy element :
bareMetalSolutionClient.listSnapshotSchedulePolicies(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListSnapshotSchedulePoliciesRequest The request object containing all of the parameters for the API call. |
Type | Description |
BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse |
listSnapshotSchedulePolicies(LocationName parent)
public final BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolicies(LocationName parent)
List snapshot schedule policies in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (SnapshotSchedulePolicy element :
bareMetalSolutionClient.listSnapshotSchedulePolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The parent project containing the Snapshot Schedule Policies. |
Type | Description |
BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse |
listSnapshotSchedulePolicies(String parent)
public final BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse listSnapshotSchedulePolicies(String parent)
List snapshot schedule policies in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (SnapshotSchedulePolicy element :
bareMetalSolutionClient.listSnapshotSchedulePolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent project containing the Snapshot Schedule Policies. |
Type | Description |
BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse |
listSnapshotSchedulePoliciesCallable()
public final UnaryCallable<ListSnapshotSchedulePoliciesRequest,ListSnapshotSchedulePoliciesResponse> listSnapshotSchedulePoliciesCallable()
List snapshot schedule policies in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListSnapshotSchedulePoliciesRequest request =
ListSnapshotSchedulePoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSnapshotSchedulePoliciesResponse response =
bareMetalSolutionClient.listSnapshotSchedulePoliciesCallable().call(request);
for (SnapshotSchedulePolicy element : response.getSnapshotSchedulePoliciesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListSnapshotSchedulePoliciesRequest,ListSnapshotSchedulePoliciesResponse> |
listSnapshotSchedulePoliciesPagedCallable()
public final UnaryCallable<ListSnapshotSchedulePoliciesRequest,BareMetalSolutionClient.ListSnapshotSchedulePoliciesPagedResponse> listSnapshotSchedulePoliciesPagedCallable()
List snapshot schedule policies in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListSnapshotSchedulePoliciesRequest request =
ListSnapshotSchedulePoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<SnapshotSchedulePolicy> future =
bareMetalSolutionClient.listSnapshotSchedulePoliciesPagedCallable().futureCall(request);
// Do something.
for (SnapshotSchedulePolicy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListSnapshotSchedulePoliciesRequest,ListSnapshotSchedulePoliciesPagedResponse> |
listVolumeSnapshots(ListVolumeSnapshotsRequest request)
public final BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse listVolumeSnapshots(ListVolumeSnapshotsRequest request)
List storage volume snapshots for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListVolumeSnapshotsRequest request =
ListVolumeSnapshotsRequest.newBuilder()
.setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (VolumeSnapshot element :
bareMetalSolutionClient.listVolumeSnapshots(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListVolumeSnapshotsRequest The request object containing all of the parameters for the API call. |
Type | Description |
BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse |
listVolumeSnapshots(VolumeName parent)
public final BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse listVolumeSnapshots(VolumeName parent)
List storage volume snapshots for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
for (VolumeSnapshot element :
bareMetalSolutionClient.listVolumeSnapshots(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | VolumeName Required. Parent value for ListVolumesRequest. |
Type | Description |
BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse |
listVolumeSnapshots(String parent)
public final BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse listVolumeSnapshots(String parent)
List storage volume snapshots for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
for (VolumeSnapshot element :
bareMetalSolutionClient.listVolumeSnapshots(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Parent value for ListVolumesRequest. |
Type | Description |
BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse |
listVolumeSnapshotsCallable()
public final UnaryCallable<ListVolumeSnapshotsRequest,ListVolumeSnapshotsResponse> listVolumeSnapshotsCallable()
List storage volume snapshots for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListVolumeSnapshotsRequest request =
ListVolumeSnapshotsRequest.newBuilder()
.setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListVolumeSnapshotsResponse response =
bareMetalSolutionClient.listVolumeSnapshotsCallable().call(request);
for (VolumeSnapshot element : response.getVolumeSnapshotsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListVolumeSnapshotsRequest,ListVolumeSnapshotsResponse> |
listVolumeSnapshotsPagedCallable()
public final UnaryCallable<ListVolumeSnapshotsRequest,BareMetalSolutionClient.ListVolumeSnapshotsPagedResponse> listVolumeSnapshotsPagedCallable()
List storage volume snapshots for given storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListVolumeSnapshotsRequest request =
ListVolumeSnapshotsRequest.newBuilder()
.setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<VolumeSnapshot> future =
bareMetalSolutionClient.listVolumeSnapshotsPagedCallable().futureCall(request);
// Do something.
for (VolumeSnapshot element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListVolumeSnapshotsRequest,ListVolumeSnapshotsPagedResponse> |
listVolumes(ListVolumesRequest request)
public final BareMetalSolutionClient.ListVolumesPagedResponse listVolumes(ListVolumesRequest request)
List storage volumes in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListVolumesRequest request =
ListVolumesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Volume element : bareMetalSolutionClient.listVolumes(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListVolumesRequest The request object containing all of the parameters for the API call. |
Type | Description |
BareMetalSolutionClient.ListVolumesPagedResponse |
listVolumes(LocationName parent)
public final BareMetalSolutionClient.ListVolumesPagedResponse listVolumes(LocationName parent)
List storage volumes in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Volume element : bareMetalSolutionClient.listVolumes(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. Parent value for ListVolumesRequest. |
Type | Description |
BareMetalSolutionClient.ListVolumesPagedResponse |
listVolumes(String parent)
public final BareMetalSolutionClient.ListVolumesPagedResponse listVolumes(String parent)
List storage volumes in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Volume element : bareMetalSolutionClient.listVolumes(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Parent value for ListVolumesRequest. |
Type | Description |
BareMetalSolutionClient.ListVolumesPagedResponse |
listVolumesCallable()
public final UnaryCallable<ListVolumesRequest,ListVolumesResponse> listVolumesCallable()
List storage volumes in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListVolumesRequest request =
ListVolumesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListVolumesResponse response = bareMetalSolutionClient.listVolumesCallable().call(request);
for (Volume element : response.getVolumesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListVolumesRequest,ListVolumesResponse> |
listVolumesPagedCallable()
public final UnaryCallable<ListVolumesRequest,BareMetalSolutionClient.ListVolumesPagedResponse> listVolumesPagedCallable()
List storage volumes in a given project and location.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ListVolumesRequest request =
ListVolumesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Volume> future =
bareMetalSolutionClient.listVolumesPagedCallable().futureCall(request);
// Do something.
for (Volume element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListVolumesRequest,ListVolumesPagedResponse> |
resetInstanceAsync(InstanceName name)
public final OperationFuture<ResetInstanceResponse,OperationMetadata> resetInstanceAsync(InstanceName name)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
ResetInstanceResponse response = bareMetalSolutionClient.resetInstanceAsync(name).get();
}
Name | Description |
name | InstanceName Required. Name of the resource. |
Type | Description |
OperationFuture<ResetInstanceResponse,OperationMetadata> |
resetInstanceAsync(ResetInstanceRequest request)
public final OperationFuture<ResetInstanceResponse,OperationMetadata> resetInstanceAsync(ResetInstanceRequest request)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ResetInstanceRequest request =
ResetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
ResetInstanceResponse response = bareMetalSolutionClient.resetInstanceAsync(request).get();
}
Name | Description |
request | ResetInstanceRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<ResetInstanceResponse,OperationMetadata> |
resetInstanceAsync(String name)
public final OperationFuture<ResetInstanceResponse,OperationMetadata> resetInstanceAsync(String name)
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
ResetInstanceResponse response = bareMetalSolutionClient.resetInstanceAsync(name).get();
}
Name | Description |
name | String Required. Name of the resource. |
Type | Description |
OperationFuture<ResetInstanceResponse,OperationMetadata> |
resetInstanceCallable()
public final UnaryCallable<ResetInstanceRequest,Operation> resetInstanceCallable()
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ResetInstanceRequest request =
ResetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
ApiFuture<Operation> future =
bareMetalSolutionClient.resetInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<ResetInstanceRequest,Operation> |
resetInstanceOperationCallable()
public final OperationCallable<ResetInstanceRequest,ResetInstanceResponse,OperationMetadata> resetInstanceOperationCallable()
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
ResetInstanceRequest request =
ResetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
OperationFuture<ResetInstanceResponse, OperationMetadata> future =
bareMetalSolutionClient.resetInstanceOperationCallable().futureCall(request);
// Do something.
ResetInstanceResponse response = future.get();
}
Type | Description |
OperationCallable<ResetInstanceRequest,ResetInstanceResponse,OperationMetadata> |
restoreVolumeSnapshotAsync(RestoreVolumeSnapshotRequest request)
public final OperationFuture<VolumeSnapshot,OperationMetadata> restoreVolumeSnapshotAsync(RestoreVolumeSnapshotRequest request)
Restore a storage volume snapshot to its containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
RestoreVolumeSnapshotRequest request =
RestoreVolumeSnapshotRequest.newBuilder()
.setVolumeSnapshot(
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
.toString())
.build();
VolumeSnapshot response = bareMetalSolutionClient.restoreVolumeSnapshotAsync(request).get();
}
Name | Description |
request | RestoreVolumeSnapshotRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<VolumeSnapshot,OperationMetadata> |
restoreVolumeSnapshotAsync(VolumeSnapshotName volumeSnapshot)
public final OperationFuture<VolumeSnapshot,OperationMetadata> restoreVolumeSnapshotAsync(VolumeSnapshotName volumeSnapshot)
Restore a storage volume snapshot to its containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
VolumeSnapshotName volumeSnapshot =
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]");
VolumeSnapshot response =
bareMetalSolutionClient.restoreVolumeSnapshotAsync(volumeSnapshot).get();
}
Name | Description |
volumeSnapshot | VolumeSnapshotName Required. Name of the resource. |
Type | Description |
OperationFuture<VolumeSnapshot,OperationMetadata> |
restoreVolumeSnapshotAsync(String volumeSnapshot)
public final OperationFuture<VolumeSnapshot,OperationMetadata> restoreVolumeSnapshotAsync(String volumeSnapshot)
Restore a storage volume snapshot to its containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
String volumeSnapshot =
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString();
VolumeSnapshot response =
bareMetalSolutionClient.restoreVolumeSnapshotAsync(volumeSnapshot).get();
}
Name | Description |
volumeSnapshot | String Required. Name of the resource. |
Type | Description |
OperationFuture<VolumeSnapshot,OperationMetadata> |
restoreVolumeSnapshotCallable()
public final UnaryCallable<RestoreVolumeSnapshotRequest,Operation> restoreVolumeSnapshotCallable()
Restore a storage volume snapshot to its containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
RestoreVolumeSnapshotRequest request =
RestoreVolumeSnapshotRequest.newBuilder()
.setVolumeSnapshot(
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
.toString())
.build();
ApiFuture<Operation> future =
bareMetalSolutionClient.restoreVolumeSnapshotCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<RestoreVolumeSnapshotRequest,Operation> |
restoreVolumeSnapshotOperationCallable()
public final OperationCallable<RestoreVolumeSnapshotRequest,VolumeSnapshot,OperationMetadata> restoreVolumeSnapshotOperationCallable()
Restore a storage volume snapshot to its containing volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
RestoreVolumeSnapshotRequest request =
RestoreVolumeSnapshotRequest.newBuilder()
.setVolumeSnapshot(
VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
.toString())
.build();
OperationFuture<VolumeSnapshot, OperationMetadata> future =
bareMetalSolutionClient.restoreVolumeSnapshotOperationCallable().futureCall(request);
// Do something.
VolumeSnapshot response = future.get();
}
Type | Description |
OperationCallable<RestoreVolumeSnapshotRequest,VolumeSnapshot,OperationMetadata> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateSnapshotSchedulePolicy(SnapshotSchedulePolicy snapshotSchedulePolicy, FieldMask updateMask)
public final SnapshotSchedulePolicy updateSnapshotSchedulePolicy(SnapshotSchedulePolicy snapshotSchedulePolicy, FieldMask updateMask)
Update a snapshot schedule policy in the specified project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
SnapshotSchedulePolicy snapshotSchedulePolicy = SnapshotSchedulePolicy.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
SnapshotSchedulePolicy response =
bareMetalSolutionClient.updateSnapshotSchedulePolicy(snapshotSchedulePolicy, updateMask);
}
Name | Description |
snapshotSchedulePolicy | SnapshotSchedulePolicy Required. The snapshot schedule policy to update. The |
updateMask | FieldMask Required. The list of fields to update. |
Type | Description |
SnapshotSchedulePolicy |
updateSnapshotSchedulePolicy(UpdateSnapshotSchedulePolicyRequest request)
public final SnapshotSchedulePolicy updateSnapshotSchedulePolicy(UpdateSnapshotSchedulePolicyRequest request)
Update a snapshot schedule policy in the specified project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
UpdateSnapshotSchedulePolicyRequest request =
UpdateSnapshotSchedulePolicyRequest.newBuilder()
.setSnapshotSchedulePolicy(SnapshotSchedulePolicy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
SnapshotSchedulePolicy response =
bareMetalSolutionClient.updateSnapshotSchedulePolicy(request);
}
Name | Description |
request | UpdateSnapshotSchedulePolicyRequest The request object containing all of the parameters for the API call. |
Type | Description |
SnapshotSchedulePolicy |
updateSnapshotSchedulePolicyCallable()
public final UnaryCallable<UpdateSnapshotSchedulePolicyRequest,SnapshotSchedulePolicy> updateSnapshotSchedulePolicyCallable()
Update a snapshot schedule policy in the specified project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
UpdateSnapshotSchedulePolicyRequest request =
UpdateSnapshotSchedulePolicyRequest.newBuilder()
.setSnapshotSchedulePolicy(SnapshotSchedulePolicy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<SnapshotSchedulePolicy> future =
bareMetalSolutionClient.updateSnapshotSchedulePolicyCallable().futureCall(request);
// Do something.
SnapshotSchedulePolicy response = future.get();
}
Type | Description |
UnaryCallable<UpdateSnapshotSchedulePolicyRequest,SnapshotSchedulePolicy> |
updateVolumeAsync(UpdateVolumeRequest request)
public final OperationFuture<Volume,OperationMetadata> updateVolumeAsync(UpdateVolumeRequest request)
Update details of a single storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
UpdateVolumeRequest request =
UpdateVolumeRequest.newBuilder()
.setVolume(Volume.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Volume response = bareMetalSolutionClient.updateVolumeAsync(request).get();
}
Name | Description |
request | UpdateVolumeRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Volume,OperationMetadata> |
updateVolumeAsync(Volume volume, FieldMask updateMask)
public final OperationFuture<Volume,OperationMetadata> updateVolumeAsync(Volume volume, FieldMask updateMask)
Update details of a single storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
Volume volume = Volume.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Volume response = bareMetalSolutionClient.updateVolumeAsync(volume, updateMask).get();
}
Name | Description |
volume | Volume Required. The volume to update. The |
updateMask | FieldMask The list of fields to update. The only currently supported fields are:
|
Type | Description |
OperationFuture<Volume,OperationMetadata> |
updateVolumeCallable()
public final UnaryCallable<UpdateVolumeRequest,Operation> updateVolumeCallable()
Update details of a single storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
UpdateVolumeRequest request =
UpdateVolumeRequest.newBuilder()
.setVolume(Volume.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
bareMetalSolutionClient.updateVolumeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateVolumeRequest,Operation> |
updateVolumeOperationCallable()
public final OperationCallable<UpdateVolumeRequest,Volume,OperationMetadata> updateVolumeOperationCallable()
Update details of a single storage volume.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
UpdateVolumeRequest request =
UpdateVolumeRequest.newBuilder()
.setVolume(Volume.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<Volume, OperationMetadata> future =
bareMetalSolutionClient.updateVolumeOperationCallable().futureCall(request);
// Do something.
Volume response = future.get();
}
Type | Description |
OperationCallable<UpdateVolumeRequest,Volume,OperationMetadata> |