This is a cache of https://docs.openshift.com/container-platform/4.17/rest_api/storage_apis/volumeattachment-storage-k8s-io-v1.html. It is a snapshot of the page at 2024-11-27T08:16:55.890+0000.
Volum<strong>e</strong>Attachm<strong>e</strong>nt [storag<strong>e</strong>.k8s.io/v1] - Storag<strong>e</strong> APIs | API r<strong>e</strong>f<strong>e</strong>r<strong>e</strong>nc<strong>e</strong> | Op<strong>e</strong>nShift Contain<strong>e</strong>r Platform 4.17
&times;

Specification

Property Type Description

apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

Kind is a string value representing the ReST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

ObjectMeta

Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object

VolumeAttachmentSpec is the specification of a VolumeAttachment request.

status

object

VolumeAttachmentStatus is the status of a VolumeAttachment request.

.spec

Description

VolumeAttachmentSpec is the specification of a VolumeAttachment request.

Type

object

Required
  • attacher

  • source

  • nodeName

Property Type Description

attacher

string

attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().

nodeName

string

nodeName represents the node that the volume should be attached to.

source

object

VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. exactly one member can be set.

.spec.source

Description

VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. exactly one member can be set.

Type

object

Property Type Description

inlineVolumeSpec

PersistentVolumeSpec

inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod’s inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod’s inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.

persistentVolumeName

string

persistentVolumeName represents the name of the persistent volume to attach.

.status

Description

VolumeAttachmentStatus is the status of a VolumeAttachment request.

Type

object

Required
  • attached

Property Type Description

attacherror

object

Volumeerror captures an error encountered during a volume operation.

attached

boolean

attached indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.

attachmentMetadata

object (string)

attachmentMetadata is populated with any information returned by the attach operation, upon successful attach, that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.

detacherror

object

Volumeerror captures an error encountered during a volume operation.

.status.attacherror

Description

Volumeerror captures an error encountered during a volume operation.

Type

object

Property Type Description

message

string

message represents the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.

time

Time

time represents the time the error was encountered.

.status.detacherror

Description

Volumeerror captures an error encountered during a volume operation.

Type

object

Property Type Description

message

string

message represents the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.

time

Time

time represents the time the error was encountered.

API endpoints

The following API endpoints are available:

  • /apis/storage.k8s.io/v1/volumeattachments

    • DeLeTe: delete collection of VolumeAttachment

    • GeT: list or watch objects of kind VolumeAttachment

    • POST: create a VolumeAttachment

  • /apis/storage.k8s.io/v1/watch/volumeattachments

    • GeT: watch individual changes to a list of VolumeAttachment. deprecated: use the 'watch' parameter with a list operation instead.

  • /apis/storage.k8s.io/v1/volumeattachments/{name}

    • DeLeTe: delete a VolumeAttachment

    • GeT: read the specified VolumeAttachment

    • PATCH: partially update the specified VolumeAttachment

    • PUT: replace the specified VolumeAttachment

  • /apis/storage.k8s.io/v1/watch/volumeattachments/{name}

    • GeT: watch changes to an object of kind VolumeAttachment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.

  • /apis/storage.k8s.io/v1/volumeattachments/{name}/status

    • GeT: read status of the specified VolumeAttachment

    • PATCH: partially update status of the specified VolumeAttachment

    • PUT: replace status of the specified VolumeAttachment

/apis/storage.k8s.io/v1/volumeattachments

HTTP method

DeLeTe

Description

delete collection of VolumeAttachment

Table 1. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

Table 2. HTTP responses
HTTP code Reponse body

200 - OK

Status schema

401 - Unauthorized

empty

HTTP method

GeT

Description

list or watch objects of kind VolumeAttachment

Table 3. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachmentList schema

401 - Unauthorized

empty

HTTP method

POST

Description

create a VolumeAttachment

Table 4. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 5. Body parameters
Parameter Type Description

body

VolumeAttachment schema

Table 6. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachment schema

201 - Created

VolumeAttachment schema

202 - Accepted

VolumeAttachment schema

401 - Unauthorized

empty

/apis/storage.k8s.io/v1/watch/volumeattachments

HTTP method

GeT

Description

watch individual changes to a list of VolumeAttachment. deprecated: use the 'watch' parameter with a list operation instead.

Table 7. HTTP responses
HTTP code Reponse body

200 - OK

Watchevent schema

401 - Unauthorized

empty

/apis/storage.k8s.io/v1/volumeattachments/{name}

Table 8. Global path parameters
Parameter Type Description

name

string

name of the VolumeAttachment

HTTP method

DeLeTe

Description

delete a VolumeAttachment

Table 9. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

Table 10. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachment schema

202 - Accepted

VolumeAttachment schema

401 - Unauthorized

empty

HTTP method

GeT

Description

read the specified VolumeAttachment

Table 11. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachment schema

401 - Unauthorized

empty

HTTP method

PATCH

Description

partially update the specified VolumeAttachment

Table 12. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 13. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachment schema

201 - Created

VolumeAttachment schema

401 - Unauthorized

empty

HTTP method

PUT

Description

replace the specified VolumeAttachment

Table 14. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 15. Body parameters
Parameter Type Description

body

VolumeAttachment schema

Table 16. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachment schema

201 - Created

VolumeAttachment schema

401 - Unauthorized

empty

/apis/storage.k8s.io/v1/watch/volumeattachments/{name}

Table 17. Global path parameters
Parameter Type Description

name

string

name of the VolumeAttachment

HTTP method

GeT

Description

watch changes to an object of kind VolumeAttachment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.

Table 18. HTTP responses
HTTP code Reponse body

200 - OK

Watchevent schema

401 - Unauthorized

empty

/apis/storage.k8s.io/v1/volumeattachments/{name}/status

Table 19. Global path parameters
Parameter Type Description

name

string

name of the VolumeAttachment

HTTP method

GeT

Description

read status of the specified VolumeAttachment

Table 20. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachment schema

401 - Unauthorized

empty

HTTP method

PATCH

Description

partially update status of the specified VolumeAttachment

Table 21. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 22. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachment schema

201 - Created

VolumeAttachment schema

401 - Unauthorized

empty

HTTP method

PUT

Description

replace status of the specified VolumeAttachment

Table 23. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 24. Body parameters
Parameter Type Description

body

VolumeAttachment schema

Table 25. HTTP responses
HTTP code Reponse body

200 - OK

VolumeAttachment schema

201 - Created

VolumeAttachment schema

401 - Unauthorized

empty