> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nscale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List volume classes

> Lists provider-neutral VolumeClasses from Regions visible to the caller. Repeat the regionID query parameter to narrow results to one or more Regions. Missing or inaccessible Regions are omitted, so selectors can produce an empty or partial list. Media and performance caps are returned only when published by the Region.



## OpenAPI

````yaml /openapi/region-openapi.yaml get /api/v2/volumeclasses
openapi: 3.0.3
info:
  title: Region Service API
  description: >-
    Cloud region discovery and routing service.  This is service not intended
    for direct access

    by end users.  Region related functionality is typically exposed by higher
    level services

    e.g. Compute and Kubernetes, that provide subsets of resources that are
    compatible with

    that service.
  version: 1.13.0
servers:
  - url: https://region.nks.europe-west4.nscale.com
    description: Production
security: []
paths:
  /api/v2/volumeclasses:
    description: >-
      Lists provider-neutral block-storage classes available from Regions
      visible to the caller. Results can be narrowed to one or more Regions.
    get:
      tags:
        - Volume classes
      summary: List volume classes
      description: >-
        Lists provider-neutral VolumeClasses from Regions visible to the caller.
        Repeat the regionID query parameter to narrow results to one or more
        Regions. Missing or inaccessible Regions are omitted, so selectors can
        produce an empty or partial list. Media and performance caps are
        returned only when published by the Region.
      parameters:
        - $ref: '#/components/parameters/regionIDQueryParameter'
      responses:
        '200':
          $ref: '#/components/responses/volumeClassListV2Response'
        '400':
          $ref: '#/components/responses/badRequestResponse'
        '401':
          $ref: '#/components/responses/unauthorizedResponse'
        '403':
          $ref: '#/components/responses/forbiddenResponse'
        '500':
          $ref: '#/components/responses/internalServerErrorResponse'
      security:
        - oauth2Authentication: []
components:
  parameters:
    regionIDQueryParameter:
      name: regionID
      in: query
      description: Allows resources to be filtered by region.
      schema:
        type: array
        items:
          type: string
  responses:
    volumeClassListV2Response:
      description: A list of provider-neutral block-storage volume classes.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/volumeClassListV2Read'
          example:
            - metadata:
                id: 44444444-4444-4444-4444-444444444444
                name: fast-nvme
                description: Latency-sensitive encrypted block storage
                creationTime: '1970-01-01T00:00:00Z'
              spec:
                regionId: ba39bff5-b0d8-4c60-89e5-ed1104356b4a
                minimumSizeGiB: 10
                maximumSizeGiB: 2048
                media: nvme
                performance:
                  maxIOPS: 25000
                  maxThroughputMiBps: 500
                encrypted: true
    badRequestResponse:
      description: |-
        Request body failed schema validation, or the request does not contain
        all the required fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: invalid_request
            error_description: request body invalid
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
    unauthorizedResponse:
      description: Authentication failed or the access token has expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: access_denied
            error_description: authentication failed
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
    forbiddenResponse:
      description: >-
        Request was denied by authorization, this may be caused by the
        authorization

        token not having the required scope for an API, or the user doesn't have
        the

        necessary privileges on the provider platform.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: forbidden
            error_description: user credentials do not have the required privileges
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
    internalServerErrorResponse:
      description: >-
        An unexpected or unhandled error occurred. This may be a transient error
        and

        may succeed on a retry.  If this isn't the case, please report it as an
        issue.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: server_error
            error_description: failed to token claim
            trace_id: 57bc14d9bd461f0b5a72db830149b67a
  schemas:
    volumeClassListV2Read:
      description: A list of provider-neutral block-storage volume classes.
      type: array
      items:
        $ref: '#/components/schemas/volumeClassV2Read'
    error:
      description: Generic error message, compatible with oauth2.
      type: object
      required:
        - error
        - error_description
      properties:
        error:
          description: >-
            A terse error string expanding on the HTTP error code. Errors are
            based on the OAuth 2.02 specification, but are expanded with
            proprietary status codes for APIs other than those specified by
            OAuth 2.02.
          type: string
          enum:
            - invalid_request
            - server_error
            - access_denied
            - not_found
            - conflict
            - method_not_allowed
            - unsupported_media_type
            - request_entity_too_large
            - unprocessable_content
            - forbidden
        error_description:
          description: Verbose message describing the error.
          type: string
        trace_id:
          description: Unique trace identifier for the request.
          type: string
    volumeClassV2Read:
      description: A provider-neutral block-storage volume class available in a Region.
      type: object
      required:
        - metadata
        - spec
      properties:
        metadata:
          $ref: '#/components/schemas/staticResourceMetadata'
        spec:
          $ref: '#/components/schemas/volumeClassV2Spec'
    staticResourceMetadata:
      description: |
        This metadata is for resources that just exist, and don't require
        any provisioning and health status, but benefit from a standardized
        metadata format.
      type: object
      allOf:
        - $ref: '#/components/schemas/resourceMetadata'
        - type: object
          required:
            - id
            - creationTime
          properties:
            id:
              description: The unique resource ID.
              type: string
            creationTime:
              description: The time the resource was created.
              type: string
              format: date-time
            createdBy:
              description: The user who created the resource.
              type: string
            modifiedTime:
              description: The time a resource was updated.
              type: string
              format: date-time
            modifiedBy:
              description: The user who updated the resource.
              type: string
    volumeClassV2Spec:
      description: >-
        Provider-neutral capabilities advertised by a block-storage volume
        class.
      type: object
      required:
        - regionId
        - encrypted
      properties:
        regionId:
          description: The Region that owns this volume class inventory entry.
          allOf:
            - $ref: '#/components/schemas/regionId'
        minimumSizeGiB:
          description: >-
            Operator-configured minimum volume capacity accepted by this class,
            in whole GiB.
          type: integer
          format: int64
          minimum: 1
        maximumSizeGiB:
          description: >-
            Operator-configured maximum volume capacity accepted by this class,
            in whole GiB.
          type: integer
          format: int64
          minimum: 1
        supportedFlavorIds:
          description: >-
            Optional allowlist of Region flavors compatible with this volume
            class. Omitted or empty means no compatibility restriction.
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/flavorId'
        media:
          $ref: '#/components/schemas/volumeClassV2Media'
        performance:
          $ref: '#/components/schemas/volumeClassV2Performance'
        encrypted:
          description: >-
            Whether volumes created from this class are encrypted at rest by the
            provider.
          type: boolean
    resourceMetadata:
      description: Metadata required for all API resource reads and writes.
      required:
        - name
      properties:
        name:
          $ref: '#/components/schemas/kubernetesLabelValue'
        description:
          description: >-
            The resource description, this optionally augments the name with
            more context.
          type: string
        tags:
          $ref: '#/components/schemas/tagList'
    regionId:
      description: A region ID.
      type: string
      format: uuid
      x-go-type: regionids.RegionID
      x-go-type-import:
        name: regionids
        path: github.com/unikorn-cloud/region/pkg/ids
    flavorId:
      description: A flavor ID.
      type: string
      format: uuid
      x-go-type: regionids.FlavorID
      x-go-type-import:
        name: regionids
        path: github.com/unikorn-cloud/region/pkg/ids
    volumeClassV2Media:
      description: The physical storage medium backing a volume class.
      type: string
      enum:
        - hdd
        - ssd
        - nvme
    volumeClassV2Performance:
      description: Advertised performance caps; these are not guaranteed reservations.
      type: object
      properties:
        maxIOPS:
          description: Advertised maximum input/output operations per second.
          type: integer
          minimum: 1
        maxThroughputMiBps:
          description: Advertised maximum throughput in mebibytes per second.
          type: integer
          minimum: 1
    kubernetesLabelValue:
      description: >-
        A valid Kubernetes label value, typically used for resource names that
        can be

        indexed in the database.
      type: string
      pattern: ^[0-9A-Za-z](?:[0-9A-Za-z-_.]{0,61}[0-9A-Za-z])?$
    tagList:
      description: A list of tags.
      type: array
      items:
        $ref: '#/components/schemas/tag'
    tag:
      description: >-
        A tag mapping arbitrary names to values.  These have no special meaning

        for any component are are intended for use by end users to add
        additional

        context to a resource, for example to categorize it.
      type: object
      required:
        - name
        - value
      properties:
        name:
          description: A unique tag name.
          type: string
        value:
          description: The value of the tag.
          type: string
  securitySchemes:
    oauth2Authentication:
      description: Operation requires OAuth 2.0 bearer token authentication.
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://identity.nks.europe-west4.nscale.com/oauth2/v2/authorization
          tokenUrl: https://identity.nks.europe-west4.nscale.com/oauth2/v2/token
          scopes: {}

````