@RestController
@RequestMapping(value="/rest",
produces={"application/xml","application/json"})
public class StoragePolicyRestController
extends HerdBaseController
| Modifier and Type | Field and Description |
|---|---|
static String |
STORAGE_POLICIES_URI_PREFIX |
| Constructor and Description |
|---|
StoragePolicyRestController() |
| Modifier and Type | Method and Description |
|---|---|
StoragePolicy |
createStoragePolicy(StoragePolicyCreateRequest request)
Creates a new storage policy.
|
StoragePolicy |
getStoragePolicy(String namespace,
String storagePolicyName)
Gets an existing storage policy by key.
|
StoragePolicy |
updateStoragePolicy(String namespace,
String storagePolicyName,
StoragePolicyUpdateRequest request)
Updates an existing storage policy by key.
|
addPagingHttpHeaders, validateNoDuplicateQueryStringParamspublic static final String STORAGE_POLICIES_URI_PREFIX
@RequestMapping(value="/storagePolicies",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_STORAGE_POLICIES_POST")
public StoragePolicy createStoragePolicy(@RequestBody
StoragePolicyCreateRequest request)
Requires WRITE permission on storage policy namespace and storage policy filter namespace
request - the information needed to create the storage policy@RequestMapping(value="/storagePolicies/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}",
method=PUT,
consumes={"application/xml","application/json"})
@Secured(value="FN_STORAGE_POLICIES_PUT")
public StoragePolicy updateStoragePolicy(@PathVariable(value="namespace")
String namespace,
@PathVariable(value="storagePolicyName")
String storagePolicyName,
@RequestBody
StoragePolicyUpdateRequest request)
Requires WRITE permission on storage policy namespace and storage policy filter namespace
namespace - the namespacestoragePolicyName - the storage policy namerequest - the information needed to update the storage policy@RequestMapping(value="/storagePolicies/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}",
method=GET)
@Secured(value="FN_STORAGE_POLICIES_GET")
public StoragePolicy getStoragePolicy(@PathVariable(value="namespace")
String namespace,
@PathVariable(value="storagePolicyName")
String storagePolicyName)
Requires READ permission on namespace
namespace - the namespacestoragePolicyName - the storage policy nameCopyright © 2019. All rights reserved.