hnhdigital-os/php-linode-api

View on GitHub
spec-old/Volumes.yml

Summary

Maintainability
Test Coverage
endpoint: volumes
description: Manage your Block Storage Volumes.
url: https://developers.linode.com/v4/reference/endpoints/volumes
load-method: search

get:

  search:
    url: https://developers.linode.com/v4/reference/endpoints/volumes#GET
    description: Returns a list of volumes.
    endpoint: 
    search: true

    factory:
      class: Volume
      parameters:
        - id

post:

  create:
    description: Create a new Block Storage Volume
    url: https://developers.linode.com/v4/reference/endpoints/volumes#POST
    endpoint:

    factory:
      class: Volume
      parameters:
        - id

    parameters:

      region:
        type: string
        description: Which region the new volume should be created in.

      label:
        type: string
        description: A unique label to identify your new volume with.

    optional:

      size:
        type: int
        default: 20
        description: The size in GiBs that you wish to make your new volume. Defaults to 20 GiB, can be as large as 1024 GiB (1 TiB).
        validation:
          range: 1-1024

      linode_id:
        type: int
        description: An id to a Linode you'd like this volume to be attached to after creation. Requires an additional scope of `linode:modify` and you must have permission to access that given Linode.

      config_id:
        type: int
        description: An id to a Linode configuration profile to used when attaching to a Linode that has more than one configuration profile.