Initial commit

This commit is contained in:
Pierre Lannoy 2025-12-19 14:45:32 +01:00
commit 0bb965d40a
Signed by: Pierre Lannoy
GPG key ID: D27231EF87D53F31
122 changed files with 36116 additions and 0 deletions

207
docs/Api/AllowedIPsApi.md Normal file
View file

@ -0,0 +1,207 @@
# OpenAPI\Client\AllowedIPsApi
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**addBastionAllowedIPs()**](AllowedIPsApi.md#addBastionAllowedIPs) | **POST** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips | Add allowed IP range to SSH bastion |
| [**deleteBastionAllowedIPs()**](AllowedIPsApi.md#deleteBastionAllowedIPs) | **DELETE** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips/{ip_range} | Delete allowed IP range from SSH bastion |
| [**setBastionAllowedIPs()**](AllowedIPsApi.md#setBastionAllowedIPs) | **PUT** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips | Set all IP ranges allowed for SSH bastion |
## `addBastionAllowedIPs()`
```php
addBastionAllowedIPs($zone, $gateway_id, $add_bastion_allowed_ips_request): \OpenAPI\Client\Model\ScalewayVpcGwV2AddBastionAllowedIPsResponse
```
Add allowed IP range to SSH bastion
Add an IP range (in CIDR notation) to be allowed to connect to the SSH bastion.
### 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\AllowedIPsApi(
// 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
$gateway_id = 'gateway_id_example'; // string | ID of the gateway to add the allowed IP range to.
$add_bastion_allowed_ips_request = new \OpenAPI\Client\Model\AddBastionAllowedIPsRequest(); // \OpenAPI\Client\Model\AddBastionAllowedIPsRequest
try {
$result = $apiInstance->addBastionAllowedIPs($zone, $gateway_id, $add_bastion_allowed_ips_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AllowedIPsApi->addBastionAllowedIPs: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_id** | **string**| ID of the gateway to add the allowed IP range to. | |
| **add_bastion_allowed_ips_request** | [**\OpenAPI\Client\Model\AddBastionAllowedIPsRequest**](../Model/AddBastionAllowedIPsRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2AddBastionAllowedIPsResponse**](../Model/ScalewayVpcGwV2AddBastionAllowedIPsResponse.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)
## `deleteBastionAllowedIPs()`
```php
deleteBastionAllowedIPs($zone, $gateway_id, $ip_range)
```
Delete allowed IP range from SSH bastion
Delete an IP range (defined in CIDR notation) from SSH bastion, so that it is no longer allowed to connect.
### 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\AllowedIPsApi(
// 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
$gateway_id = 'gateway_id_example'; // string | ID of the gateway on which to delete the allowed IP range.
$ip_range = 1.2.3.4/32; // string | IP range to delete from SSH bastion's list of allowed IPs. (IP network)
try {
$apiInstance->deleteBastionAllowedIPs($zone, $gateway_id, $ip_range);
} catch (Exception $e) {
echo 'Exception when calling AllowedIPsApi->deleteBastionAllowedIPs: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_id** | **string**| ID of the gateway on which to delete the allowed IP range. | |
| **ip_range** | **string**| IP range to delete from SSH bastion&#39;s list of allowed IPs. (IP network) | |
### 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)
## `setBastionAllowedIPs()`
```php
setBastionAllowedIPs($zone, $gateway_id, $set_bastion_allowed_ips_request): \OpenAPI\Client\Model\ScalewayVpcGwV2SetBastionAllowedIPsResponse
```
Set all IP ranges allowed for SSH bastion
Set a definitive list of IP ranges (in CIDR notation) allowed to connect to the SSH bastion.
### 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\AllowedIPsApi(
// 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
$gateway_id = 'gateway_id_example'; // string | ID of the gateway on which to set the allowed IP range.
$set_bastion_allowed_ips_request = new \OpenAPI\Client\Model\SetBastionAllowedIPsRequest(); // \OpenAPI\Client\Model\SetBastionAllowedIPsRequest
try {
$result = $apiInstance->setBastionAllowedIPs($zone, $gateway_id, $set_bastion_allowed_ips_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AllowedIPsApi->setBastionAllowedIPs: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_id** | **string**| ID of the gateway on which to set the allowed IP range. | |
| **set_bastion_allowed_ips_request** | [**\OpenAPI\Client\Model\SetBastionAllowedIPsRequest**](../Model/SetBastionAllowedIPsRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2SetBastionAllowedIPsResponse**](../Model/ScalewayVpcGwV2SetBastionAllowedIPsResponse.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)

View file

@ -0,0 +1,346 @@
# OpenAPI\Client\GatewayNetworksApi
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**createGatewayNetwork()**](GatewayNetworksApi.md#createGatewayNetwork) | **POST** /vpc-gw/v2/zones/{zone}/gateway-networks | Attach a Public Gateway to a Private Network |
| [**deleteGatewayNetwork()**](GatewayNetworksApi.md#deleteGatewayNetwork) | **DELETE** /vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id} | Detach a Public Gateway from a Private Network |
| [**getGatewayNetwork()**](GatewayNetworksApi.md#getGatewayNetwork) | **GET** /vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id} | Get a Public Gateway connection to a Private Network |
| [**listGatewayNetworks()**](GatewayNetworksApi.md#listGatewayNetworks) | **GET** /vpc-gw/v2/zones/{zone}/gateway-networks | List Public Gateway connections to Private Networks |
| [**updateGatewayNetwork()**](GatewayNetworksApi.md#updateGatewayNetwork) | **PATCH** /vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id} | Update a Public Gateway&#39;s connection to a Private Network |
## `createGatewayNetwork()`
```php
createGatewayNetwork($zone, $create_gateway_network_request): \OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork
```
Attach a Public Gateway to a Private Network
Attach a specific Public Gateway to a specific Private Network (create a GatewayNetwork). You can configure parameters for the connection including whether to enable masquerade (dynamic NAT), and more.
### 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\GatewayNetworksApi(
// 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_gateway_network_request = new \OpenAPI\Client\Model\CreateGatewayNetworkRequest(); // \OpenAPI\Client\Model\CreateGatewayNetworkRequest
try {
$result = $apiInstance->createGatewayNetwork($zone, $create_gateway_network_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewayNetworksApi->createGatewayNetwork: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **create_gateway_network_request** | [**\OpenAPI\Client\Model\CreateGatewayNetworkRequest**](../Model/CreateGatewayNetworkRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork**](../Model/ScalewayVpcGwV2GatewayNetwork.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)
## `deleteGatewayNetwork()`
```php
deleteGatewayNetwork($zone, $gateway_network_id): \OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork
```
Detach a Public Gateway from a Private Network
Detach a given Public Gateway from a given Private Network, i.e. delete a GatewayNetwork specified by a gateway_network_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\GatewayNetworksApi(
// 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
$gateway_network_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the GatewayNetwork to delete. (UUID format)
try {
$result = $apiInstance->deleteGatewayNetwork($zone, $gateway_network_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewayNetworksApi->deleteGatewayNetwork: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_network_id** | **string**| ID of the GatewayNetwork to delete. (UUID format) | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork**](../Model/ScalewayVpcGwV2GatewayNetwork.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)
## `getGatewayNetwork()`
```php
getGatewayNetwork($zone, $gateway_network_id): \OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork
```
Get a Public Gateway connection to a Private Network
Get details of a given connection between a Public Gateway and a Private Network (this connection = a GatewayNetwork), specified by its `gateway_network_id`. The response object contains details of the connection including the IDs of the Public Gateway and Private Network, the dates the connection was created/updated and its configuration settings.
### 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\GatewayNetworksApi(
// 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
$gateway_network_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the GatewayNetwork to fetch. (UUID format)
try {
$result = $apiInstance->getGatewayNetwork($zone, $gateway_network_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewayNetworksApi->getGatewayNetwork: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_network_id** | **string**| ID of the GatewayNetwork to fetch. (UUID format) | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork**](../Model/ScalewayVpcGwV2GatewayNetwork.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)
## `listGatewayNetworks()`
```php
listGatewayNetworks($zone, $order_by, $page, $page_size, $status, $gateway_ids, $private_network_ids, $masquerade_enabled): \OpenAPI\Client\Model\ScalewayVpcGwV2ListGatewayNetworksResponse
```
List Public Gateway connections to Private Networks
List the connections between Public Gateways and Private Networks (a connection = a GatewayNetwork). You can choose to filter by `gateway-id` to list all Private Networks attached to the specified Public Gateway, or by `private_network_id` to list all Public Gateways attached to the specified Private Network. Other query parameters are also available. The result is an array of GatewayNetwork objects, each giving details of the connection between a given Public Gateway and a given 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\GatewayNetworksApi(
// 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
$order_by = 'created_at_asc'; // string | Order in which to return results.
$page = 56; // int | Page number.
$page_size = 56; // int | GatewayNetworks per page.
$status = array(new \OpenAPI\Client\Model\\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetworkStatus()); // \OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetworkStatus[] | Filter for GatewayNetworks with these status. Use `unknown` to include all statuses.
$gateway_ids = array('gateway_ids_example'); // string[] | Filter for GatewayNetworks connected to these gateways.
$private_network_ids = array('private_network_ids_example'); // string[] | Filter for GatewayNetworks connected to these Private Networks.
$masquerade_enabled = True; // bool | Filter for GatewayNetworks with this `enable_masquerade` setting.
try {
$result = $apiInstance->listGatewayNetworks($zone, $order_by, $page, $page_size, $status, $gateway_ids, $private_network_ids, $masquerade_enabled);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewayNetworksApi->listGatewayNetworks: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **order_by** | **string**| Order in which to return results. | [optional] [default to &#39;created_at_asc&#39;] |
| **page** | **int**| Page number. | [optional] |
| **page_size** | **int**| GatewayNetworks per page. | [optional] |
| **status** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetworkStatus[]**](../Model/\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetworkStatus.md)| Filter for GatewayNetworks with these status. Use &#x60;unknown&#x60; to include all statuses. | [optional] |
| **gateway_ids** | [**string[]**](../Model/string.md)| Filter for GatewayNetworks connected to these gateways. | [optional] |
| **private_network_ids** | [**string[]**](../Model/string.md)| Filter for GatewayNetworks connected to these Private Networks. | [optional] |
| **masquerade_enabled** | **bool**| Filter for GatewayNetworks with this &#x60;enable_masquerade&#x60; setting. | [optional] |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2ListGatewayNetworksResponse**](../Model/ScalewayVpcGwV2ListGatewayNetworksResponse.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)
## `updateGatewayNetwork()`
```php
updateGatewayNetwork($zone, $gateway_network_id, $update_gateway_network_request): \OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork
```
Update a Public Gateway's connection to a Private Network
Update the configuration parameters of a connection between a given Public Gateway and Private Network (the connection = a GatewayNetwork). Updatable parameters include whether to enable traffic masquerade (dynamic NAT).
### 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\GatewayNetworksApi(
// 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
$gateway_network_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the GatewayNetwork to update. (UUID format)
$update_gateway_network_request = new \OpenAPI\Client\Model\UpdateGatewayNetworkRequest(); // \OpenAPI\Client\Model\UpdateGatewayNetworkRequest
try {
$result = $apiInstance->updateGatewayNetwork($zone, $gateway_network_id, $update_gateway_network_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewayNetworksApi->updateGatewayNetwork: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_network_id** | **string**| ID of the GatewayNetwork to update. (UUID format) | |
| **update_gateway_network_request** | [**\OpenAPI\Client\Model\UpdateGatewayNetworkRequest**](../Model/UpdateGatewayNetworkRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork**](../Model/ScalewayVpcGwV2GatewayNetwork.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)

View file

@ -0,0 +1,70 @@
# OpenAPI\Client\GatewayTypesApi
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**listGatewayTypes()**](GatewayTypesApi.md#listGatewayTypes) | **GET** /vpc-gw/v2/zones/{zone}/gateway-types | List Public Gateway types |
## `listGatewayTypes()`
```php
listGatewayTypes($zone): \OpenAPI\Client\Model\ScalewayVpcGwV2ListGatewayTypesResponse
```
List Public Gateway types
List the different Public Gateway commercial offer types available at Scaleway. The response is an array of objects describing the name and technical details of each available gateway 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\GatewayTypesApi(
// 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->listGatewayTypes($zone);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewayTypesApi->listGatewayTypes: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2ListGatewayTypesResponse**](../Model/ScalewayVpcGwV2ListGatewayTypesResponse.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)

490
docs/Api/GatewaysApi.md Normal file
View file

@ -0,0 +1,490 @@
# OpenAPI\Client\GatewaysApi
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**createGateway()**](GatewaysApi.md#createGateway) | **POST** /vpc-gw/v2/zones/{zone}/gateways | Create a Public Gateway |
| [**deleteGateway()**](GatewaysApi.md#deleteGateway) | **DELETE** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id} | Delete a Public Gateway |
| [**getGateway()**](GatewaysApi.md#getGateway) | **GET** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id} | Get a Public Gateway |
| [**listGateways()**](GatewaysApi.md#listGateways) | **GET** /vpc-gw/v2/zones/{zone}/gateways | List Public Gateways |
| [**refreshSSHKeys()**](GatewaysApi.md#refreshSSHKeys) | **POST** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/refresh-ssh-keys | Refresh a Public Gateway&#39;s SSH keys |
| [**updateGateway()**](GatewaysApi.md#updateGateway) | **PATCH** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id} | Update a Public Gateway |
| [**upgradeGateway()**](GatewaysApi.md#upgradeGateway) | **POST** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/upgrade | Upgrade a Public Gateway to the latest version and/or to a different commercial offer type |
## `createGateway()`
```php
createGateway($zone, $create_gateway_request): \OpenAPI\Client\Model\ScalewayVpcGwV2Gateway
```
Create a Public Gateway
Create a new Public Gateway in the specified Scaleway Project, defining its **name**, **type** and other configuration details such as whether to enable SSH bastion.
### 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\GatewaysApi(
// 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_gateway_request = new \OpenAPI\Client\Model\CreateGatewayRequest(); // \OpenAPI\Client\Model\CreateGatewayRequest
try {
$result = $apiInstance->createGateway($zone, $create_gateway_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewaysApi->createGateway: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **create_gateway_request** | [**\OpenAPI\Client\Model\CreateGatewayRequest**](../Model/CreateGatewayRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2Gateway**](../Model/ScalewayVpcGwV2Gateway.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)
## `deleteGateway()`
```php
deleteGateway($zone, $gateway_id, $delete_ip): \OpenAPI\Client\Model\ScalewayVpcGwV2Gateway
```
Delete a Public Gateway
Delete an existing Public Gateway, specified by its gateway ID. This action is irreversible.
### 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\GatewaysApi(
// 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
$gateway_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the gateway to delete. (UUID format)
$delete_ip = True; // bool | Defines whether the PGW's IP should be deleted.
try {
$result = $apiInstance->deleteGateway($zone, $gateway_id, $delete_ip);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewaysApi->deleteGateway: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_id** | **string**| ID of the gateway to delete. (UUID format) | |
| **delete_ip** | **bool**| Defines whether the PGW&#39;s IP should be deleted. | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2Gateway**](../Model/ScalewayVpcGwV2Gateway.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)
## `getGateway()`
```php
getGateway($zone, $gateway_id): \OpenAPI\Client\Model\ScalewayVpcGwV2Gateway
```
Get a Public Gateway
Get details of a Public Gateway, specified by its gateway ID. The response object contains full details of the gateway, including its **name**, **type**, **status** and more.
### 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\GatewaysApi(
// 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
$gateway_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the gateway to fetch. (UUID format)
try {
$result = $apiInstance->getGateway($zone, $gateway_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewaysApi->getGateway: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_id** | **string**| ID of the gateway to fetch. (UUID format) | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2Gateway**](../Model/ScalewayVpcGwV2Gateway.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)
## `listGateways()`
```php
listGateways($zone, $order_by, $page, $page_size, $organization_id, $project_id, $name, $tags, $types, $status, $private_network_ids, $include_legacy): \OpenAPI\Client\Model\ScalewayVpcGwV2ListGatewaysResponse
```
List Public Gateways
List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date.
### 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\GatewaysApi(
// 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
$order_by = 'created_at_asc'; // string | Order in which to return results.
$page = 56; // int | Page number to return.
$page_size = 56; // int | Gateways per page.
$organization_id = 6170692e-7363-616c-6577-61792e636f6d; // string | Include only gateways in this Organization. (UUID format)
$project_id = 6170692e-7363-616c-6577-61792e636f6d; // string | Include only gateways in this Project. (UUID format)
$name = 'name_example'; // string | Filter for gateways which have this search term in their name.
$tags = array('tags_example'); // string[] | Filter for gateways with these tags.
$types = array('types_example'); // string[] | Filter for gateways of these types.
$status = array(new \OpenAPI\Client\Model\\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayStatus()); // \OpenAPI\Client\Model\ScalewayVpcGwV2GatewayStatus[] | Filter for gateways with these status. Use `unknown` to include all statuses.
$private_network_ids = array('private_network_ids_example'); // string[] | Filter for gateways attached to these Private Networks.
$include_legacy = True; // bool | Include also legacy gateways.
try {
$result = $apiInstance->listGateways($zone, $order_by, $page, $page_size, $organization_id, $project_id, $name, $tags, $types, $status, $private_network_ids, $include_legacy);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewaysApi->listGateways: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **order_by** | **string**| Order in which to return results. | [optional] [default to &#39;created_at_asc&#39;] |
| **page** | **int**| Page number to return. | [optional] |
| **page_size** | **int**| Gateways per page. | [optional] |
| **organization_id** | **string**| Include only gateways in this Organization. (UUID format) | [optional] |
| **project_id** | **string**| Include only gateways in this Project. (UUID format) | [optional] |
| **name** | **string**| Filter for gateways which have this search term in their name. | [optional] |
| **tags** | [**string[]**](../Model/string.md)| Filter for gateways with these tags. | [optional] |
| **types** | [**string[]**](../Model/string.md)| Filter for gateways of these types. | [optional] |
| **status** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayStatus[]**](../Model/\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayStatus.md)| Filter for gateways with these status. Use &#x60;unknown&#x60; to include all statuses. | [optional] |
| **private_network_ids** | [**string[]**](../Model/string.md)| Filter for gateways attached to these Private Networks. | [optional] |
| **include_legacy** | **bool**| Include also legacy gateways. | [optional] |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2ListGatewaysResponse**](../Model/ScalewayVpcGwV2ListGatewaysResponse.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)
## `refreshSSHKeys()`
```php
refreshSSHKeys($zone, $gateway_id, $body): \OpenAPI\Client\Model\ScalewayVpcGwV2Gateway
```
Refresh a Public Gateway's SSH keys
Refresh the SSH keys of a given Public Gateway, specified by its gateway ID. This adds any new SSH keys in the gateway's Scaleway Project to the gateway itself.
### 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\GatewaysApi(
// 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
$gateway_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the gateway to refresh SSH keys on. (UUID format)
$body = array('key' => new \stdClass); // object
try {
$result = $apiInstance->refreshSSHKeys($zone, $gateway_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewaysApi->refreshSSHKeys: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_id** | **string**| ID of the gateway to refresh SSH keys on. (UUID format) | |
| **body** | **object**| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2Gateway**](../Model/ScalewayVpcGwV2Gateway.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)
## `updateGateway()`
```php
updateGateway($zone, $gateway_id, $update_gateway_request): \OpenAPI\Client\Model\ScalewayVpcGwV2Gateway
```
Update a Public Gateway
Update the parameters of an existing Public Gateway, for example, its **name**, **tags**, **SSH bastion configuration**, and **DNS servers**.
### 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\GatewaysApi(
// 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
$gateway_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the gateway to update. (UUID format)
$update_gateway_request = new \OpenAPI\Client\Model\UpdateGatewayRequest(); // \OpenAPI\Client\Model\UpdateGatewayRequest
try {
$result = $apiInstance->updateGateway($zone, $gateway_id, $update_gateway_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewaysApi->updateGateway: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_id** | **string**| ID of the gateway to update. (UUID format) | |
| **update_gateway_request** | [**\OpenAPI\Client\Model\UpdateGatewayRequest**](../Model/UpdateGatewayRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2Gateway**](../Model/ScalewayVpcGwV2Gateway.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)
## `upgradeGateway()`
```php
upgradeGateway($zone, $gateway_id, $upgrade_gateway_request): \OpenAPI\Client\Model\ScalewayVpcGwV2Gateway
```
Upgrade a Public Gateway to the latest version and/or to a different commercial offer type
Upgrade a given Public Gateway to the newest software version or to a different commercial offer type. This applies the latest bugfixes and features to your Public Gateway. Note that gateway service will be interrupted during the update.
### 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\GatewaysApi(
// 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
$gateway_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the gateway to upgrade. (UUID format)
$upgrade_gateway_request = new \OpenAPI\Client\Model\UpgradeGatewayRequest(); // \OpenAPI\Client\Model\UpgradeGatewayRequest
try {
$result = $apiInstance->upgradeGateway($zone, $gateway_id, $upgrade_gateway_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GatewaysApi->upgradeGateway: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **gateway_id** | **string**| ID of the gateway to upgrade. (UUID format) | |
| **upgrade_gateway_request** | [**\OpenAPI\Client\Model\UpgradeGatewayRequest**](../Model/UpgradeGatewayRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2Gateway**](../Model/ScalewayVpcGwV2Gateway.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)

347
docs/Api/IPsApi.md Normal file
View file

@ -0,0 +1,347 @@
# 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** /vpc-gw/v2/zones/{zone}/ips | Reserve an IP |
| [**deleteIP()**](IPsApi.md#deleteIP) | **DELETE** /vpc-gw/v2/zones/{zone}/ips/{ip_id} | Delete an IP |
| [**getIP()**](IPsApi.md#getIP) | **GET** /vpc-gw/v2/zones/{zone}/ips/{ip_id} | Get an IP |
| [**listIPs()**](IPsApi.md#listIPs) | **GET** /vpc-gw/v2/zones/{zone}/ips | List IPs |
| [**updateIP()**](IPsApi.md#updateIP) | **PATCH** /vpc-gw/v2/zones/{zone}/ips/{ip_id} | Update an IP |
## `createIP()`
```php
createIP($zone, $create_ip_request): \OpenAPI\Client\Model\ScalewayVpcGwV2IP
```
Reserve an IP
Create (reserve) a new flexible IP address that can be used for a Public Gateway in a specified Scaleway Project.
### 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\ScalewayVpcGwV2IP**](../Model/ScalewayVpcGwV2IP.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_id)
```
Delete an IP
Delete a flexible IP address from your account. This action is irreversible.
### 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_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the IP address to delete. (UUID format)
try {
$apiInstance->deleteIP($zone, $ip_id);
} 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_id** | **string**| ID of the IP address to delete. (UUID format) | |
### 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_id): \OpenAPI\Client\Model\ScalewayVpcGwV2IP
```
Get an IP
Get details of a Public Gateway flexible IP address, identified by its IP ID. The response object contains information including which (if any) Public Gateway using this IP address, the reverse and various other metadata.
### 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_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the IP address to get. (UUID format)
try {
$result = $apiInstance->getIP($zone, $ip_id);
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_id** | **string**| ID of the IP address to get. (UUID format) | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2IP**](../Model/ScalewayVpcGwV2IP.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, $order_by, $page, $page_size, $organization_id, $project_id, $tags, $reverse, $is_free): \OpenAPI\Client\Model\ScalewayVpcGwV2ListIPsResponse
```
List IPs
List Public Gateway flexible IP addresses. A number of filter options are available for limiting results in the response.
### 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
$order_by = 'created_at_asc'; // string | Order in which to return results.
$page = 56; // int | Page number.
$page_size = 56; // int | IP addresses per page.
$organization_id = 6170692e-7363-616c-6577-61792e636f6d; // string | Include only gateways in this Organization. (UUID format)
$project_id = 6170692e-7363-616c-6577-61792e636f6d; // string | Filter for IP addresses in this Project. (UUID format)
$tags = array('tags_example'); // string[] | Filter for IP addresses with these tags.
$reverse = 'reverse_example'; // string | Filter for IP addresses that have a reverse containing this string.
$is_free = True; // bool | Filter based on whether the IP is attached to a gateway or not.
try {
$result = $apiInstance->listIPs($zone, $order_by, $page, $page_size, $organization_id, $project_id, $tags, $reverse, $is_free);
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 | |
| **order_by** | **string**| Order in which to return results. | [optional] [default to &#39;created_at_asc&#39;] |
| **page** | **int**| Page number. | [optional] |
| **page_size** | **int**| IP addresses per page. | [optional] |
| **organization_id** | **string**| Include only gateways in this Organization. (UUID format) | [optional] |
| **project_id** | **string**| Filter for IP addresses in this Project. (UUID format) | [optional] |
| **tags** | [**string[]**](../Model/string.md)| Filter for IP addresses with these tags. | [optional] |
| **reverse** | **string**| Filter for IP addresses that have a reverse containing this string. | [optional] |
| **is_free** | **bool**| Filter based on whether the IP is attached to a gateway or not. | [optional] |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2ListIPsResponse**](../Model/ScalewayVpcGwV2ListIPsResponse.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_id, $update_ip_request): \OpenAPI\Client\Model\ScalewayVpcGwV2IP
```
Update an IP
Update details of an existing flexible IP address, including its tags, reverse and the Public Gateway it is assigned to.
### 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_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the IP address to update. (UUID format)
$update_ip_request = new \OpenAPI\Client\Model\UpdateIPRequest(); // \OpenAPI\Client\Model\UpdateIPRequest
try {
$result = $apiInstance->updateIP($zone, $ip_id, $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_id** | **string**| ID of the IP address to update. (UUID format) | |
| **update_ip_request** | [**\OpenAPI\Client\Model\UpdateIPRequest**](../Model/UpdateIPRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2IP**](../Model/ScalewayVpcGwV2IP.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)

408
docs/Api/PATRulesApi.md Normal file
View file

@ -0,0 +1,408 @@
# OpenAPI\Client\PATRulesApi
All URIs are relative to https://api.scaleway.com, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**createPatRule()**](PATRulesApi.md#createPatRule) | **POST** /vpc-gw/v2/zones/{zone}/pat-rules | Create a PAT rule |
| [**deletePatRule()**](PATRulesApi.md#deletePatRule) | **DELETE** /vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id} | Delete a PAT rule |
| [**getPatRule()**](PATRulesApi.md#getPatRule) | **GET** /vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id} | Get a PAT rule |
| [**listPatRules()**](PATRulesApi.md#listPatRules) | **GET** /vpc-gw/v2/zones/{zone}/pat-rules | List PAT rules |
| [**setPatRules()**](PATRulesApi.md#setPatRules) | **PUT** /vpc-gw/v2/zones/{zone}/pat-rules | Set all PAT rules |
| [**updatePatRule()**](PATRulesApi.md#updatePatRule) | **PATCH** /vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id} | Update a PAT rule |
## `createPatRule()`
```php
createPatRule($zone, $create_pat_rule_request): \OpenAPI\Client\Model\ScalewayVpcGwV2PatRule
```
Create a PAT rule
Create a new PAT rule on a specified Public Gateway, defining the protocol to use, public port to listen on, and private port / IP address to map to.
### 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\PATRulesApi(
// 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_pat_rule_request = new \OpenAPI\Client\Model\CreatePatRuleRequest(); // \OpenAPI\Client\Model\CreatePatRuleRequest
try {
$result = $apiInstance->createPatRule($zone, $create_pat_rule_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PATRulesApi->createPatRule: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **create_pat_rule_request** | [**\OpenAPI\Client\Model\CreatePatRuleRequest**](../Model/CreatePatRuleRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2PatRule**](../Model/ScalewayVpcGwV2PatRule.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)
## `deletePatRule()`
```php
deletePatRule($zone, $pat_rule_id)
```
Delete a PAT rule
Delete a PAT rule, identified by its PAT rule ID. This action is irreversible.
### 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\PATRulesApi(
// 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
$pat_rule_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the PAT rule to delete. (UUID format)
try {
$apiInstance->deletePatRule($zone, $pat_rule_id);
} catch (Exception $e) {
echo 'Exception when calling PATRulesApi->deletePatRule: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **pat_rule_id** | **string**| ID of the PAT rule to delete. (UUID format) | |
### 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)
## `getPatRule()`
```php
getPatRule($zone, $pat_rule_id): \OpenAPI\Client\Model\ScalewayVpcGwV2PatRule
```
Get a PAT rule
Get a PAT rule, specified by its PAT rule ID. The response object gives full details of the PAT rule, including the Public Gateway it belongs to and the configuration settings in terms of public / private ports, private IP and protocol.
### 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\PATRulesApi(
// 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
$pat_rule_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the PAT rule to get. (UUID format)
try {
$result = $apiInstance->getPatRule($zone, $pat_rule_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PATRulesApi->getPatRule: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **pat_rule_id** | **string**| ID of the PAT rule to get. (UUID format) | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2PatRule**](../Model/ScalewayVpcGwV2PatRule.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)
## `listPatRules()`
```php
listPatRules($zone, $order_by, $page, $page_size, $gateway_ids, $private_ips, $protocol): \OpenAPI\Client\Model\ScalewayVpcGwV2ListPatRulesResponse
```
List PAT rules
List PAT rules. You can filter by gateway ID to list all PAT rules for a particular gateway, or filter for PAT rules targeting a specific IP address or using a specific protocol.
### 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\PATRulesApi(
// 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
$order_by = 'created_at_asc'; // string | Order in which to return results.
$page = 56; // int | Page number.
$page_size = 56; // int | PAT rules per page.
$gateway_ids = array('gateway_ids_example'); // string[] | Filter for PAT rules on these gateways.
$private_ips = array('private_ips_example'); // string[] | Filter for PAT rules targeting these private ips.
$protocol = 'unknown_protocol'; // string | Filter for PAT rules with this protocol.
try {
$result = $apiInstance->listPatRules($zone, $order_by, $page, $page_size, $gateway_ids, $private_ips, $protocol);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PATRulesApi->listPatRules: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **order_by** | **string**| Order in which to return results. | [optional] [default to &#39;created_at_asc&#39;] |
| **page** | **int**| Page number. | [optional] |
| **page_size** | **int**| PAT rules per page. | [optional] |
| **gateway_ids** | [**string[]**](../Model/string.md)| Filter for PAT rules on these gateways. | [optional] |
| **private_ips** | [**string[]**](../Model/string.md)| Filter for PAT rules targeting these private ips. | [optional] |
| **protocol** | **string**| Filter for PAT rules with this protocol. | [optional] [default to &#39;unknown_protocol&#39;] |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2ListPatRulesResponse**](../Model/ScalewayVpcGwV2ListPatRulesResponse.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)
## `setPatRules()`
```php
setPatRules($zone, $set_pat_rules_request): \OpenAPI\Client\Model\ScalewayVpcGwV2SetPatRulesResponse
```
Set all PAT rules
Set a definitive list of PAT rules attached to a Public Gateway. Each rule is identified by its public port and protocol. This will sync the current PAT rule list on the gateway with the new list, creating, updating or deleting PAT rules accordingly.
### 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\PATRulesApi(
// 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
$set_pat_rules_request = new \OpenAPI\Client\Model\SetPatRulesRequest(); // \OpenAPI\Client\Model\SetPatRulesRequest
try {
$result = $apiInstance->setPatRules($zone, $set_pat_rules_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PATRulesApi->setPatRules: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **set_pat_rules_request** | [**\OpenAPI\Client\Model\SetPatRulesRequest**](../Model/SetPatRulesRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2SetPatRulesResponse**](../Model/ScalewayVpcGwV2SetPatRulesResponse.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)
## `updatePatRule()`
```php
updatePatRule($zone, $pat_rule_id, $update_pat_rule_request): \OpenAPI\Client\Model\ScalewayVpcGwV2PatRule
```
Update a PAT rule
Update a PAT rule, specified by its PAT rule ID. Configuration settings including private/public port, private IP address and protocol can all be updated.
### 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\PATRulesApi(
// 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
$pat_rule_id = 6170692e-7363-616c-6577-61792e636f6d; // string | ID of the PAT rule to update. (UUID format)
$update_pat_rule_request = new \OpenAPI\Client\Model\UpdatePatRuleRequest(); // \OpenAPI\Client\Model\UpdatePatRuleRequest
try {
$result = $apiInstance->updatePatRule($zone, $pat_rule_id, $update_pat_rule_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PATRulesApi->updatePatRule: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **zone** | **string**| The zone you want to target | |
| **pat_rule_id** | **string**| ID of the PAT rule to update. (UUID format) | |
| **update_pat_rule_request** | [**\OpenAPI\Client\Model\UpdatePatRuleRequest**](../Model/UpdatePatRuleRequest.md)| | |
### Return type
[**\OpenAPI\Client\Model\ScalewayVpcGwV2PatRule**](../Model/ScalewayVpcGwV2PatRule.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)

View file

@ -0,0 +1,9 @@
# # AddBastionAllowedIPsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ip_range** | **string** | IP range allowed to connect to the SSH bastion. (IP network) | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,13 @@
# # CreateGatewayNetworkRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**gateway_id** | **string** | Public Gateway to connect. (UUID format) | [optional]
**private_network_id** | **string** | Private Network to connect. (UUID format) | [optional]
**enable_masquerade** | **bool** | Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork. | [optional]
**push_default_route** | **bool** | Enabling the default route also enables masquerading. | [optional]
**ipam_ip_id** | **string** | Use this IPAM-booked IP ID as the Gateway&#39;s IP in this Private Network. (UUID format) | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,16 @@
# # CreateGatewayRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**project_id** | **string** | Scaleway Project to create the gateway in. (UUID format) | [optional]
**name** | **string** | Name for the gateway. | [optional]
**tags** | **string[]** | Tags for the gateway. | [optional]
**type** | **string** | Gateway type (commercial offer type). | [optional]
**ip_id** | **string** | Existing IP address to attach to the gateway. (UUID format) | [optional]
**enable_smtp** | **bool** | Defines whether SMTP traffic should be allowed pass through the gateway. | [optional]
**enable_bastion** | **bool** | Defines whether SSH bastion should be enabled the gateway. | [optional]
**bastion_port** | **int** | Port of the SSH bastion. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,10 @@
# # CreateIPRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**project_id** | **string** | Project to create the IP address in. (UUID format) | [optional]
**tags** | **string[]** | Tags to give to the IP address. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,13 @@
# # CreatePatRuleRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**gateway_id** | **string** | ID of the Gateway on which to create the rule. (UUID format) | [optional]
**public_port** | **int** | Public port to listen on. | [optional]
**private_ip** | **string** | Private IP to forward data to. (IP address) | [optional]
**private_port** | **int** | Private port to translate to. | [optional]
**protocol** | **string** | Protocol the rule should apply to. | [optional] [default to 'unknown_protocol']
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,9 @@
# # ScalewayVpcGwV2AddBastionAllowedIPsResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ip_ranges** | **string[]** | Ranges of IP addresses allowed to connect to the gateway&#39;s SSH bastion. (IP network) | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,28 @@
# # ScalewayVpcGwV2Gateway
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | ID of the gateway. (UUID format) | [optional]
**organization_id** | **string** | Owning Organization. (UUID format) | [optional]
**project_id** | **string** | Owning Project. (UUID format) | [optional]
**created_at** | **\DateTime** | Gateway creation date. (RFC 3339 format) | [optional]
**updated_at** | **\DateTime** | Gateway last modification date. (RFC 3339 format) | [optional]
**type** | **string** | Gateway type name (commercial offer). | [optional]
**bandwidth** | **int** | Bandwidth available of the gateway. | [optional]
**status** | **string** | Current status of the gateway. | [optional] [default to 'unknown_status']
**name** | **string** | Name of the gateway. | [optional]
**tags** | **string[]** | Tags associated with the gateway. | [optional]
**ipv4** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayIpv4**](ScalewayVpcGwV2GatewayIpv4.md) | | [optional]
**gateway_networks** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork[]**](ScalewayVpcGwV2GatewayNetwork.md) | GatewayNetwork objects attached to the gateway (each one represents a connection to a Private Network). | [optional]
**version** | **string** | Version of the running gateway software. | [optional]
**can_upgrade_to** | **string** | Newly available gateway software version that can be updated to. | [optional]
**bastion_enabled** | **bool** | Defines whether SSH bastion is enabled on the gateway. | [optional]
**bastion_port** | **int** | Port of the SSH bastion. | [optional]
**smtp_enabled** | **bool** | Defines whether SMTP traffic is allowed to pass through the gateway. | [optional]
**is_legacy** | **bool** | Defines whether the gateway uses non-IPAM IP configurations. | [optional]
**bastion_allowed_ips** | **string[]** | Ranges of IP addresses allowed to connect to the gateway&#39;s SSH bastion. (IP network) | [optional]
**zone** | **string** | Zone of the gateway. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,18 @@
# # ScalewayVpcGwV2GatewayIpv4
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | IP address ID. (UUID format) | [optional]
**organization_id** | **string** | Owning Organization. (UUID format) | [optional]
**project_id** | **string** | Owning Project. (UUID format) | [optional]
**created_at** | **\DateTime** | IP address creation date. (RFC 3339 format) | [optional]
**updated_at** | **\DateTime** | IP address last modification date. (RFC 3339 format) | [optional]
**tags** | **string[]** | Tags associated with the IP address. | [optional]
**address** | **string** | The IP address itself. (IP address) | [optional]
**reverse** | **string** | Reverse domain name for the IP address. | [optional]
**gateway_id** | **string** | Public Gateway associated with the IP address. (UUID format) | [optional]
**zone** | **string** | Zone of the IP address. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,19 @@
# # ScalewayVpcGwV2GatewayNetwork
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | ID of the Public Gateway-Private Network connection. (UUID format) | [optional]
**created_at** | **\DateTime** | Connection creation date. (RFC 3339 format) | [optional]
**updated_at** | **\DateTime** | Connection last modification date. (RFC 3339 format) | [optional]
**gateway_id** | **string** | ID of the connected Public Gateway. (UUID format) | [optional]
**private_network_id** | **string** | ID of the connected Private Network. (UUID format) | [optional]
**mac_address** | **string** | MAC address of the gateway in the Private Network (if the gateway is up and running). | [optional]
**masquerade_enabled** | **bool** | Defines whether the gateway masquerades traffic for this Private Network (Dynamic NAT). | [optional]
**status** | **string** | Current status of the Public Gateway&#39;s connection to the Private Network. | [optional] [default to 'unknown_status']
**push_default_route** | **bool** | Enabling the default route also enables masquerading. | [optional]
**ipam_ip_id** | **string** | Use this IPAM-booked IP ID as the Gateway&#39;s IP in this Private Network. (UUID format) | [optional]
**zone** | **string** | Zone of the GatewayNetwork connection. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,8 @@
# # ScalewayVpcGwV2GatewayNetworkStatus
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,8 @@
# # ScalewayVpcGwV2GatewayStatus
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,11 @@
# # ScalewayVpcGwV2GatewayType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Public Gateway type name. | [optional]
**bandwidth** | **int** | Bandwidth, in bps, of the Public Gateway. This is the public bandwidth to the outer Internet, and the internal bandwidth to each connected Private Networks. | [optional]
**zone** | **string** | Zone the Public Gateway type is available in. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,18 @@
# # ScalewayVpcGwV2IP
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | IP address ID. (UUID format) | [optional]
**organization_id** | **string** | Owning Organization. (UUID format) | [optional]
**project_id** | **string** | Owning Project. (UUID format) | [optional]
**created_at** | **\DateTime** | IP address creation date. (RFC 3339 format) | [optional]
**updated_at** | **\DateTime** | IP address last modification date. (RFC 3339 format) | [optional]
**tags** | **string[]** | Tags associated with the IP address. | [optional]
**address** | **string** | The IP address itself. (IP address) | [optional]
**reverse** | **string** | Reverse domain name for the IP address. | [optional]
**gateway_id** | **string** | Public Gateway associated with the IP address. (UUID format) | [optional]
**zone** | **string** | Zone of the IP address. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,10 @@
# # ScalewayVpcGwV2ListGatewayNetworksResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**gateway_networks** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayNetwork[]**](ScalewayVpcGwV2GatewayNetwork.md) | GatewayNetworks on this page. | [optional]
**total_count** | **int** | Total GatewayNetworks count matching the filter. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,9 @@
# # ScalewayVpcGwV2ListGatewayTypesResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**types** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2GatewayType[]**](ScalewayVpcGwV2GatewayType.md) | Available types of Public Gateway. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,10 @@
# # ScalewayVpcGwV2ListGatewaysResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**gateways** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2Gateway[]**](ScalewayVpcGwV2Gateway.md) | Gateways on this page. | [optional]
**total_count** | **int** | Total count of gateways matching the filter. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,10 @@
# # ScalewayVpcGwV2ListIPsResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ips** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2IP[]**](ScalewayVpcGwV2IP.md) | IP addresses on this page. | [optional]
**total_count** | **int** | Total count of IP addresses matching the filter. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,10 @@
# # ScalewayVpcGwV2ListPatRulesResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pat_rules** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2PatRule[]**](ScalewayVpcGwV2PatRule.md) | Array of PAT rules matching the filter. | [optional]
**total_count** | **int** | Total count of PAT rules matching the filter. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,17 @@
# # ScalewayVpcGwV2PatRule
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | PAT rule ID. (UUID format) | [optional]
**gateway_id** | **string** | Gateway the PAT rule applies to. (UUID format) | [optional]
**created_at** | **\DateTime** | PAT rule creation date. (RFC 3339 format) | [optional]
**updated_at** | **\DateTime** | PAT rule last modification date. (RFC 3339 format) | [optional]
**public_port** | **int** | Public port to listen on. | [optional]
**private_ip** | **string** | Private IP address to forward data to. (IP address) | [optional]
**private_port** | **int** | Private port to translate to. | [optional]
**protocol** | **string** | Protocol the rule applies to. | [optional] [default to 'unknown_protocol']
**zone** | **string** | Zone of the PAT rule. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,9 @@
# # ScalewayVpcGwV2SetBastionAllowedIPsResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ip_ranges** | **string[]** | Ranges of IP addresses allowed to connect to the gateway&#39;s SSH bastion. (IP network) | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,12 @@
# # ScalewayVpcGwV2SetPatRulesRequestRule
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**public_port** | **int** | Public port to listen on. Public port to listen on. Uniquely identifies the rule, and a matching rule will be updated with the new parameters. | [optional]
**private_ip** | **string** | Private IP to forward data to. (IP address) | [optional]
**private_port** | **int** | Private port to translate to. | [optional]
**protocol** | **string** | Protocol the rule should apply to. | [optional] [default to 'unknown_protocol']
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,9 @@
# # ScalewayVpcGwV2SetPatRulesResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pat_rules** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2PatRule[]**](ScalewayVpcGwV2PatRule.md) | List of PAT rules. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,9 @@
# # SetBastionAllowedIPsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ip_ranges** | **string[]** | New list of IP ranges (each range in CIDR notation) allowed to connect to the SSH bastion. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,10 @@
# # SetPatRulesRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**gateway_id** | **string** | ID of the gateway on which to set the PAT rules. (UUID format) | [optional]
**pat_rules** | [**\OpenAPI\Client\Model\ScalewayVpcGwV2SetPatRulesRequestRule[]**](ScalewayVpcGwV2SetPatRulesRequestRule.md) | New list of PAT rules. |
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,11 @@
# # UpdateGatewayNetworkRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enable_masquerade** | **bool** | Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork. | [optional]
**push_default_route** | **bool** | Enabling the default route also enables masquerading. | [optional]
**ipam_ip_id** | **string** | Use this IPAM-booked IP ID as the Gateway&#39;s IP in this Private Network. (UUID format) | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,13 @@
# # UpdateGatewayRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Name for the gateway. | [optional]
**tags** | **string[]** | Tags for the gateway. | [optional]
**enable_bastion** | **bool** | Defines whether SSH bastion should be enabled the gateway. | [optional]
**bastion_port** | **int** | Port of the SSH bastion. | [optional]
**enable_smtp** | **bool** | Defines whether SMTP traffic should be allowed to pass through the gateway. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,11 @@
# # UpdateIPRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tags** | **string[]** | Tags to give to the IP address. | [optional]
**reverse** | **string** | Reverse to set on the address. Empty string to unset. | [optional]
**gateway_id** | **string** | Gateway to attach the IP address to. Empty string to detach. (UUID format) | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,12 @@
# # UpdatePatRuleRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**public_port** | **int** | Public port to listen on. | [optional]
**private_ip** | **string** | Private IP to forward data to. (IP address) | [optional]
**private_port** | **int** | Private port to translate to. | [optional]
**protocol** | **string** | Protocol the rule should apply to. | [optional] [default to 'unknown_protocol']
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View file

@ -0,0 +1,9 @@
# # UpgradeGatewayRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | Gateway type (commercial offer). | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)