public interface RemovableResource
Modifier and Type | Method and Description |
---|---|
TaskResource |
remove(String resourceId,
RequestOption... options)
Removes the resource identified by the provided
resourceId . |
TaskResource remove(String resourceId, RequestOption... options)
resourceId
.
Depending on the resource type, the remove action can take some time to complete.
Therefore, you can specify a timeout using an implementation of RequestOption
called TaskTimeout
. If no timeout is
specified, the default behavior is to wait until the remove action completes.
The following example shows how to specify the timeout:
String resourceName = "someResourceName";
SomeResource resource = client.getByName(resourceName);
TaskResource task = client.remove(resource.getResourceId(), TaskTimeout.of(5000)); //5 secs
resourceId
- resource identifier as seen in HPE OneView.options
- varargs
of RequestOption
, which can be used to specify
some request options.TaskResource
task containing the result of this request.Copyright © 2017. All rights reserved.