Initial commit
This commit is contained in:
parent
6ae7915bed
commit
1471ce6ba4
546 changed files with 143609 additions and 0 deletions
264
docs/Api/DefaultApi.md
Normal file
264
docs/Api/DefaultApi.md
Normal file
|
|
@ -0,0 +1,264 @@
|
|||
# OpenAPI\Client\DefaultApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**attachServerVolume()**](DefaultApi.md#attachServerVolume) | **POST** /instance/v1/zones/{zone}/servers/{server_id}/attach-volume | |
|
||||
| [**checkBlockMigrationOrganizationQuotas()**](DefaultApi.md#checkBlockMigrationOrganizationQuotas) | **POST** /instance/v1/zones/{zone}/block-migration/check-organization-quotas | |
|
||||
| [**detachServerVolume()**](DefaultApi.md#detachServerVolume) | **POST** /instance/v1/zones/{zone}/servers/{server_id}/detach-volume | |
|
||||
| [**getDashboard()**](DefaultApi.md#getDashboard) | **GET** /instance/v1/zones/{zone}/dashboard | |
|
||||
|
||||
|
||||
## `attachServerVolume()`
|
||||
|
||||
```php
|
||||
attachServerVolume($zone, $server_id, $attach_server_volume_request): \OpenAPI\Client\Model\ScalewayInstanceV1AttachServerVolumeResponse
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\DefaultApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string
|
||||
$attach_server_volume_request = new \OpenAPI\Client\Model\AttachServerVolumeRequest(); // \OpenAPI\Client\Model\AttachServerVolumeRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->attachServerVolume($zone, $server_id, $attach_server_volume_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling DefaultApi->attachServerVolume: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| | |
|
||||
| **attach_server_volume_request** | [**\OpenAPI\Client\Model\AttachServerVolumeRequest**](../Model/AttachServerVolumeRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1AttachServerVolumeResponse**](../Model/ScalewayInstanceV1AttachServerVolumeResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `checkBlockMigrationOrganizationQuotas()`
|
||||
|
||||
```php
|
||||
checkBlockMigrationOrganizationQuotas($zone, $check_block_migration_organization_quotas_request)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\DefaultApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$check_block_migration_organization_quotas_request = new \OpenAPI\Client\Model\CheckBlockMigrationOrganizationQuotasRequest(); // \OpenAPI\Client\Model\CheckBlockMigrationOrganizationQuotasRequest
|
||||
|
||||
try {
|
||||
$apiInstance->checkBlockMigrationOrganizationQuotas($zone, $check_block_migration_organization_quotas_request);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling DefaultApi->checkBlockMigrationOrganizationQuotas: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **check_block_migration_organization_quotas_request** | [**\OpenAPI\Client\Model\CheckBlockMigrationOrganizationQuotasRequest**](../Model/CheckBlockMigrationOrganizationQuotasRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `detachServerVolume()`
|
||||
|
||||
```php
|
||||
detachServerVolume($zone, $server_id, $detach_server_volume_request): \OpenAPI\Client\Model\ScalewayInstanceV1DetachServerVolumeResponse
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\DefaultApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string
|
||||
$detach_server_volume_request = new \OpenAPI\Client\Model\DetachServerVolumeRequest(); // \OpenAPI\Client\Model\DetachServerVolumeRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->detachServerVolume($zone, $server_id, $detach_server_volume_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling DefaultApi->detachServerVolume: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| | |
|
||||
| **detach_server_volume_request** | [**\OpenAPI\Client\Model\DetachServerVolumeRequest**](../Model/DetachServerVolumeRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1DetachServerVolumeResponse**](../Model/ScalewayInstanceV1DetachServerVolumeResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getDashboard()`
|
||||
|
||||
```php
|
||||
getDashboard($zone, $organization, $project): \OpenAPI\Client\Model\ScalewayInstanceV1GetDashboardResponse
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\DefaultApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$organization = 'organization_example'; // string
|
||||
$project = 'project_example'; // string
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getDashboard($zone, $organization, $project);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling DefaultApi->getDashboard: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **organization** | **string**| | [optional] |
|
||||
| **project** | **string**| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetDashboardResponse**](../Model/ScalewayInstanceV1GetDashboardResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
345
docs/Api/IPsApi.md
Normal file
345
docs/Api/IPsApi.md
Normal file
|
|
@ -0,0 +1,345 @@
|
|||
# OpenAPI\Client\IPsApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**createIp()**](IPsApi.md#createIp) | **POST** /instance/v1/zones/{zone}/ips | Reserve a flexible IP |
|
||||
| [**deleteIp()**](IPsApi.md#deleteIp) | **DELETE** /instance/v1/zones/{zone}/ips/{ip} | Delete a flexible IP |
|
||||
| [**getIp()**](IPsApi.md#getIp) | **GET** /instance/v1/zones/{zone}/ips/{ip} | Get a flexible IP |
|
||||
| [**listIps()**](IPsApi.md#listIps) | **GET** /instance/v1/zones/{zone}/ips | List all flexible IPs |
|
||||
| [**updateIp()**](IPsApi.md#updateIp) | **PATCH** /instance/v1/zones/{zone}/ips/{ip} | Update a flexible IP |
|
||||
|
||||
|
||||
## `createIp()`
|
||||
|
||||
```php
|
||||
createIp($zone, $create_ip_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreateIpResponse
|
||||
```
|
||||
|
||||
Reserve a flexible IP
|
||||
|
||||
Reserve a flexible IP and attach it to the specified Instance.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\IPsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$create_ip_request = new \OpenAPI\Client\Model\CreateIpRequest(); // \OpenAPI\Client\Model\CreateIpRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createIp($zone, $create_ip_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling IPsApi->createIp: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **create_ip_request** | [**\OpenAPI\Client\Model\CreateIpRequest**](../Model/CreateIpRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreateIpResponse**](../Model/ScalewayInstanceV1CreateIpResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deleteIp()`
|
||||
|
||||
```php
|
||||
deleteIp($zone, $ip)
|
||||
```
|
||||
|
||||
Delete a flexible IP
|
||||
|
||||
Delete the IP with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\IPsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$ip = 'ip_example'; // string | ID or address of the IP to delete.
|
||||
|
||||
try {
|
||||
$apiInstance->deleteIp($zone, $ip);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling IPsApi->deleteIp: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **ip** | **string**| ID or address of the IP to delete. | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getIp()`
|
||||
|
||||
```php
|
||||
getIp($zone, $ip): \OpenAPI\Client\Model\ScalewayInstanceV1GetIpResponse
|
||||
```
|
||||
|
||||
Get a flexible IP
|
||||
|
||||
Get details of an IP with the specified ID or address.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\IPsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$ip = 'ip_example'; // string | IP ID or address to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getIp($zone, $ip);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling IPsApi->getIp: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **ip** | **string**| IP ID or address to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetIpResponse**](../Model/ScalewayInstanceV1GetIpResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listIps()`
|
||||
|
||||
```php
|
||||
listIps($zone, $project, $organization, $tags, $name, $per_page, $page, $type): \OpenAPI\Client\Model\ScalewayInstanceV1ListIpsResponse
|
||||
```
|
||||
|
||||
List all flexible IPs
|
||||
|
||||
List all flexible IPs in a specified zone.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\IPsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$project = 'project_example'; // string | Project ID in which the IPs are reserved.
|
||||
$organization = 'organization_example'; // string | Organization ID in which the IPs are reserved.
|
||||
$tags = 'tags_example'; // string | Filter IPs with these exact tags (to filter with several tags, use commas to separate them).
|
||||
$name = 'name_example'; // string | Filter on the IP address (Works as a LIKE operation on the IP address).
|
||||
$per_page = 56; // int | A positive integer lower or equal to 100 to select the number of items to return.
|
||||
$page = 56; // int | A positive integer to choose the page to return.
|
||||
$type = 'type_example'; // string | Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4' or 'routed_ipv6').
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listIps($zone, $project, $organization, $tags, $name, $per_page, $page, $type);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling IPsApi->listIps: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **project** | **string**| Project ID in which the IPs are reserved. | [optional] |
|
||||
| **organization** | **string**| Organization ID in which the IPs are reserved. | [optional] |
|
||||
| **tags** | **string**| Filter IPs with these exact tags (to filter with several tags, use commas to separate them). | [optional] |
|
||||
| **name** | **string**| Filter on the IP address (Works as a LIKE operation on the IP address). | [optional] |
|
||||
| **per_page** | **int**| A positive integer lower or equal to 100 to select the number of items to return. | [optional] |
|
||||
| **page** | **int**| A positive integer to choose the page to return. | [optional] |
|
||||
| **type** | **string**| Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4' or 'routed_ipv6'). | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListIpsResponse**](../Model/ScalewayInstanceV1ListIpsResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updateIp()`
|
||||
|
||||
```php
|
||||
updateIp($zone, $ip, $update_ip_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdateIpResponse
|
||||
```
|
||||
|
||||
Update a flexible IP
|
||||
|
||||
Update a flexible IP in the specified zone with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\IPsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$ip = 'ip_example'; // string | IP ID or IP address.
|
||||
$update_ip_request = new \OpenAPI\Client\Model\UpdateIpRequest(); // \OpenAPI\Client\Model\UpdateIpRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updateIp($zone, $ip, $update_ip_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling IPsApi->updateIp: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **ip** | **string**| IP ID or IP address. | |
|
||||
| **update_ip_request** | [**\OpenAPI\Client\Model\UpdateIpRequest**](../Model/UpdateIpRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdateIpResponse**](../Model/ScalewayInstanceV1UpdateIpResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
414
docs/Api/ImagesApi.md
Normal file
414
docs/Api/ImagesApi.md
Normal file
|
|
@ -0,0 +1,414 @@
|
|||
# OpenAPI\Client\ImagesApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**createImage()**](ImagesApi.md#createImage) | **POST** /instance/v1/zones/{zone}/images | Create an Instance image |
|
||||
| [**deleteImage()**](ImagesApi.md#deleteImage) | **DELETE** /instance/v1/zones/{zone}/images/{image_id} | Delete an Instance image |
|
||||
| [**getImage()**](ImagesApi.md#getImage) | **GET** /instance/v1/zones/{zone}/images/{image_id} | Get an Instance image |
|
||||
| [**listImages()**](ImagesApi.md#listImages) | **GET** /instance/v1/zones/{zone}/images | List Instance images |
|
||||
| [**setImage()**](ImagesApi.md#setImage) | **PUT** /instance/v1/zones/{zone}/images/{id} | Update image |
|
||||
| [**updateImage()**](ImagesApi.md#updateImage) | **PATCH** /instance/v1/zones/{zone}/images/{image_id} | Update image |
|
||||
|
||||
|
||||
## `createImage()`
|
||||
|
||||
```php
|
||||
createImage($zone, $create_image_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreateImageResponse
|
||||
```
|
||||
|
||||
Create an Instance image
|
||||
|
||||
Create an Instance image from the specified snapshot ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\ImagesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$create_image_request = new \OpenAPI\Client\Model\CreateImageRequest(); // \OpenAPI\Client\Model\CreateImageRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createImage($zone, $create_image_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling ImagesApi->createImage: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **create_image_request** | [**\OpenAPI\Client\Model\CreateImageRequest**](../Model/CreateImageRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreateImageResponse**](../Model/ScalewayInstanceV1CreateImageResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deleteImage()`
|
||||
|
||||
```php
|
||||
deleteImage($zone, $image_id)
|
||||
```
|
||||
|
||||
Delete an Instance image
|
||||
|
||||
Delete the image with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\ImagesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$image_id = 'image_id_example'; // string | UUID of the image you want to delete.
|
||||
|
||||
try {
|
||||
$apiInstance->deleteImage($zone, $image_id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling ImagesApi->deleteImage: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **image_id** | **string**| UUID of the image you want to delete. | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getImage()`
|
||||
|
||||
```php
|
||||
getImage($zone, $image_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetImageResponse
|
||||
```
|
||||
|
||||
Get an Instance image
|
||||
|
||||
Get details of an image with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\ImagesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$image_id = 'image_id_example'; // string | UUID of the image you want to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getImage($zone, $image_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling ImagesApi->getImage: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **image_id** | **string**| UUID of the image you want to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetImageResponse**](../Model/ScalewayInstanceV1GetImageResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listImages()`
|
||||
|
||||
```php
|
||||
listImages($zone, $organization, $per_page, $page, $name, $public, $arch, $project, $tags): \OpenAPI\Client\Model\ScalewayInstanceV1ListImagesResponse
|
||||
```
|
||||
|
||||
List Instance images
|
||||
|
||||
List all existing Instance images.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\ImagesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$organization = 'organization_example'; // string
|
||||
$per_page = 56; // int
|
||||
$page = 56; // int
|
||||
$name = 'name_example'; // string
|
||||
$public = True; // bool
|
||||
$arch = 'arch_example'; // string
|
||||
$project = 'project_example'; // string
|
||||
$tags = 'tags_example'; // string
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listImages($zone, $organization, $per_page, $page, $name, $public, $arch, $project, $tags);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling ImagesApi->listImages: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **organization** | **string**| | [optional] |
|
||||
| **per_page** | **int**| | [optional] |
|
||||
| **page** | **int**| | [optional] |
|
||||
| **name** | **string**| | [optional] |
|
||||
| **public** | **bool**| | [optional] |
|
||||
| **arch** | **string**| | [optional] |
|
||||
| **project** | **string**| | [optional] |
|
||||
| **tags** | **string**| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListImagesResponse**](../Model/ScalewayInstanceV1ListImagesResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setImage()`
|
||||
|
||||
```php
|
||||
setImage($zone, $id, $set_image_request): \OpenAPI\Client\Model\ScalewayInstanceV1SetImageResponse
|
||||
```
|
||||
|
||||
Update image
|
||||
|
||||
Replace all image properties with an image message.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\ImagesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$id = 'id_example'; // string
|
||||
$set_image_request = new \OpenAPI\Client\Model\SetImageRequest(); // \OpenAPI\Client\Model\SetImageRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->setImage($zone, $id, $set_image_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling ImagesApi->setImage: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **id** | **string**| | |
|
||||
| **set_image_request** | [**\OpenAPI\Client\Model\SetImageRequest**](../Model/SetImageRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1SetImageResponse**](../Model/ScalewayInstanceV1SetImageResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updateImage()`
|
||||
|
||||
```php
|
||||
updateImage($zone, $image_id, $update_image_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdateImageResponse
|
||||
```
|
||||
|
||||
Update image
|
||||
|
||||
Update the properties of an image.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\ImagesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$image_id = 6170692e-7363-616c-6577-61792e636f6d; // string | UUID of the image. (UUID format)
|
||||
$update_image_request = new \OpenAPI\Client\Model\UpdateImageRequest(); // \OpenAPI\Client\Model\UpdateImageRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updateImage($zone, $image_id, $update_image_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling ImagesApi->updateImage: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **image_id** | **string**| UUID of the image. (UUID format) | |
|
||||
| **update_image_request** | [**\OpenAPI\Client\Model\UpdateImageRequest**](../Model/UpdateImageRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdateImageResponse**](../Model/ScalewayInstanceV1UpdateImageResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
141
docs/Api/InstanceTypesApi.md
Normal file
141
docs/Api/InstanceTypesApi.md
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
# OpenAPI\Client\InstanceTypesApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**getServerTypesAvailability()**](InstanceTypesApi.md#getServerTypesAvailability) | **GET** /instance/v1/zones/{zone}/products/servers/availability | Get availability |
|
||||
| [**listServersTypes()**](InstanceTypesApi.md#listServersTypes) | **GET** /instance/v1/zones/{zone}/products/servers | List Instance types |
|
||||
|
||||
|
||||
## `getServerTypesAvailability()`
|
||||
|
||||
```php
|
||||
getServerTypesAvailability($zone, $per_page, $page): \OpenAPI\Client\Model\ScalewayInstanceV1GetServerTypesAvailabilityResponse
|
||||
```
|
||||
|
||||
Get availability
|
||||
|
||||
Get availability for all Instance types.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstanceTypesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$per_page = 56; // int | A positive integer lower or equal to 100 to select the number of items to return.
|
||||
$page = 56; // int | A positive integer to choose the page to return.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getServerTypesAvailability($zone, $per_page, $page);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstanceTypesApi->getServerTypesAvailability: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **per_page** | **int**| A positive integer lower or equal to 100 to select the number of items to return. | [optional] |
|
||||
| **page** | **int**| A positive integer to choose the page to return. | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetServerTypesAvailabilityResponse**](../Model/ScalewayInstanceV1GetServerTypesAvailabilityResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listServersTypes()`
|
||||
|
||||
```php
|
||||
listServersTypes($zone, $per_page, $page): \OpenAPI\Client\Model\ScalewayInstanceV1ListServersTypesResponse
|
||||
```
|
||||
|
||||
List Instance types
|
||||
|
||||
List available Instance types and their technical details.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstanceTypesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$per_page = 56; // int
|
||||
$page = 56; // int
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listServersTypes($zone, $per_page, $page);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstanceTypesApi->listServersTypes: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **per_page** | **int**| | [optional] |
|
||||
| **page** | **int**| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListServersTypesResponse**](../Model/ScalewayInstanceV1ListServersTypesResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
495
docs/Api/InstancesApi.md
Normal file
495
docs/Api/InstancesApi.md
Normal file
|
|
@ -0,0 +1,495 @@
|
|||
# OpenAPI\Client\InstancesApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**createServer()**](InstancesApi.md#createServer) | **POST** /instance/v1/zones/{zone}/servers | Create an Instance |
|
||||
| [**deleteServer()**](InstancesApi.md#deleteServer) | **DELETE** /instance/v1/zones/{zone}/servers/{server_id} | Delete an Instance |
|
||||
| [**getServer()**](InstancesApi.md#getServer) | **GET** /instance/v1/zones/{zone}/servers/{server_id} | Get an Instance |
|
||||
| [**listServerActions()**](InstancesApi.md#listServerActions) | **GET** /instance/v1/zones/{zone}/servers/{server_id}/action | List Instance actions |
|
||||
| [**listServers()**](InstancesApi.md#listServers) | **GET** /instance/v1/zones/{zone}/servers | List all Instances |
|
||||
| [**serverAction()**](InstancesApi.md#serverAction) | **POST** /instance/v1/zones/{zone}/servers/{server_id}/action | Perform action |
|
||||
| [**updateServer()**](InstancesApi.md#updateServer) | **PATCH** /instance/v1/zones/{zone}/servers/{server_id} | Update an Instance |
|
||||
|
||||
|
||||
## `createServer()`
|
||||
|
||||
```php
|
||||
createServer($zone, $create_server_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreateServerResponse
|
||||
```
|
||||
|
||||
Create an Instance
|
||||
|
||||
Create a new Instance of the specified commercial type in the specified zone. Pay attention to the volumes parameter, which takes an object which can be used in different ways to achieve different behaviors. Get more information in the [Technical Information](#technical-information) section of the introduction.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$create_server_request = new \OpenAPI\Client\Model\CreateServerRequest(); // \OpenAPI\Client\Model\CreateServerRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createServer($zone, $create_server_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstancesApi->createServer: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **create_server_request** | [**\OpenAPI\Client\Model\CreateServerRequest**](../Model/CreateServerRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreateServerResponse**](../Model/ScalewayInstanceV1CreateServerResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deleteServer()`
|
||||
|
||||
```php
|
||||
deleteServer($zone, $server_id)
|
||||
```
|
||||
|
||||
Delete an Instance
|
||||
|
||||
Delete the Instance with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string
|
||||
|
||||
try {
|
||||
$apiInstance->deleteServer($zone, $server_id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstancesApi->deleteServer: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getServer()`
|
||||
|
||||
```php
|
||||
getServer($zone, $server_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetServerResponse
|
||||
```
|
||||
|
||||
Get an Instance
|
||||
|
||||
Get the details of a specified Instance.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance you want to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getServer($zone, $server_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstancesApi->getServer: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance you want to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetServerResponse**](../Model/ScalewayInstanceV1GetServerResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listServerActions()`
|
||||
|
||||
```php
|
||||
listServerActions($zone, $server_id): \OpenAPI\Client\Model\ScalewayInstanceV1ListServerActionsResponse
|
||||
```
|
||||
|
||||
List Instance actions
|
||||
|
||||
List all actions (e.g. power on, power off, reboot) that can currently be performed on an Instance.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listServerActions($zone, $server_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstancesApi->listServerActions: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListServerActionsResponse**](../Model/ScalewayInstanceV1ListServerActionsResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listServers()`
|
||||
|
||||
```php
|
||||
listServers($zone, $per_page, $page, $organization, $project, $name, $private_ip, $without_ip, $with_ip, $commercial_type, $state, $tags, $private_network, $order, $private_networks, $private_nic_mac_address, $servers): \OpenAPI\Client\Model\ScalewayInstanceV1ListServersResponse
|
||||
```
|
||||
|
||||
List all Instances
|
||||
|
||||
List all Instances in a specified Availability Zone, e.g. `fr-par-1`.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$per_page = 56; // int | A positive integer lower or equal to 100 to select the number of items to return.
|
||||
$page = 56; // int | A positive integer to choose the page to return.
|
||||
$organization = 'organization_example'; // string | List only Instances of this Organization ID.
|
||||
$project = 'project_example'; // string | List only Instances of this Project ID.
|
||||
$name = 'name_example'; // string | Filter Instances by name (eg. \"server1\" will return \"server100\" and \"server1\" but not \"foo\").
|
||||
$private_ip = 1.2.3.4; // string | List Instances by private_ip. (IP address)
|
||||
$without_ip = True; // bool | List Instances that are not attached to a public IP.
|
||||
$with_ip = 1.2.3.4; // string | List Instances by IP (both private_ip and public_ip are supported). (IP address)
|
||||
$commercial_type = 'commercial_type_example'; // string | List Instances of this commercial type.
|
||||
$state = 'running'; // string | List Instances in this state.
|
||||
$tags = 'tags_example'; // string | List Instances with these exact tags (to filter with several tags, use commas to separate them).
|
||||
$private_network = 'private_network_example'; // string | List Instances in this Private Network.
|
||||
$order = 'creation_date_desc'; // string | Define the order of the returned servers.
|
||||
$private_networks = 'private_networks_example'; // string | List Instances from the given Private Networks (use commas to separate them).
|
||||
$private_nic_mac_address = 'private_nic_mac_address_example'; // string | List Instances associated with the given private NIC MAC address.
|
||||
$servers = 'servers_example'; // string | List Instances from these server ids (use commas to separate them).
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listServers($zone, $per_page, $page, $organization, $project, $name, $private_ip, $without_ip, $with_ip, $commercial_type, $state, $tags, $private_network, $order, $private_networks, $private_nic_mac_address, $servers);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstancesApi->listServers: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **per_page** | **int**| A positive integer lower or equal to 100 to select the number of items to return. | [optional] |
|
||||
| **page** | **int**| A positive integer to choose the page to return. | [optional] |
|
||||
| **organization** | **string**| List only Instances of this Organization ID. | [optional] |
|
||||
| **project** | **string**| List only Instances of this Project ID. | [optional] |
|
||||
| **name** | **string**| Filter Instances by name (eg. \"server1\" will return \"server100\" and \"server1\" but not \"foo\"). | [optional] |
|
||||
| **private_ip** | **string**| List Instances by private_ip. (IP address) | [optional] |
|
||||
| **without_ip** | **bool**| List Instances that are not attached to a public IP. | [optional] |
|
||||
| **with_ip** | **string**| List Instances by IP (both private_ip and public_ip are supported). (IP address) | [optional] |
|
||||
| **commercial_type** | **string**| List Instances of this commercial type. | [optional] |
|
||||
| **state** | **string**| List Instances in this state. | [optional] [default to 'running'] |
|
||||
| **tags** | **string**| List Instances with these exact tags (to filter with several tags, use commas to separate them). | [optional] |
|
||||
| **private_network** | **string**| List Instances in this Private Network. | [optional] |
|
||||
| **order** | **string**| Define the order of the returned servers. | [optional] [default to 'creation_date_desc'] |
|
||||
| **private_networks** | **string**| List Instances from the given Private Networks (use commas to separate them). | [optional] |
|
||||
| **private_nic_mac_address** | **string**| List Instances associated with the given private NIC MAC address. | [optional] |
|
||||
| **servers** | **string**| List Instances from these server ids (use commas to separate them). | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListServersResponse**](../Model/ScalewayInstanceV1ListServersResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `serverAction()`
|
||||
|
||||
```php
|
||||
serverAction($zone, $server_id, $server_action_request): \OpenAPI\Client\Model\ScalewayInstanceV1ServerActionResponse
|
||||
```
|
||||
|
||||
Perform action
|
||||
|
||||
Perform an action on an Instance. Available actions are: * `poweron`: Start a stopped Instance. * `poweroff`: Fully stop the Instance and release the hypervisor slot. * `stop_in_place`: Stop the Instance, but keep the slot on the hypervisor. * `reboot`: Stop the instance and restart it. * `backup`: Create an image with all the volumes of an Instance. * `terminate`: Delete the Instance along with its attached volumes, except for SBS volumes. * `enable_routed_ip`: Migrate the Instance to the new network stack. The `terminate` action will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached. If you want to preserve your volumes, you should detach them before the Instance deletion or `terminate` action. The `backup` action can be done with: * No `volumes` key in the body: an image is created with snapshots of all the server volumes, except for the `scratch` volumes types. * `volumes` key in the body with a dictionary as value, in this dictionary volumes UUID as keys and empty dictionaries as values : an image is created with the snapshots of the volumes in `volumes` key. `scratch` volumes types can't be shapshotted.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance.
|
||||
$server_action_request = new \OpenAPI\Client\Model\ServerActionRequest(); // \OpenAPI\Client\Model\ServerActionRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->serverAction($zone, $server_id, $server_action_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstancesApi->serverAction: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance. | |
|
||||
| **server_action_request** | [**\OpenAPI\Client\Model\ServerActionRequest**](../Model/ServerActionRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ServerActionResponse**](../Model/ScalewayInstanceV1ServerActionResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updateServer()`
|
||||
|
||||
```php
|
||||
updateServer($zone, $server_id, $update_server_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdateServerResponse
|
||||
```
|
||||
|
||||
Update an Instance
|
||||
|
||||
Update the Instance information, such as name, boot mode, or tags.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\InstancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance.
|
||||
$update_server_request = new \OpenAPI\Client\Model\UpdateServerRequest(); // \OpenAPI\Client\Model\UpdateServerRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updateServer($zone, $server_id, $update_server_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstancesApi->updateServer: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance. | |
|
||||
| **update_server_request** | [**\OpenAPI\Client\Model\UpdateServerRequest**](../Model/UpdateServerRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdateServerResponse**](../Model/ScalewayInstanceV1UpdateServerResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
607
docs/Api/PlacementGroupsApi.md
Normal file
607
docs/Api/PlacementGroupsApi.md
Normal file
|
|
@ -0,0 +1,607 @@
|
|||
# OpenAPI\Client\PlacementGroupsApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**createPlacementGroup()**](PlacementGroupsApi.md#createPlacementGroup) | **POST** /instance/v1/zones/{zone}/placement_groups | Create a placement group |
|
||||
| [**deletePlacementGroup()**](PlacementGroupsApi.md#deletePlacementGroup) | **DELETE** /instance/v1/zones/{zone}/placement_groups/{placement_group_id} | Delete the specified placement group |
|
||||
| [**getPlacementGroup()**](PlacementGroupsApi.md#getPlacementGroup) | **GET** /instance/v1/zones/{zone}/placement_groups/{placement_group_id} | Get a placement group |
|
||||
| [**getPlacementGroupServers()**](PlacementGroupsApi.md#getPlacementGroupServers) | **GET** /instance/v1/zones/{zone}/placement_groups/{placement_group_id}/servers | Get placement group servers |
|
||||
| [**listPlacementGroups()**](PlacementGroupsApi.md#listPlacementGroups) | **GET** /instance/v1/zones/{zone}/placement_groups | List placement groups |
|
||||
| [**setPlacementGroup()**](PlacementGroupsApi.md#setPlacementGroup) | **PUT** /instance/v1/zones/{zone}/placement_groups/{placement_group_id} | Set placement group |
|
||||
| [**setPlacementGroupServers()**](PlacementGroupsApi.md#setPlacementGroupServers) | **PUT** /instance/v1/zones/{zone}/placement_groups/{placement_group_id}/servers | Set placement group servers |
|
||||
| [**updatePlacementGroup()**](PlacementGroupsApi.md#updatePlacementGroup) | **PATCH** /instance/v1/zones/{zone}/placement_groups/{placement_group_id} | Update a placement group |
|
||||
| [**updatePlacementGroupServers()**](PlacementGroupsApi.md#updatePlacementGroupServers) | **PATCH** /instance/v1/zones/{zone}/placement_groups/{placement_group_id}/servers | Update placement group servers |
|
||||
|
||||
|
||||
## `createPlacementGroup()`
|
||||
|
||||
```php
|
||||
createPlacementGroup($zone, $create_placement_group_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreatePlacementGroupResponse
|
||||
```
|
||||
|
||||
Create a placement group
|
||||
|
||||
Create a new placement group in a specified Availability Zone.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$create_placement_group_request = new \OpenAPI\Client\Model\CreatePlacementGroupRequest(); // \OpenAPI\Client\Model\CreatePlacementGroupRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createPlacementGroup($zone, $create_placement_group_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->createPlacementGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **create_placement_group_request** | [**\OpenAPI\Client\Model\CreatePlacementGroupRequest**](../Model/CreatePlacementGroupRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreatePlacementGroupResponse**](../Model/ScalewayInstanceV1CreatePlacementGroupResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deletePlacementGroup()`
|
||||
|
||||
```php
|
||||
deletePlacementGroup($zone, $placement_group_id)
|
||||
```
|
||||
|
||||
Delete the specified placement group
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$placement_group_id = 'placement_group_id_example'; // string | UUID of the placement group you want to delete.
|
||||
|
||||
try {
|
||||
$apiInstance->deletePlacementGroup($zone, $placement_group_id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->deletePlacementGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **placement_group_id** | **string**| UUID of the placement group you want to delete. | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getPlacementGroup()`
|
||||
|
||||
```php
|
||||
getPlacementGroup($zone, $placement_group_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetPlacementGroupResponse
|
||||
```
|
||||
|
||||
Get a placement group
|
||||
|
||||
Get the specified placement group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$placement_group_id = 'placement_group_id_example'; // string | UUID of the placement group you want to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getPlacementGroup($zone, $placement_group_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->getPlacementGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **placement_group_id** | **string**| UUID of the placement group you want to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetPlacementGroupResponse**](../Model/ScalewayInstanceV1GetPlacementGroupResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getPlacementGroupServers()`
|
||||
|
||||
```php
|
||||
getPlacementGroupServers($zone, $placement_group_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetPlacementGroupServersResponse
|
||||
```
|
||||
|
||||
Get placement group servers
|
||||
|
||||
Get all Instances belonging to the specified placement group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$placement_group_id = 'placement_group_id_example'; // string | UUID of the placement group you want to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getPlacementGroupServers($zone, $placement_group_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->getPlacementGroupServers: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **placement_group_id** | **string**| UUID of the placement group you want to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetPlacementGroupServersResponse**](../Model/ScalewayInstanceV1GetPlacementGroupServersResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listPlacementGroups()`
|
||||
|
||||
```php
|
||||
listPlacementGroups($zone, $per_page, $page, $organization, $project, $tags, $name): \OpenAPI\Client\Model\ScalewayInstanceV1ListPlacementGroupsResponse
|
||||
```
|
||||
|
||||
List placement groups
|
||||
|
||||
List all placement groups in a specified Availability Zone.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$per_page = 56; // int | A positive integer lower or equal to 100 to select the number of items to return.
|
||||
$page = 56; // int | A positive integer to choose the page to return.
|
||||
$organization = 'organization_example'; // string | List only placement groups of this Organization ID.
|
||||
$project = 'project_example'; // string | List only placement groups of this Project ID.
|
||||
$tags = 'tags_example'; // string | List placement groups with these exact tags (to filter with several tags, use commas to separate them).
|
||||
$name = 'name_example'; // string | Filter placement groups by name (for eg. \"cluster1\" will return \"cluster100\" and \"cluster1\" but not \"foo\").
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listPlacementGroups($zone, $per_page, $page, $organization, $project, $tags, $name);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->listPlacementGroups: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **per_page** | **int**| A positive integer lower or equal to 100 to select the number of items to return. | [optional] |
|
||||
| **page** | **int**| A positive integer to choose the page to return. | [optional] |
|
||||
| **organization** | **string**| List only placement groups of this Organization ID. | [optional] |
|
||||
| **project** | **string**| List only placement groups of this Project ID. | [optional] |
|
||||
| **tags** | **string**| List placement groups with these exact tags (to filter with several tags, use commas to separate them). | [optional] |
|
||||
| **name** | **string**| Filter placement groups by name (for eg. \"cluster1\" will return \"cluster100\" and \"cluster1\" but not \"foo\"). | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListPlacementGroupsResponse**](../Model/ScalewayInstanceV1ListPlacementGroupsResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setPlacementGroup()`
|
||||
|
||||
```php
|
||||
setPlacementGroup($zone, $placement_group_id, $set_placement_group_request): \OpenAPI\Client\Model\ScalewayInstanceV1SetPlacementGroupResponse
|
||||
```
|
||||
|
||||
Set placement group
|
||||
|
||||
Set all parameters of the specified placement group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$placement_group_id = 'placement_group_id_example'; // string
|
||||
$set_placement_group_request = new \OpenAPI\Client\Model\SetPlacementGroupRequest(); // \OpenAPI\Client\Model\SetPlacementGroupRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->setPlacementGroup($zone, $placement_group_id, $set_placement_group_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->setPlacementGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **placement_group_id** | **string**| | |
|
||||
| **set_placement_group_request** | [**\OpenAPI\Client\Model\SetPlacementGroupRequest**](../Model/SetPlacementGroupRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1SetPlacementGroupResponse**](../Model/ScalewayInstanceV1SetPlacementGroupResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setPlacementGroupServers()`
|
||||
|
||||
```php
|
||||
setPlacementGroupServers($zone, $placement_group_id, $set_placement_group_servers_request): \OpenAPI\Client\Model\ScalewayInstanceV1SetPlacementGroupServersResponse
|
||||
```
|
||||
|
||||
Set placement group servers
|
||||
|
||||
Set all Instances belonging to the specified placement group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$placement_group_id = 'placement_group_id_example'; // string | UUID of the placement group you want to set.
|
||||
$set_placement_group_servers_request = new \OpenAPI\Client\Model\SetPlacementGroupServersRequest(); // \OpenAPI\Client\Model\SetPlacementGroupServersRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->setPlacementGroupServers($zone, $placement_group_id, $set_placement_group_servers_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->setPlacementGroupServers: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **placement_group_id** | **string**| UUID of the placement group you want to set. | |
|
||||
| **set_placement_group_servers_request** | [**\OpenAPI\Client\Model\SetPlacementGroupServersRequest**](../Model/SetPlacementGroupServersRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1SetPlacementGroupServersResponse**](../Model/ScalewayInstanceV1SetPlacementGroupServersResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updatePlacementGroup()`
|
||||
|
||||
```php
|
||||
updatePlacementGroup($zone, $placement_group_id, $update_placement_group_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdatePlacementGroupResponse
|
||||
```
|
||||
|
||||
Update a placement group
|
||||
|
||||
Update one or more parameter of the specified placement group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$placement_group_id = 'placement_group_id_example'; // string | UUID of the placement group.
|
||||
$update_placement_group_request = new \OpenAPI\Client\Model\UpdatePlacementGroupRequest(); // \OpenAPI\Client\Model\UpdatePlacementGroupRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updatePlacementGroup($zone, $placement_group_id, $update_placement_group_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->updatePlacementGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **placement_group_id** | **string**| UUID of the placement group. | |
|
||||
| **update_placement_group_request** | [**\OpenAPI\Client\Model\UpdatePlacementGroupRequest**](../Model/UpdatePlacementGroupRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdatePlacementGroupResponse**](../Model/ScalewayInstanceV1UpdatePlacementGroupResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updatePlacementGroupServers()`
|
||||
|
||||
```php
|
||||
updatePlacementGroupServers($zone, $placement_group_id, $set_placement_group_servers_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdatePlacementGroupServersResponse
|
||||
```
|
||||
|
||||
Update placement group servers
|
||||
|
||||
Update all Instances belonging to the specified placement group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PlacementGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$placement_group_id = 'placement_group_id_example'; // string | UUID of the placement group you want to update.
|
||||
$set_placement_group_servers_request = new \OpenAPI\Client\Model\SetPlacementGroupServersRequest(); // \OpenAPI\Client\Model\SetPlacementGroupServersRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updatePlacementGroupServers($zone, $placement_group_id, $set_placement_group_servers_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PlacementGroupsApi->updatePlacementGroupServers: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **placement_group_id** | **string**| UUID of the placement group you want to update. | |
|
||||
| **set_placement_group_servers_request** | [**\OpenAPI\Client\Model\SetPlacementGroupServersRequest**](../Model/SetPlacementGroupServersRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdatePlacementGroupServersResponse**](../Model/ScalewayInstanceV1UpdatePlacementGroupServersResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
343
docs/Api/PrivateNICsApi.md
Normal file
343
docs/Api/PrivateNICsApi.md
Normal file
|
|
@ -0,0 +1,343 @@
|
|||
# OpenAPI\Client\PrivateNICsApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**createPrivateNIC()**](PrivateNICsApi.md#createPrivateNIC) | **POST** /instance/v1/zones/{zone}/servers/{server_id}/private_nics | Create a private NIC connecting an Instance to a Private Network |
|
||||
| [**deletePrivateNIC()**](PrivateNICsApi.md#deletePrivateNIC) | **DELETE** /instance/v1/zones/{zone}/servers/{server_id}/private_nics/{private_nic_id} | Delete a private NIC |
|
||||
| [**getPrivateNIC()**](PrivateNICsApi.md#getPrivateNIC) | **GET** /instance/v1/zones/{zone}/servers/{server_id}/private_nics/{private_nic_id} | Get a private NIC |
|
||||
| [**listPrivateNICs()**](PrivateNICsApi.md#listPrivateNICs) | **GET** /instance/v1/zones/{zone}/servers/{server_id}/private_nics | List all private NICs |
|
||||
| [**updatePrivateNIC()**](PrivateNICsApi.md#updatePrivateNIC) | **PATCH** /instance/v1/zones/{zone}/servers/{server_id}/private_nics/{private_nic_id} | Update a private NIC |
|
||||
|
||||
|
||||
## `createPrivateNIC()`
|
||||
|
||||
```php
|
||||
createPrivateNIC($zone, $server_id, $create_private_nic_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreatePrivateNICResponse
|
||||
```
|
||||
|
||||
Create a private NIC connecting an Instance to a Private Network
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PrivateNICsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance the private NIC will be attached to.
|
||||
$create_private_nic_request = new \OpenAPI\Client\Model\CreatePrivateNICRequest(); // \OpenAPI\Client\Model\CreatePrivateNICRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createPrivateNIC($zone, $server_id, $create_private_nic_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PrivateNICsApi->createPrivateNIC: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance the private NIC will be attached to. | |
|
||||
| **create_private_nic_request** | [**\OpenAPI\Client\Model\CreatePrivateNICRequest**](../Model/CreatePrivateNICRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreatePrivateNICResponse**](../Model/ScalewayInstanceV1CreatePrivateNICResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deletePrivateNIC()`
|
||||
|
||||
```php
|
||||
deletePrivateNIC($zone, $server_id, $private_nic_id)
|
||||
```
|
||||
|
||||
Delete a private NIC
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PrivateNICsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | Instance to which the private NIC is attached.
|
||||
$private_nic_id = 'private_nic_id_example'; // string | Private NIC unique ID.
|
||||
|
||||
try {
|
||||
$apiInstance->deletePrivateNIC($zone, $server_id, $private_nic_id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PrivateNICsApi->deletePrivateNIC: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| Instance to which the private NIC is attached. | |
|
||||
| **private_nic_id** | **string**| Private NIC unique ID. | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getPrivateNIC()`
|
||||
|
||||
```php
|
||||
getPrivateNIC($zone, $server_id, $private_nic_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetPrivateNICResponse
|
||||
```
|
||||
|
||||
Get a private NIC
|
||||
|
||||
Get private NIC properties.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PrivateNICsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | Instance to which the private NIC is attached.
|
||||
$private_nic_id = 'private_nic_id_example'; // string | Private NIC unique ID.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getPrivateNIC($zone, $server_id, $private_nic_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PrivateNICsApi->getPrivateNIC: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| Instance to which the private NIC is attached. | |
|
||||
| **private_nic_id** | **string**| Private NIC unique ID. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetPrivateNICResponse**](../Model/ScalewayInstanceV1GetPrivateNICResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listPrivateNICs()`
|
||||
|
||||
```php
|
||||
listPrivateNICs($zone, $server_id, $tags, $per_page, $page): \OpenAPI\Client\Model\ScalewayInstanceV1ListPrivateNICsResponse
|
||||
```
|
||||
|
||||
List all private NICs
|
||||
|
||||
List all private NICs of a specified Instance.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PrivateNICsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | Instance to which the private NIC is attached.
|
||||
$tags = 'tags_example'; // string | Private NIC tags.
|
||||
$per_page = 56; // int | A positive integer lower or equal to 100 to select the number of items to return.
|
||||
$page = 56; // int | A positive integer to choose the page to return.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listPrivateNICs($zone, $server_id, $tags, $per_page, $page);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PrivateNICsApi->listPrivateNICs: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| Instance to which the private NIC is attached. | |
|
||||
| **tags** | **string**| Private NIC tags. | [optional] |
|
||||
| **per_page** | **int**| A positive integer lower or equal to 100 to select the number of items to return. | [optional] |
|
||||
| **page** | **int**| A positive integer to choose the page to return. | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListPrivateNICsResponse**](../Model/ScalewayInstanceV1ListPrivateNICsResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updatePrivateNIC()`
|
||||
|
||||
```php
|
||||
updatePrivateNIC($zone, $server_id, $private_nic_id, $update_private_nic_request): \OpenAPI\Client\Model\ScalewayInstanceV1PrivateNIC
|
||||
```
|
||||
|
||||
Update a private NIC
|
||||
|
||||
Update one or more parameter(s) of a specified private NIC.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\PrivateNICsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance the private NIC will be attached to.
|
||||
$private_nic_id = 'private_nic_id_example'; // string | Private NIC unique ID.
|
||||
$update_private_nic_request = new \OpenAPI\Client\Model\UpdatePrivateNICRequest(); // \OpenAPI\Client\Model\UpdatePrivateNICRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updatePrivateNIC($zone, $server_id, $private_nic_id, $update_private_nic_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PrivateNICsApi->updatePrivateNIC: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance the private NIC will be attached to. | |
|
||||
| **private_nic_id** | **string**| Private NIC unique ID. | |
|
||||
| **update_private_nic_request** | [**\OpenAPI\Client\Model\UpdatePrivateNICRequest**](../Model/UpdatePrivateNICRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1PrivateNIC**](../Model/ScalewayInstanceV1PrivateNIC.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
949
docs/Api/SecurityGroupsApi.md
Normal file
949
docs/Api/SecurityGroupsApi.md
Normal file
|
|
@ -0,0 +1,949 @@
|
|||
# OpenAPI\Client\SecurityGroupsApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**createSecurityGroup()**](SecurityGroupsApi.md#createSecurityGroup) | **POST** /instance/v1/zones/{zone}/security_groups | Create a security group |
|
||||
| [**createSecurityGroupRule()**](SecurityGroupsApi.md#createSecurityGroupRule) | **POST** /instance/v1/zones/{zone}/security_groups/{security_group_id}/rules | Create rule |
|
||||
| [**deleteSecurityGroup()**](SecurityGroupsApi.md#deleteSecurityGroup) | **DELETE** /instance/v1/zones/{zone}/security_groups/{security_group_id} | Delete a security group |
|
||||
| [**deleteSecurityGroupRule()**](SecurityGroupsApi.md#deleteSecurityGroupRule) | **DELETE** /instance/v1/zones/{zone}/security_groups/{security_group_id}/rules/{security_group_rule_id} | Delete rule |
|
||||
| [**getSecurityGroup()**](SecurityGroupsApi.md#getSecurityGroup) | **GET** /instance/v1/zones/{zone}/security_groups/{security_group_id} | Get a security group |
|
||||
| [**getSecurityGroupRule()**](SecurityGroupsApi.md#getSecurityGroupRule) | **GET** /instance/v1/zones/{zone}/security_groups/{security_group_id}/rules/{security_group_rule_id} | Get rule |
|
||||
| [**listDefaultSecurityGroupRules()**](SecurityGroupsApi.md#listDefaultSecurityGroupRules) | **GET** /instance/v1/zones/{zone}/security_groups/default/rules | Get default rules |
|
||||
| [**listSecurityGroupRules()**](SecurityGroupsApi.md#listSecurityGroupRules) | **GET** /instance/v1/zones/{zone}/security_groups/{security_group_id}/rules | List rules |
|
||||
| [**listSecurityGroups()**](SecurityGroupsApi.md#listSecurityGroups) | **GET** /instance/v1/zones/{zone}/security_groups | List security groups |
|
||||
| [**setSecurityGroup()**](SecurityGroupsApi.md#setSecurityGroup) | **PUT** /instance/v1/zones/{zone}/security_groups/{id} | Update a security group |
|
||||
| [**setSecurityGroupRule()**](SecurityGroupsApi.md#setSecurityGroupRule) | **PUT** /instance/v1/zones/{zone}/security_groups/{security_group_id}/rules/{security_group_rule_id} | Set security group rule |
|
||||
| [**setSecurityGroupRules()**](SecurityGroupsApi.md#setSecurityGroupRules) | **PUT** /instance/v1/zones/{zone}/security_groups/{security_group_id}/rules | Update all the rules of a security group |
|
||||
| [**updateSecurityGroup()**](SecurityGroupsApi.md#updateSecurityGroup) | **PATCH** /instance/v1/zones/{zone}/security_groups/{security_group_id} | Update a security group |
|
||||
| [**updateSecurityGroupRule()**](SecurityGroupsApi.md#updateSecurityGroupRule) | **PATCH** /instance/v1/zones/{zone}/security_groups/{security_group_id}/rules/{security_group_rule_id} | Update security group rule |
|
||||
|
||||
|
||||
## `createSecurityGroup()`
|
||||
|
||||
```php
|
||||
createSecurityGroup($zone, $create_security_group_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreateSecurityGroupResponse
|
||||
```
|
||||
|
||||
Create a security group
|
||||
|
||||
Create a security group with a specified name and description.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$create_security_group_request = new \OpenAPI\Client\Model\CreateSecurityGroupRequest(); // \OpenAPI\Client\Model\CreateSecurityGroupRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createSecurityGroup($zone, $create_security_group_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->createSecurityGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **create_security_group_request** | [**\OpenAPI\Client\Model\CreateSecurityGroupRequest**](../Model/CreateSecurityGroupRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreateSecurityGroupResponse**](../Model/ScalewayInstanceV1CreateSecurityGroupResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `createSecurityGroupRule()`
|
||||
|
||||
```php
|
||||
createSecurityGroupRule($zone, $security_group_id, $create_security_group_rule_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreateSecurityGroupRuleResponse
|
||||
```
|
||||
|
||||
Create rule
|
||||
|
||||
Create a rule in the specified security group ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 'security_group_id_example'; // string | UUID of the security group.
|
||||
$create_security_group_rule_request = new \OpenAPI\Client\Model\CreateSecurityGroupRuleRequest(); // \OpenAPI\Client\Model\CreateSecurityGroupRuleRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createSecurityGroupRule($zone, $security_group_id, $create_security_group_rule_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->createSecurityGroupRule: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| UUID of the security group. | |
|
||||
| **create_security_group_rule_request** | [**\OpenAPI\Client\Model\CreateSecurityGroupRuleRequest**](../Model/CreateSecurityGroupRuleRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreateSecurityGroupRuleResponse**](../Model/ScalewayInstanceV1CreateSecurityGroupRuleResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deleteSecurityGroup()`
|
||||
|
||||
```php
|
||||
deleteSecurityGroup($zone, $security_group_id)
|
||||
```
|
||||
|
||||
Delete a security group
|
||||
|
||||
Delete a security group with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 'security_group_id_example'; // string | UUID of the security group you want to delete.
|
||||
|
||||
try {
|
||||
$apiInstance->deleteSecurityGroup($zone, $security_group_id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->deleteSecurityGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| UUID of the security group you want to delete. | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deleteSecurityGroupRule()`
|
||||
|
||||
```php
|
||||
deleteSecurityGroupRule($zone, $security_group_id, $security_group_rule_id)
|
||||
```
|
||||
|
||||
Delete rule
|
||||
|
||||
Delete a security group rule with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 'security_group_id_example'; // string
|
||||
$security_group_rule_id = 'security_group_rule_id_example'; // string
|
||||
|
||||
try {
|
||||
$apiInstance->deleteSecurityGroupRule($zone, $security_group_id, $security_group_rule_id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->deleteSecurityGroupRule: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| | |
|
||||
| **security_group_rule_id** | **string**| | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getSecurityGroup()`
|
||||
|
||||
```php
|
||||
getSecurityGroup($zone, $security_group_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetSecurityGroupResponse
|
||||
```
|
||||
|
||||
Get a security group
|
||||
|
||||
Get the details of a security group with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 'security_group_id_example'; // string | UUID of the security group you want to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getSecurityGroup($zone, $security_group_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->getSecurityGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| UUID of the security group you want to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetSecurityGroupResponse**](../Model/ScalewayInstanceV1GetSecurityGroupResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getSecurityGroupRule()`
|
||||
|
||||
```php
|
||||
getSecurityGroupRule($zone, $security_group_id, $security_group_rule_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetSecurityGroupRuleResponse
|
||||
```
|
||||
|
||||
Get rule
|
||||
|
||||
Get details of a security group rule with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 'security_group_id_example'; // string
|
||||
$security_group_rule_id = 'security_group_rule_id_example'; // string
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getSecurityGroupRule($zone, $security_group_id, $security_group_rule_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->getSecurityGroupRule: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| | |
|
||||
| **security_group_rule_id** | **string**| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetSecurityGroupRuleResponse**](../Model/ScalewayInstanceV1GetSecurityGroupRuleResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listDefaultSecurityGroupRules()`
|
||||
|
||||
```php
|
||||
listDefaultSecurityGroupRules($zone): \OpenAPI\Client\Model\ScalewayInstanceV1ListSecurityGroupRulesResponse
|
||||
```
|
||||
|
||||
Get default rules
|
||||
|
||||
Lists the default rules applied to all the security groups.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listDefaultSecurityGroupRules($zone);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->listDefaultSecurityGroupRules: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListSecurityGroupRulesResponse**](../Model/ScalewayInstanceV1ListSecurityGroupRulesResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listSecurityGroupRules()`
|
||||
|
||||
```php
|
||||
listSecurityGroupRules($zone, $security_group_id, $per_page, $page): \OpenAPI\Client\Model\ScalewayInstanceV1ListSecurityGroupRulesResponse
|
||||
```
|
||||
|
||||
List rules
|
||||
|
||||
List the rules of the a specified security group ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 'security_group_id_example'; // string | UUID of the security group.
|
||||
$per_page = 56; // int | A positive integer lower or equal to 100 to select the number of items to return.
|
||||
$page = 56; // int | A positive integer to choose the page to return.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listSecurityGroupRules($zone, $security_group_id, $per_page, $page);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->listSecurityGroupRules: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| UUID of the security group. | |
|
||||
| **per_page** | **int**| A positive integer lower or equal to 100 to select the number of items to return. | [optional] |
|
||||
| **page** | **int**| A positive integer to choose the page to return. | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListSecurityGroupRulesResponse**](../Model/ScalewayInstanceV1ListSecurityGroupRulesResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listSecurityGroups()`
|
||||
|
||||
```php
|
||||
listSecurityGroups($zone, $name, $organization, $project, $tags, $project_default, $per_page, $page): \OpenAPI\Client\Model\ScalewayInstanceV1ListSecurityGroupsResponse
|
||||
```
|
||||
|
||||
List security groups
|
||||
|
||||
List all existing security groups.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$name = 'name_example'; // string | Name of the security group.
|
||||
$organization = 'organization_example'; // string | Security group Organization ID.
|
||||
$project = 'project_example'; // string | Security group Project ID.
|
||||
$tags = 'tags_example'; // string | List security groups with these exact tags (to filter with several tags, use commas to separate them).
|
||||
$project_default = True; // bool | Filter security groups with this value for project_default.
|
||||
$per_page = 56; // int | A positive integer lower or equal to 100 to select the number of items to return.
|
||||
$page = 56; // int | A positive integer to choose the page to return.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listSecurityGroups($zone, $name, $organization, $project, $tags, $project_default, $per_page, $page);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->listSecurityGroups: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **name** | **string**| Name of the security group. | [optional] |
|
||||
| **organization** | **string**| Security group Organization ID. | [optional] |
|
||||
| **project** | **string**| Security group Project ID. | [optional] |
|
||||
| **tags** | **string**| List security groups with these exact tags (to filter with several tags, use commas to separate them). | [optional] |
|
||||
| **project_default** | **bool**| Filter security groups with this value for project_default. | [optional] |
|
||||
| **per_page** | **int**| A positive integer lower or equal to 100 to select the number of items to return. | [optional] |
|
||||
| **page** | **int**| A positive integer to choose the page to return. | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListSecurityGroupsResponse**](../Model/ScalewayInstanceV1ListSecurityGroupsResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setSecurityGroup()`
|
||||
|
||||
```php
|
||||
setSecurityGroup($zone, $id, $set_security_group_request): \OpenAPI\Client\Model\ScalewayInstanceV1SetSecurityGroupResponse
|
||||
```
|
||||
|
||||
Update a security group
|
||||
|
||||
Replace all security group properties with a security group message.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$id = 'id_example'; // string | UUID of the security group.
|
||||
$set_security_group_request = new \OpenAPI\Client\Model\SetSecurityGroupRequest(); // \OpenAPI\Client\Model\SetSecurityGroupRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->setSecurityGroup($zone, $id, $set_security_group_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->setSecurityGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **id** | **string**| UUID of the security group. | |
|
||||
| **set_security_group_request** | [**\OpenAPI\Client\Model\SetSecurityGroupRequest**](../Model/SetSecurityGroupRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1SetSecurityGroupResponse**](../Model/ScalewayInstanceV1SetSecurityGroupResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setSecurityGroupRule()`
|
||||
|
||||
```php
|
||||
setSecurityGroupRule($zone, $security_group_id, $security_group_rule_id, $set_security_group_rule_request): \OpenAPI\Client\Model\ScalewayInstanceV1SetSecurityGroupRuleResponse
|
||||
```
|
||||
|
||||
Set security group rule
|
||||
|
||||
Replace all the properties of a rule from a specified security group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 'security_group_id_example'; // string
|
||||
$security_group_rule_id = 'security_group_rule_id_example'; // string
|
||||
$set_security_group_rule_request = new \OpenAPI\Client\Model\SetSecurityGroupRuleRequest(); // \OpenAPI\Client\Model\SetSecurityGroupRuleRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->setSecurityGroupRule($zone, $security_group_id, $security_group_rule_id, $set_security_group_rule_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->setSecurityGroupRule: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| | |
|
||||
| **security_group_rule_id** | **string**| | |
|
||||
| **set_security_group_rule_request** | [**\OpenAPI\Client\Model\SetSecurityGroupRuleRequest**](../Model/SetSecurityGroupRuleRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1SetSecurityGroupRuleResponse**](../Model/ScalewayInstanceV1SetSecurityGroupRuleResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setSecurityGroupRules()`
|
||||
|
||||
```php
|
||||
setSecurityGroupRules($zone, $security_group_id, $set_security_group_rules_request): \OpenAPI\Client\Model\ScalewayInstanceV1SetSecurityGroupRulesResponse
|
||||
```
|
||||
|
||||
Update all the rules of a security group
|
||||
|
||||
Replaces the existing rules of the security group with the rules provided. This endpoint supports the update of existing rules, creation of new rules and deletion of existing rules when they are not passed in the request.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 'security_group_id_example'; // string | UUID of the security group to update the rules on.
|
||||
$set_security_group_rules_request = new \OpenAPI\Client\Model\SetSecurityGroupRulesRequest(); // \OpenAPI\Client\Model\SetSecurityGroupRulesRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->setSecurityGroupRules($zone, $security_group_id, $set_security_group_rules_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->setSecurityGroupRules: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| UUID of the security group to update the rules on. | |
|
||||
| **set_security_group_rules_request** | [**\OpenAPI\Client\Model\SetSecurityGroupRulesRequest**](../Model/SetSecurityGroupRulesRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1SetSecurityGroupRulesResponse**](../Model/ScalewayInstanceV1SetSecurityGroupRulesResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updateSecurityGroup()`
|
||||
|
||||
```php
|
||||
updateSecurityGroup($zone, $security_group_id, $update_security_group_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdateSecurityGroupResponse
|
||||
```
|
||||
|
||||
Update a security group
|
||||
|
||||
Update the properties of security group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 6170692e-7363-616c-6577-61792e636f6d; // string | UUID of the security group. (UUID format)
|
||||
$update_security_group_request = new \OpenAPI\Client\Model\UpdateSecurityGroupRequest(); // \OpenAPI\Client\Model\UpdateSecurityGroupRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updateSecurityGroup($zone, $security_group_id, $update_security_group_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->updateSecurityGroup: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| UUID of the security group. (UUID format) | |
|
||||
| **update_security_group_request** | [**\OpenAPI\Client\Model\UpdateSecurityGroupRequest**](../Model/UpdateSecurityGroupRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdateSecurityGroupResponse**](../Model/ScalewayInstanceV1UpdateSecurityGroupResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updateSecurityGroupRule()`
|
||||
|
||||
```php
|
||||
updateSecurityGroupRule($zone, $security_group_id, $security_group_rule_id, $update_security_group_rule_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdateSecurityGroupRuleResponse
|
||||
```
|
||||
|
||||
Update security group rule
|
||||
|
||||
Update the properties of a rule from a specified security group.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SecurityGroupsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$security_group_id = 6170692e-7363-616c-6577-61792e636f6d; // string | UUID of the security group. (UUID format)
|
||||
$security_group_rule_id = 6170692e-7363-616c-6577-61792e636f6d; // string | UUID of the rule. (UUID format)
|
||||
$update_security_group_rule_request = new \OpenAPI\Client\Model\UpdateSecurityGroupRuleRequest(); // \OpenAPI\Client\Model\UpdateSecurityGroupRuleRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updateSecurityGroupRule($zone, $security_group_id, $security_group_rule_id, $update_security_group_rule_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SecurityGroupsApi->updateSecurityGroupRule: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **security_group_id** | **string**| UUID of the security group. (UUID format) | |
|
||||
| **security_group_rule_id** | **string**| UUID of the rule. (UUID format) | |
|
||||
| **update_security_group_rule_request** | [**\OpenAPI\Client\Model\UpdateSecurityGroupRuleRequest**](../Model/UpdateSecurityGroupRuleRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdateSecurityGroupRuleResponse**](../Model/ScalewayInstanceV1UpdateSecurityGroupRuleResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
479
docs/Api/SnapshotsApi.md
Normal file
479
docs/Api/SnapshotsApi.md
Normal file
|
|
@ -0,0 +1,479 @@
|
|||
# OpenAPI\Client\SnapshotsApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**createSnapshot()**](SnapshotsApi.md#createSnapshot) | **POST** /instance/v1/zones/{zone}/snapshots | Create a snapshot from a specified volume or from a QCOW2 file |
|
||||
| [**deleteSnapshot()**](SnapshotsApi.md#deleteSnapshot) | **DELETE** /instance/v1/zones/{zone}/snapshots/{snapshot_id} | Delete a snapshot |
|
||||
| [**exportSnapshot()**](SnapshotsApi.md#exportSnapshot) | **POST** /instance/v1/zones/{zone}/snapshots/{snapshot_id}/export | Export a snapshot |
|
||||
| [**getSnapshot()**](SnapshotsApi.md#getSnapshot) | **GET** /instance/v1/zones/{zone}/snapshots/{snapshot_id} | Get a snapshot |
|
||||
| [**listSnapshots()**](SnapshotsApi.md#listSnapshots) | **GET** /instance/v1/zones/{zone}/snapshots | List snapshots |
|
||||
| [**setSnapshot()**](SnapshotsApi.md#setSnapshot) | **PUT** /instance/v1/zones/{zone}/snapshots/{snapshot_id} | Set snapshot |
|
||||
| [**updateSnapshot()**](SnapshotsApi.md#updateSnapshot) | **PATCH** /instance/v1/zones/{zone}/snapshots/{snapshot_id} | Update a snapshot |
|
||||
|
||||
|
||||
## `createSnapshot()`
|
||||
|
||||
```php
|
||||
createSnapshot($zone, $create_snapshot_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreateSnapshotResponse
|
||||
```
|
||||
|
||||
Create a snapshot from a specified volume or from a QCOW2 file
|
||||
|
||||
Create a snapshot from a specified volume or from a QCOW2 file in a specified Availability Zone.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SnapshotsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$create_snapshot_request = new \OpenAPI\Client\Model\CreateSnapshotRequest(); // \OpenAPI\Client\Model\CreateSnapshotRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createSnapshot($zone, $create_snapshot_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SnapshotsApi->createSnapshot: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **create_snapshot_request** | [**\OpenAPI\Client\Model\CreateSnapshotRequest**](../Model/CreateSnapshotRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreateSnapshotResponse**](../Model/ScalewayInstanceV1CreateSnapshotResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deleteSnapshot()`
|
||||
|
||||
```php
|
||||
deleteSnapshot($zone, $snapshot_id)
|
||||
```
|
||||
|
||||
Delete a snapshot
|
||||
|
||||
Delete the snapshot with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SnapshotsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$snapshot_id = 'snapshot_id_example'; // string | UUID of the snapshot you want to delete.
|
||||
|
||||
try {
|
||||
$apiInstance->deleteSnapshot($zone, $snapshot_id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SnapshotsApi->deleteSnapshot: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **snapshot_id** | **string**| UUID of the snapshot you want to delete. | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `exportSnapshot()`
|
||||
|
||||
```php
|
||||
exportSnapshot($zone, $snapshot_id, $export_snapshot_request): \OpenAPI\Client\Model\ScalewayInstanceV1ExportSnapshotResponse
|
||||
```
|
||||
|
||||
Export a snapshot
|
||||
|
||||
Export a snapshot to a specified Object Storage bucket in the same region.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SnapshotsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$snapshot_id = 'snapshot_id_example'; // string | Snapshot ID.
|
||||
$export_snapshot_request = new \OpenAPI\Client\Model\ExportSnapshotRequest(); // \OpenAPI\Client\Model\ExportSnapshotRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->exportSnapshot($zone, $snapshot_id, $export_snapshot_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SnapshotsApi->exportSnapshot: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **snapshot_id** | **string**| Snapshot ID. | |
|
||||
| **export_snapshot_request** | [**\OpenAPI\Client\Model\ExportSnapshotRequest**](../Model/ExportSnapshotRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ExportSnapshotResponse**](../Model/ScalewayInstanceV1ExportSnapshotResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getSnapshot()`
|
||||
|
||||
```php
|
||||
getSnapshot($zone, $snapshot_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetSnapshotResponse
|
||||
```
|
||||
|
||||
Get a snapshot
|
||||
|
||||
Get details of a snapshot with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SnapshotsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$snapshot_id = 'snapshot_id_example'; // string | UUID of the snapshot you want to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getSnapshot($zone, $snapshot_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SnapshotsApi->getSnapshot: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **snapshot_id** | **string**| UUID of the snapshot you want to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetSnapshotResponse**](../Model/ScalewayInstanceV1GetSnapshotResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listSnapshots()`
|
||||
|
||||
```php
|
||||
listSnapshots($zone, $organization, $project, $per_page, $page, $name, $tags, $base_volume_id): \OpenAPI\Client\Model\ScalewayInstanceV1ListSnapshotsResponse
|
||||
```
|
||||
|
||||
List snapshots
|
||||
|
||||
List all snapshots of an Organization in a specified Availability Zone.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SnapshotsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$organization = 'organization_example'; // string | List snapshots only for this Organization ID.
|
||||
$project = 'project_example'; // string | List snapshots only for this Project ID.
|
||||
$per_page = 56; // int | Number of snapshots returned per page (positive integer lower or equal to 100).
|
||||
$page = 56; // int | Page to be returned.
|
||||
$name = 'name_example'; // string | List snapshots of the requested name.
|
||||
$tags = 'tags_example'; // string | List snapshots that have the requested tag.
|
||||
$base_volume_id = 'base_volume_id_example'; // string | List snapshots originating only from this volume.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listSnapshots($zone, $organization, $project, $per_page, $page, $name, $tags, $base_volume_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SnapshotsApi->listSnapshots: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **organization** | **string**| List snapshots only for this Organization ID. | [optional] |
|
||||
| **project** | **string**| List snapshots only for this Project ID. | [optional] |
|
||||
| **per_page** | **int**| Number of snapshots returned per page (positive integer lower or equal to 100). | [optional] |
|
||||
| **page** | **int**| Page to be returned. | [optional] |
|
||||
| **name** | **string**| List snapshots of the requested name. | [optional] |
|
||||
| **tags** | **string**| List snapshots that have the requested tag. | [optional] |
|
||||
| **base_volume_id** | **string**| List snapshots originating only from this volume. | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListSnapshotsResponse**](../Model/ScalewayInstanceV1ListSnapshotsResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setSnapshot()`
|
||||
|
||||
```php
|
||||
setSnapshot($zone, $snapshot_id, $set_snapshot_request): \OpenAPI\Client\Model\ScalewayInstanceV1SetSnapshotResponse
|
||||
```
|
||||
|
||||
Set snapshot
|
||||
|
||||
Replace all the properties of a snapshot.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SnapshotsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$snapshot_id = 'snapshot_id_example'; // string
|
||||
$set_snapshot_request = new \OpenAPI\Client\Model\SetSnapshotRequest(); // \OpenAPI\Client\Model\SetSnapshotRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->setSnapshot($zone, $snapshot_id, $set_snapshot_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SnapshotsApi->setSnapshot: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **snapshot_id** | **string**| | |
|
||||
| **set_snapshot_request** | [**\OpenAPI\Client\Model\SetSnapshotRequest**](../Model/SetSnapshotRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1SetSnapshotResponse**](../Model/ScalewayInstanceV1SetSnapshotResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updateSnapshot()`
|
||||
|
||||
```php
|
||||
updateSnapshot($zone, $snapshot_id, $update_snapshot_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdateSnapshotResponse
|
||||
```
|
||||
|
||||
Update a snapshot
|
||||
|
||||
Update the properties of a snapshot.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\SnapshotsApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$snapshot_id = 6170692e-7363-616c-6577-61792e636f6d; // string | UUID of the snapshot. (UUID format)
|
||||
$update_snapshot_request = new \OpenAPI\Client\Model\UpdateSnapshotRequest(); // \OpenAPI\Client\Model\UpdateSnapshotRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updateSnapshot($zone, $snapshot_id, $update_snapshot_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling SnapshotsApi->updateSnapshot: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **snapshot_id** | **string**| UUID of the snapshot. (UUID format) | |
|
||||
| **update_snapshot_request** | [**\OpenAPI\Client\Model\UpdateSnapshotRequest**](../Model/UpdateSnapshotRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdateSnapshotResponse**](../Model/ScalewayInstanceV1UpdateSnapshotResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
273
docs/Api/UserDataApi.md
Normal file
273
docs/Api/UserDataApi.md
Normal file
|
|
@ -0,0 +1,273 @@
|
|||
# OpenAPI\Client\UserDataApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**deleteServerUserData()**](UserDataApi.md#deleteServerUserData) | **DELETE** /instance/v1/zones/{zone}/servers/{server_id}/user_data/{key} | Delete user data |
|
||||
| [**getServerUserData()**](UserDataApi.md#getServerUserData) | **GET** /instance/v1/zones/{zone}/servers/{server_id}/user_data/{key} | Get user data |
|
||||
| [**listServerUserData()**](UserDataApi.md#listServerUserData) | **GET** /instance/v1/zones/{zone}/servers/{server_id}/user_data | List user data |
|
||||
| [**setServerUserData()**](UserDataApi.md#setServerUserData) | **PATCH** /instance/v1/zones/{zone}/servers/{server_id}/user_data/{key} | Add/set user data |
|
||||
|
||||
|
||||
## `deleteServerUserData()`
|
||||
|
||||
```php
|
||||
deleteServerUserData($zone, $server_id, $key)
|
||||
```
|
||||
|
||||
Delete user data
|
||||
|
||||
Delete the specified key from an Instance's user data.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\UserDataApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance.
|
||||
$key = 'key_example'; // string | Key of the user data to delete.
|
||||
|
||||
try {
|
||||
$apiInstance->deleteServerUserData($zone, $server_id, $key);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling UserDataApi->deleteServerUserData: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance. | |
|
||||
| **key** | **string**| Key of the user data to delete. | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getServerUserData()`
|
||||
|
||||
```php
|
||||
getServerUserData($zone, $server_id, $key): \OpenAPI\Client\Model\ScalewayStdFile
|
||||
```
|
||||
|
||||
Get user data
|
||||
|
||||
Get the content of a user data with the specified key on an Instance.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\UserDataApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance.
|
||||
$key = 'key_example'; // string | Key of the user data to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getServerUserData($zone, $server_id, $key);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling UserDataApi->getServerUserData: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance. | |
|
||||
| **key** | **string**| Key of the user data to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayStdFile**](../Model/ScalewayStdFile.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listServerUserData()`
|
||||
|
||||
```php
|
||||
listServerUserData($zone, $server_id): \OpenAPI\Client\Model\ScalewayInstanceV1ListServerUserDataResponse
|
||||
```
|
||||
|
||||
List user data
|
||||
|
||||
List all user data keys registered on a specified Instance.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\UserDataApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listServerUserData($zone, $server_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling UserDataApi->listServerUserData: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListServerUserDataResponse**](../Model/ScalewayInstanceV1ListServerUserDataResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setServerUserData()`
|
||||
|
||||
```php
|
||||
setServerUserData($zone, $server_id, $key, $body)
|
||||
```
|
||||
|
||||
Add/set user data
|
||||
|
||||
Add or update a user data with the specified key on an Instance.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\UserDataApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$server_id = 'server_id_example'; // string | UUID of the Instance.
|
||||
$key = 'key_example'; // string | Key of the user data to set.
|
||||
$body = '/path/to/file.txt'; // \SplFileObject
|
||||
|
||||
try {
|
||||
$apiInstance->setServerUserData($zone, $server_id, $key, $body);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling UserDataApi->setServerUserData: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **server_id** | **string**| UUID of the Instance. | |
|
||||
| **key** | **string**| Key of the user data to set. | |
|
||||
| **body** | **\SplFileObject****\SplFileObject**| | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
74
docs/Api/VolumeTypesApi.md
Normal file
74
docs/Api/VolumeTypesApi.md
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
# OpenAPI\Client\VolumeTypesApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**listVolumesTypes()**](VolumeTypesApi.md#listVolumesTypes) | **GET** /instance/v1/zones/{zone}/products/volumes | List volume types |
|
||||
|
||||
|
||||
## `listVolumesTypes()`
|
||||
|
||||
```php
|
||||
listVolumesTypes($zone, $per_page, $page): \OpenAPI\Client\Model\ScalewayInstanceV1ListVolumesTypesResponse
|
||||
```
|
||||
|
||||
List volume types
|
||||
|
||||
List all volume types and their technical details.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumeTypesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$per_page = 56; // int
|
||||
$page = 56; // int
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listVolumesTypes($zone, $per_page, $page);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumeTypesApi->listVolumesTypes: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **per_page** | **int**| | [optional] |
|
||||
| **page** | **int**| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListVolumesTypesResponse**](../Model/ScalewayInstanceV1ListVolumesTypesResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
541
docs/Api/VolumesApi.md
Normal file
541
docs/Api/VolumesApi.md
Normal file
|
|
@ -0,0 +1,541 @@
|
|||
# OpenAPI\Client\VolumesApi
|
||||
|
||||
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**applyBlockMigration()**](VolumesApi.md#applyBlockMigration) | **POST** /instance/v1/zones/{zone}/block-migration/apply | Migrate a volume and/or snapshots to SBS (Scaleway Block Storage) |
|
||||
| [**createVolume()**](VolumesApi.md#createVolume) | **POST** /instance/v1/zones/{zone}/volumes | Create a volume |
|
||||
| [**deleteVolume()**](VolumesApi.md#deleteVolume) | **DELETE** /instance/v1/zones/{zone}/volumes/{volume_id} | Delete a volume |
|
||||
| [**getVolume()**](VolumesApi.md#getVolume) | **GET** /instance/v1/zones/{zone}/volumes/{volume_id} | Get a volume |
|
||||
| [**listVolumes()**](VolumesApi.md#listVolumes) | **GET** /instance/v1/zones/{zone}/volumes | List volumes |
|
||||
| [**planBlockMigration()**](VolumesApi.md#planBlockMigration) | **POST** /instance/v1/zones/{zone}/block-migration/plan | Get a volume or snapshot's migration plan |
|
||||
| [**setVolume()**](VolumesApi.md#setVolume) | **PUT** /instance/v1/zones/{zone}/volumes/{id} | Update volume |
|
||||
| [**updateVolume()**](VolumesApi.md#updateVolume) | **PATCH** /instance/v1/zones/{zone}/volumes/{volume_id} | Update a volume |
|
||||
|
||||
|
||||
## `applyBlockMigration()`
|
||||
|
||||
```php
|
||||
applyBlockMigration($zone, $apply_block_migration_request)
|
||||
```
|
||||
|
||||
Migrate a volume and/or snapshots to SBS (Scaleway Block Storage)
|
||||
|
||||
To be used, the call to this endpoint must be preceded by a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$apply_block_migration_request = new \OpenAPI\Client\Model\ApplyBlockMigrationRequest(); // \OpenAPI\Client\Model\ApplyBlockMigrationRequest
|
||||
|
||||
try {
|
||||
$apiInstance->applyBlockMigration($zone, $apply_block_migration_request);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumesApi->applyBlockMigration: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **apply_block_migration_request** | [**\OpenAPI\Client\Model\ApplyBlockMigrationRequest**](../Model/ApplyBlockMigrationRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `createVolume()`
|
||||
|
||||
```php
|
||||
createVolume($zone, $create_volume_request): \OpenAPI\Client\Model\ScalewayInstanceV1CreateVolumeResponse
|
||||
```
|
||||
|
||||
Create a volume
|
||||
|
||||
Create a volume of a specified type in an Availability Zone.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$create_volume_request = new \OpenAPI\Client\Model\CreateVolumeRequest(); // \OpenAPI\Client\Model\CreateVolumeRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->createVolume($zone, $create_volume_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumesApi->createVolume: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **create_volume_request** | [**\OpenAPI\Client\Model\CreateVolumeRequest**](../Model/CreateVolumeRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1CreateVolumeResponse**](../Model/ScalewayInstanceV1CreateVolumeResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `deleteVolume()`
|
||||
|
||||
```php
|
||||
deleteVolume($zone, $volume_id)
|
||||
```
|
||||
|
||||
Delete a volume
|
||||
|
||||
Delete the volume with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$volume_id = 'volume_id_example'; // string | UUID of the volume you want to delete.
|
||||
|
||||
try {
|
||||
$apiInstance->deleteVolume($zone, $volume_id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumesApi->deleteVolume: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **volume_id** | **string**| UUID of the volume you want to delete. | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `getVolume()`
|
||||
|
||||
```php
|
||||
getVolume($zone, $volume_id): \OpenAPI\Client\Model\ScalewayInstanceV1GetVolumeResponse
|
||||
```
|
||||
|
||||
Get a volume
|
||||
|
||||
Get details of a volume with the specified ID.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$volume_id = 'volume_id_example'; // string | UUID of the volume you want to get.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getVolume($zone, $volume_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumesApi->getVolume: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **volume_id** | **string**| UUID of the volume you want to get. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1GetVolumeResponse**](../Model/ScalewayInstanceV1GetVolumeResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `listVolumes()`
|
||||
|
||||
```php
|
||||
listVolumes($zone, $volume_type, $per_page, $page, $organization, $project, $tags, $name): \OpenAPI\Client\Model\ScalewayInstanceV1ListVolumesResponse
|
||||
```
|
||||
|
||||
List volumes
|
||||
|
||||
List volumes in the specified Availability Zone. You can filter the output by volume type.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$volume_type = 'l_ssd'; // string | Filter by volume type.
|
||||
$per_page = 56; // int | A positive integer lower or equal to 100 to select the number of items to return.
|
||||
$page = 56; // int | A positive integer to choose the page to return.
|
||||
$organization = 'organization_example'; // string | Filter volume by Organization ID.
|
||||
$project = 'project_example'; // string | Filter volume by Project ID.
|
||||
$tags = 'tags_example'; // string | Filter volumes with these exact tags (to filter with several tags, use commas to separate them).
|
||||
$name = 'name_example'; // string | Filter volume by name (for eg. \"vol\" will return \"myvolume\" but not \"data\").
|
||||
|
||||
try {
|
||||
$result = $apiInstance->listVolumes($zone, $volume_type, $per_page, $page, $organization, $project, $tags, $name);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumesApi->listVolumes: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **volume_type** | **string**| Filter by volume type. | [optional] [default to 'l_ssd'] |
|
||||
| **per_page** | **int**| A positive integer lower or equal to 100 to select the number of items to return. | [optional] |
|
||||
| **page** | **int**| A positive integer to choose the page to return. | [optional] |
|
||||
| **organization** | **string**| Filter volume by Organization ID. | [optional] |
|
||||
| **project** | **string**| Filter volume by Project ID. | [optional] |
|
||||
| **tags** | **string**| Filter volumes with these exact tags (to filter with several tags, use commas to separate them). | [optional] |
|
||||
| **name** | **string**| Filter volume by name (for eg. \"vol\" will return \"myvolume\" but not \"data\"). | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1ListVolumesResponse**](../Model/ScalewayInstanceV1ListVolumesResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `planBlockMigration()`
|
||||
|
||||
```php
|
||||
planBlockMigration($zone, $plan_block_migration_request): \OpenAPI\Client\Model\ScalewayInstanceV1MigrationPlan
|
||||
```
|
||||
|
||||
Get a volume or snapshot's migration plan
|
||||
|
||||
Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint afterward. The endpoint returns the resources that should be migrated together: - the volume and any snapshots created from the volume, if the call was made to plan a volume migration. - the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration. The endpoint also returns the validation_key, which must be provided to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint to confirm that all resources listed in the plan should be migrated.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$plan_block_migration_request = new \OpenAPI\Client\Model\PlanBlockMigrationRequest(); // \OpenAPI\Client\Model\PlanBlockMigrationRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->planBlockMigration($zone, $plan_block_migration_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumesApi->planBlockMigration: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **plan_block_migration_request** | [**\OpenAPI\Client\Model\PlanBlockMigrationRequest**](../Model/PlanBlockMigrationRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1MigrationPlan**](../Model/ScalewayInstanceV1MigrationPlan.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `setVolume()`
|
||||
|
||||
```php
|
||||
setVolume($zone, $id, $set_volume_request): \OpenAPI\Client\Model\ScalewayInstanceV1SetVolumeResponse
|
||||
```
|
||||
|
||||
Update volume
|
||||
|
||||
Replace all volume properties with a volume message.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$id = 'id_example'; // string | Unique ID of the volume.
|
||||
$set_volume_request = new \OpenAPI\Client\Model\SetVolumeRequest(); // \OpenAPI\Client\Model\SetVolumeRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->setVolume($zone, $id, $set_volume_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumesApi->setVolume: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **id** | **string**| Unique ID of the volume. | |
|
||||
| **set_volume_request** | [**\OpenAPI\Client\Model\SetVolumeRequest**](../Model/SetVolumeRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1SetVolumeResponse**](../Model/ScalewayInstanceV1SetVolumeResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `updateVolume()`
|
||||
|
||||
```php
|
||||
updateVolume($zone, $volume_id, $update_volume_request): \OpenAPI\Client\Model\ScalewayInstanceV1UpdateVolumeResponse
|
||||
```
|
||||
|
||||
Update a volume
|
||||
|
||||
Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only `b_ssd` volumes can currently be increased in size.
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure API key authorization: scaleway
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
|
||||
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\VolumesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$zone = 'zone_example'; // string | The zone you want to target
|
||||
$volume_id = 'volume_id_example'; // string | UUID of the volume.
|
||||
$update_volume_request = new \OpenAPI\Client\Model\UpdateVolumeRequest(); // \OpenAPI\Client\Model\UpdateVolumeRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->updateVolume($zone, $volume_id, $update_volume_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling VolumesApi->updateVolume: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **zone** | **string**| The zone you want to target | |
|
||||
| **volume_id** | **string**| UUID of the volume. | |
|
||||
| **update_volume_request** | [**\OpenAPI\Client\Model\UpdateVolumeRequest**](../Model/UpdateVolumeRequest.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OpenAPI\Client\Model\ScalewayInstanceV1UpdateVolumeResponse**](../Model/ScalewayInstanceV1UpdateVolumeResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[scaleway](../../README.md#scaleway)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue