• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V2 Interfaces
  5. Volumes
  6. Set volume readonly

Set volume readonly

Function Description

This interface is used to configure whether a volume is read-only.

Interface Format

Method

URI

Description

POST

v2/[tenant_id]/volumes/[volume_id]/action

action='os-update_readonly_flag'

This interface is used to configure whether a volume is read-only.

Restrictions

N/A

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Remarks

readonly

Bool

Yes

Configures whether a volume is read-only.

Response Parameter

N/A

Request Example

POST
https://volume.localdomain.com:8776/v2/fa9acd30b02d4704bbd62cd6fb24fe01/volumes/ff9920a4-8d7a-49a9-9991-e28e355588cf/actionhttps://volume.localdomain.com:8776/v2/fa9acd30b02d4704bbd62cd6fb24fe01/volumes/ff9920a4-8d7a-49a9-9991-e28e355588cf/action
{
" os-update_readonly_flag ": {
" readonly": " true",
}
}

Response Example

N/A

Error Code

See section Processing Return Code.