Replacing the Status of a Specified PersistentVolume
Function
This API is used to replace the status of a specified PersistentVolume.
The following field can be updated:
- status.phase
Request
Request parameters:
For the description about request parameters, see Table 2.
Example request:
{
"kind": "PersistentVolume",
"apiVersion": "v1",
"metadata": {
"name": "pv-test",
"selfLink": "/api/v1/persistentvolumes/pv-test",
"uid": "e0b9c5e3-fcfc-11e7-9c3c-fa163eb8ad1a",
"resourceVersion": "189565",
"creationTimestamp": "2018-01-19T09:41:09Z",
"labels": {
"app": "test"
}
},
"spec": {
"capacity": {
"storage": "1Gi"
},
"hostPath": {
"path": "/home"
},
"accessModes": [
"ReadWriteMany"
],
"persistentVolumeReclaimPolicy": "Delete"
},
"status": {
"phase": "Bound"
}
}
Response
Response parameters:
For the description about response parameters, see Table 2.
Example response:
{
"kind": "PersistentVolume",
"apiVersion": "v1",
"metadata": {
"name": "pv-test",
"namespace": "default",
"selfLink": "/api/v1/namespaces/default/persistentvolumes/pv-test",
"uid": "e0b9c5e3-fcfc-11e7-9c3c-fa163eb8ad1a",
"resourceVersion": "599899",
"creationTimestamp": "2018-01-19T09:41:09Z",
"labels": {
"name": "pv-test"
},
"enable": true
},
"spec": {
"capacity": {
"storage": "1Gi"
},
"hostPath": {
"path": "/home"
},
"accessModes": [
"ReadWriteMany"
],
"persistentVolumeReclaimPolicy": "Delete"
},
"status": {
"phase": "Available"
}
}
Status Code
Table 2 describes the status code of this API.
|
Status Code |
Description |
|---|---|
|
200 |
This operation succeeds, and a PersistentVolume resource object is returned. |
For the description about error status codes, see Status Code.
Last Article: Replacing a Specified PersistentVolume
Next Article: Listing All PersistentVolumes
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.