public interface PatchableResource
| Modifier and Type | Method and Description |
|---|---|
TaskResource |
patch(String resourceId,
Patch patch,
RequestOption... options)
Applies a patch on the resource identified by
resourceId according to the
provided Patch object. |
TaskResource patch(String resourceId, Patch patch, RequestOption... options)
resourceId according to the
provided Patch object.
Depending on the resource type, the patch 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 patch action completes.
The following example shows how to specify the timeout:
SomeClient client = oneViewClient.someClient();
SomeResource resource = client.getByName("resourceName");
Patch patch = new Patch();
TaskResource task = client.patch(resource.getResourceId(), patch, TaskTimeout.of(5000)); //5 secs
resourceId - resource identifier as seen in HPE OneView.patch - object containing the patch details that should be applied on the
specified resource.options - varargs of RequestOption, which can be used to specify
some request options.TaskResource task containing the result of this request.Copyright © 2016. All rights reserved.