Skip to content

Latest commit

 

History

History
261 lines (170 loc) · 8.41 KB

ObjectStorageApi.md

File metadata and controls

261 lines (170 loc) · 8.41 KB

Upcloud\ApiClient\ObjectStorageApi

All URIs are relative to https://api.upcloud.com/1.3

Method HTTP request Description
getListObjectStorage GET /object-storage List all Object Storage
getObjectStorageDetails GET /object-storage/{uuid} Get Object Storage details
createObjectStorage POST /object-storage Create a new Object Storage
modifyObjectStorage PATCH /object-storage/{id} Modify Object Storage
deleteObjectStorage DELETE /object-storage/{id} Release Object Storage

getListObjectStorage

\Upcloud\ApiClient\Model\ObjectStorageListResponse getListObjectStorage()

List Object Storage

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: baseAuth
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi();

try {
    $result = $api_instance->getListObjectStorage();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ObjectStorageApi->getListObjectStorage: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Upcloud\ApiClient\Model\ObjectStorageListResponse

Authorization

baseAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getObjectStorageDetails

\Upcloud\ApiClient\Model\ObjectStorageResponse getObjectStorageDetails($uuid)

Get Object Storage details

Returns detailed information about a specific object storage.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: baseAuth
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi();
$uuid = "uuid_example"; // string | ObjectStorage uuid

try {
    $result = $api_instance->getObjectStorageDetails($uuid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ObjectStorageApi->getObjectStorageDetails: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
uuid string ObjectStorage uuid

Return type

\Upcloud\ApiClient\Model\ObjectStorageResponse

Authorization

baseAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createObjectStorage

\Upcloud\ApiClient\Model\ObjectStorageResponse createObjectStorage($storage)

Create a new Object Storage

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: baseAuth
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi();
$storage = new \Upcloud\ApiClient\Model\CreateObjectStorageRequest(); // \Upcloud\ApiClient\Model\CreateObjectStorageRequest |

try {
    $result = $api_instance->createObjectStorage($storage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ObjectStorageApi->createObjectStorage: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
storage \Upcloud\ApiClient\Model\CreateObjectStorageRequest

Return type

\Upcloud\ApiClient\Model\ObjectStorageResponse

Authorization

baseAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

modifyObjectStorage

\Upcloud\ApiClient\Model\ObjectStorageResponse modifyObjectStorage($uuid, $storage)

Modify Object Storage

Modifies description of a specific Object Storage.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: baseAuth
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi();
$uuid = "uuid_example"; // string | ObjectStorage uuid
$storage = new \Upcloud\ApiClient\Model\ModifyObjectStorageRequest(); // \Upcloud\ApiClient\Model\ModifyObjectStorageRequest |

try {
    $result = $api_instance->modifyObjectStorage($uuid, $storage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ObjectStorageApi->modifyObjectStorage: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
uuid string ObjectStorage uuid
storage \Upcloud\ApiClient\Model\ModifyObjectStorageRequest

Return type

\Upcloud\ApiClient\Model\ObjectStorageResponse

Authorization

baseAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteObjectStorage

deleteObjectStorage($uuid)

Delete Object Storage

Note that deleting the storage will permanently delete any data on the device and which cannot be reverted.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: baseAuth
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi();
$uuid = "uuid_example"; // string | ObjectStorage uuid

try {
    $api_instance->deleteObjectStorage($uuid);
} catch (Exception $e) {
    echo 'Exception when calling ObjectStorageApi->deleteObjectStorage: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
uuid string ObjectStorage uuid

Return type

void (empty response body)

Authorization

baseAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]