• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V3 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

/v3/{project_id}/volumes/{volume_id}/action

action='os-update_readonly_flag'

Configures whether a volume is read-only.

Restrictions

N/A

Extension Description

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/v3/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.