public interface DeletableResource
Modifier and Type | Method and Description |
---|---|
TaskResource |
delete(String resourceId,
RequestOption... options)
Deletes the resource identified by the provided
resourceId . |
TaskResource delete(String resourceId, RequestOption... options)
resourceId
.
Depending on the resource type, the delete 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 delete action completes.
The following example shows how to specify the timeout:
String resourceName = "someResourceName";
SomeResource resource = client.getByName(resourceName);
TaskResource task = client.delete(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.