Change disaster recovery state of a file system

NAS File Storage REST API v7 Reference

Version
14.7.x
14.6.x
Audience
anonymous
Part Number
MK-92HNAS088-05

Changes the disaster recovery state of a file system.

HTTP request syntax (URI)

PATCH <base_URI>/v7/storage/filesystems/{id}/change-dr-state

Parameters

Name Type Required Values Description
id URI_PARAM Y string Specifies either the file system object ID or the HNAS storage file system ID.
transitionOption BODY Y string Transition state of the disaster recovery. Current supported values are:
  • READ_WRITE
  • READ_ONLY
  • REPLICATION_TARGET
snapshotName BODY N string Snapshot name.
isRecoverSharesOnPromoted BODY N boolean True if shares are recovered on a promoted file system. The default value is True.
isRecoverExportsOnPromoted BODY N boolean True if exports are recovered on a promoted file system. The default value is True.
isDeleteSharesFromDemoted BODY N boolean True if shares are deleted from a promoted file system. The default value is True.
isDeleteExportsFromDemoted BODY N boolean True if exports are deleted from a promoted file system. The default value is True.

Return codes

Code Data Description
204 No Data Changed disaster recovery state of the file system object successfully.
400 No Data Missing or invalid request contents.
404 Error Message Requested resource not found.
500 Error message Error associated with the storage system.
501 No Data Server has not implemented the request operation on the resource.

Any HTTP status code other than 204 indicates that the API did not complete successfully.

Request example: Using the file system object ID

curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v7/storage/filesystems/38363646463637454244453645434133303030303030303030303030303030303a3a3a303a3a3a4f49445f24232140255f56/change-dr-state -X PATCH -d '{"transitionOption":"READ_ONLY"}'

Response example: Using the file system object ID

HTTP/1.1 204 No Content

Request example: Using the HNAS storage file system ID

curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v7/storage/filesystems/8659E4DE8E2FF4EA0000000000000000/change-dr-state -X PATCH -d '{"transitionOption":"READ_ONLY"}'

Response example: Using the HNAS storage file system ID

HTTP/1.1 204 No Content