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

15
.gitignore vendored Normal file
View file

@ -0,0 +1,15 @@
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore
composer.phar
/vendor/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
# php-cs-fixer cache
.php_cs.cache
.php-cs-fixer.cache
# PHPUnit cache
.phpunit.result.cache

79
.idea/Scaleway APIs : Public-Gateway.iml generated Normal file
View file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" packagePrefix="OpenAPI\Client\" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" packagePrefix="OpenAPI\Client\Test\" />
<excludeFolder url="file://$MODULE_DIR$/vendor/clue/ndjson-react" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/evenement/evenement" />
<excludeFolder url="file://$MODULE_DIR$/vendor/fidry/cpu-core-counter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/friendsofphp/php-cs-fixer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/manifest" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/version" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-invoker" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/event-dispatcher" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-client" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-factory" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-message" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ralouphie/getallheaders" />
<excludeFolder url="file://$MODULE_DIR$/vendor/react/cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/react/child-process" />
<excludeFolder url="file://$MODULE_DIR$/vendor/react/dns" />
<excludeFolder url="file://$MODULE_DIR$/vendor/react/event-loop" />
<excludeFolder url="file://$MODULE_DIR$/vendor/react/promise" />
<excludeFolder url="file://$MODULE_DIR$/vendor/react/socket" />
<excludeFolder url="file://$MODULE_DIR$/vendor/react/stream" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/cli-parser" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/complexity" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/lines-of-code" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-enumerator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-reflector" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/type" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/console" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/deprecation-contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher-contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/filesystem" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/options-resolver" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-grapheme" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-normalizer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php80" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php81" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php84" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/stopwatch" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/string" />
<excludeFolder url="file://$MODULE_DIR$/vendor/theseer/tokenizer" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

23
.openapi-generator-ignore Normal file
View file

@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

118
.openapi-generator/FILES Normal file
View file

@ -0,0 +1,118 @@
.gitignore
.openapi-generator-ignore
.php-cs-fixer.dist.php
.travis.yml
README.md
composer.json
docs/Api/AllowedIPsApi.md
docs/Api/GatewayNetworksApi.md
docs/Api/GatewayTypesApi.md
docs/Api/GatewaysApi.md
docs/Api/IPsApi.md
docs/Api/PATRulesApi.md
docs/Model/AddBastionAllowedIPsRequest.md
docs/Model/CreateGatewayNetworkRequest.md
docs/Model/CreateGatewayRequest.md
docs/Model/CreateIPRequest.md
docs/Model/CreatePatRuleRequest.md
docs/Model/ScalewayVpcGwV2AddBastionAllowedIPsResponse.md
docs/Model/ScalewayVpcGwV2Gateway.md
docs/Model/ScalewayVpcGwV2GatewayIpv4.md
docs/Model/ScalewayVpcGwV2GatewayNetwork.md
docs/Model/ScalewayVpcGwV2GatewayNetworkStatus.md
docs/Model/ScalewayVpcGwV2GatewayStatus.md
docs/Model/ScalewayVpcGwV2GatewayType.md
docs/Model/ScalewayVpcGwV2IP.md
docs/Model/ScalewayVpcGwV2ListGatewayNetworksResponse.md
docs/Model/ScalewayVpcGwV2ListGatewayTypesResponse.md
docs/Model/ScalewayVpcGwV2ListGatewaysResponse.md
docs/Model/ScalewayVpcGwV2ListIPsResponse.md
docs/Model/ScalewayVpcGwV2ListPatRulesResponse.md
docs/Model/ScalewayVpcGwV2PatRule.md
docs/Model/ScalewayVpcGwV2SetBastionAllowedIPsResponse.md
docs/Model/ScalewayVpcGwV2SetPatRulesRequestRule.md
docs/Model/ScalewayVpcGwV2SetPatRulesResponse.md
docs/Model/SetBastionAllowedIPsRequest.md
docs/Model/SetPatRulesRequest.md
docs/Model/UpdateGatewayNetworkRequest.md
docs/Model/UpdateGatewayRequest.md
docs/Model/UpdateIPRequest.md
docs/Model/UpdatePatRuleRequest.md
docs/Model/UpgradeGatewayRequest.md
git_push.sh
lib/Api/AllowedIPsApi.php
lib/Api/GatewayNetworksApi.php
lib/Api/GatewayTypesApi.php
lib/Api/GatewaysApi.php
lib/Api/IPsApi.php
lib/Api/PATRulesApi.php
lib/ApiException.php
lib/Configuration.php
lib/HeaderSelector.php
lib/Model/AddBastionAllowedIPsRequest.php
lib/Model/CreateGatewayNetworkRequest.php
lib/Model/CreateGatewayRequest.php
lib/Model/CreateIPRequest.php
lib/Model/CreatePatRuleRequest.php
lib/Model/ModelInterface.php
lib/Model/ScalewayVpcGwV2AddBastionAllowedIPsResponse.php
lib/Model/ScalewayVpcGwV2Gateway.php
lib/Model/ScalewayVpcGwV2GatewayIpv4.php
lib/Model/ScalewayVpcGwV2GatewayNetwork.php
lib/Model/ScalewayVpcGwV2GatewayNetworkStatus.php
lib/Model/ScalewayVpcGwV2GatewayStatus.php
lib/Model/ScalewayVpcGwV2GatewayType.php
lib/Model/ScalewayVpcGwV2IP.php
lib/Model/ScalewayVpcGwV2ListGatewayNetworksResponse.php
lib/Model/ScalewayVpcGwV2ListGatewayTypesResponse.php
lib/Model/ScalewayVpcGwV2ListGatewaysResponse.php
lib/Model/ScalewayVpcGwV2ListIPsResponse.php
lib/Model/ScalewayVpcGwV2ListPatRulesResponse.php
lib/Model/ScalewayVpcGwV2PatRule.php
lib/Model/ScalewayVpcGwV2SetBastionAllowedIPsResponse.php
lib/Model/ScalewayVpcGwV2SetPatRulesRequestRule.php
lib/Model/ScalewayVpcGwV2SetPatRulesResponse.php
lib/Model/SetBastionAllowedIPsRequest.php
lib/Model/SetPatRulesRequest.php
lib/Model/UpdateGatewayNetworkRequest.php
lib/Model/UpdateGatewayRequest.php
lib/Model/UpdateIPRequest.php
lib/Model/UpdatePatRuleRequest.php
lib/Model/UpgradeGatewayRequest.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Api/AllowedIPsApiTest.php
test/Api/GatewayNetworksApiTest.php
test/Api/GatewayTypesApiTest.php
test/Api/GatewaysApiTest.php
test/Api/IPsApiTest.php
test/Api/PATRulesApiTest.php
test/Model/AddBastionAllowedIPsRequestTest.php
test/Model/CreateGatewayNetworkRequestTest.php
test/Model/CreateGatewayRequestTest.php
test/Model/CreateIPRequestTest.php
test/Model/CreatePatRuleRequestTest.php
test/Model/ScalewayVpcGwV2AddBastionAllowedIPsResponseTest.php
test/Model/ScalewayVpcGwV2GatewayIpv4Test.php
test/Model/ScalewayVpcGwV2GatewayNetworkStatusTest.php
test/Model/ScalewayVpcGwV2GatewayNetworkTest.php
test/Model/ScalewayVpcGwV2GatewayStatusTest.php
test/Model/ScalewayVpcGwV2GatewayTest.php
test/Model/ScalewayVpcGwV2GatewayTypeTest.php
test/Model/ScalewayVpcGwV2IPTest.php
test/Model/ScalewayVpcGwV2ListGatewayNetworksResponseTest.php
test/Model/ScalewayVpcGwV2ListGatewayTypesResponseTest.php
test/Model/ScalewayVpcGwV2ListGatewaysResponseTest.php
test/Model/ScalewayVpcGwV2ListIPsResponseTest.php
test/Model/ScalewayVpcGwV2ListPatRulesResponseTest.php
test/Model/ScalewayVpcGwV2PatRuleTest.php
test/Model/ScalewayVpcGwV2SetBastionAllowedIPsResponseTest.php
test/Model/ScalewayVpcGwV2SetPatRulesRequestRuleTest.php
test/Model/ScalewayVpcGwV2SetPatRulesResponseTest.php
test/Model/SetBastionAllowedIPsRequestTest.php
test/Model/SetPatRulesRequestTest.php
test/Model/UpdateGatewayNetworkRequestTest.php
test/Model/UpdateGatewayRequestTest.php
test/Model/UpdateIPRequestTest.php
test/Model/UpdatePatRuleRequestTest.php
test/Model/UpgradeGatewayRequestTest.php

View file

@ -0,0 +1 @@
7.11.0

29
.php-cs-fixer.dist.php Normal file
View file

@ -0,0 +1,29 @@
<?php
/**
* @generated
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
*/
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('vendor')
->exclude('test')
->exclude('tests')
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'phpdoc_order' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'strict_comparison' => true,
'strict_param' => true,
'no_trailing_whitespace' => false,
'no_trailing_whitespace_in_comment' => false,
'braces' => false,
'single_blank_line_at_eof' => false,
'blank_line_after_namespace' => false,
'no_leading_import_slash' => false,
])
->setFinder($finder)
;

8
.travis.yml Normal file
View file

@ -0,0 +1,8 @@
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.4
before_install: "composer install"
script: "vendor/bin/phpunit"

324
README.md Normal file
View file

@ -0,0 +1,324 @@
# OpenAPIClient-php
Scaleway Public Gateways are building blocks for your infrastructure on Scaleway's public
cloud. They sit at the border of Private Networks and provide access to/from other networks or the Internet. As well as this, Public Gateways offer a host of managed features and services to facilitate the management of resources in your Private Network, including NAT to map private IP addresses in the Private Network to the public IP address of the Public Gateway.
(switchcolumn)
<Message type=\"tip\">
To create and manage your Private Networks, check out the [VPC API](https://www.scaleway.com/en/developers/api/vpc).
</Message>
(switchcolumn)
## Concepts
Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/public-gateways/concepts/) to find definitions of all terminology related to Public Gateways, including NAT, SSH bastion and more.
(switchcolumn)
(switchcolumn)
## Quickstart
1. Configure your environment variables.
<Message type=\"note\">
This is an optional step that seeks to simplify your usage of the Public Gateways API.
</Message>
```bash
export SCW_SECRET_KEY=\"<API secret key>\"
export SCW_DEFAULT_ZONE=\"<Scaleway default Availability Zone>\"
export SCW_PROJECT_ID=\"<Scaleway Project ID>\"
```
2. **Choose a Public Gateway type**: Public Gateways come in different shapes and sizes, with different network capabilities and pricing. When you create your Public Gateway, you need to include the required Public Gateway type in the request. Use the following call to get a list of available Public Gateway offer types and their details:
```bash
curl -X GET \\
-H \"X-Auth-Token: $SCW_SECRET_KEY\" \\
-H \"Content-Type: application/json\" \\
\"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateway-types\"
```
3. **Create a Public Gateway**: run the following command to create a Public Gateway. You can customize the details in the payload (name, description, tags, etc) to your needs: use the information below to adjust the payload as necessary.
```bash
curl -X POST \\
-H \"X-Auth-Token: $SCW_SECRET_KEY\" \\
-H \"Content-Type: application/json\" \\
\"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateways\" \\
-d '{
\"type\": \"VPC-GW-S\",
\"name\": \"my-new-gateway\",
\"tags\": [\"my-first-tag\", \"my-second-tag\"],
\"project_id\": \"'\"$SCW_PROJECT_ID\"'\"
}'
```
| Parameter | Description | Valid values |
|-----------------|-----------------------------------------------------|-------------------------------|
| type | The type of Public Gateway (commercial offer type) to create. Use the Gateway Types endpoint to get a list of offer types. | Any valid offer type string, e.g. `VPC-GW-S` |
| name | A name of your choice for the Public Gateway | Any string containing only alphanumeric characters and dashes, e.g. `my-new-gateway`. |
| tags | A list of tags to describe your Public Gateway. These can help you manage and filter your gateways. | A list of alphanumeric strings, e.g. `[\"my-first-tag`, `my-second-tag` |
| project_id | The Scaleway Project ID to create the Public Gateway in. | A valid Scaleway Project ID, e.g. `f5fe13a0-b9c7-11ed-afa1-0242ac120002` |
**Note**: Further parameters are available, but for the purposes of this quickstart we have included only the essentials. See the `Create a Public Gateway` endpoint documentation below for full details of all possible parameters.
4. **Get a list of your Public Gateways**: run the following command to get a list of all your Public Gateways.
```bash
curl -X GET \\
-H \"X-Auth-Token: $SCW_SECRET_KEY\" \\
-H \"Content-Type: application/json\" \\
\"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateways\"
```
5. **Attach a Private Network to a Public Gateway**: run the following command to attach a Private Network to your Public Gateway, and make all the Gateway's services such as NAT available to the Private Network. You can customize the details in the payload to your needs: use the information below to adjust the payload as necessary.
<Message type=\"tip\">
If you haven't created a Private Network yet, see the [Private Networks](https://www/scaleway.com/en/developers/api/vpc/) documentation to learn how to do so. Ensure you retain the ID of the Private Network.
</Message>
```bash
curl -X POST \\
-H \"X-Auth-Token: $SCW_SECRET_KEY\" \\
-H \"Content-Type: application/json\" \\
\"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateway-networks\" \\
-d '{
\"gateway_id\": \"b1b2edda-9364-422d-93f2-ad04e6a054dc\",
\"private_network_id\": \"548dbcc3-8b78-486f-a79a-c3f5a17642f9\",
\"enable_masquerade\": true
}'
```
This configuration will set up the Public Gateway as a NAT gateway, masquerading traffic sent to it to the
outer internet to provide internet access to resources in the Private Network.
| Parameter | Description | Valid values |
|-----------------|-----------------------------------------------------|-------------------------------|
| gateway_id | The Public Gateway ID of an existing Public Gateway | Any valid Public Gateway ID, e.g. `b1b2edda-9364-422d-93f2-ad04e6a054dc` |
| private_network_id | The Private Network ID of an existing Private Network | Any valid Private Network ID in the same Availability Zone as the Public Gateway, e.g. `548dbcc3-8b78-486f-a79a-c3f5a17642f9` |
| enable_masquerade | Defines whether the gateway should masquerade traffic for the attached Private Network (i.e. whether to enable dynamic NAT) | A boolean value, e.g. `true` |
<Message type=\"note\">
Further parameters are available, but for the purposes of this quickstart we have included only the essentials. See the [Attach a gateway to a Private Network](#path-gateway-networks-attach-a-public-gateway-to-a-private-network) documentation below for full details of all possible parameters.
</Message>
6. **Delete a Public Gateway**: run the following call to delete your Public Gateway. Ensure that you replace `<PUBLIC-GATEWAY-ID>` in the URL with the ID of the Public Gateway you want to delete.
```bash
curl -X DELETE \\
-H \"X-Auth-Token: $SCW_SECRET_KEY\" \\
-H \"Content-Type: application/json\" \\
\"https://api.scaleway.com/vpc-gw/v2/zones/$SCW_DEFAULT_ZONE/gateways/<PUBLIC-GATEWAY-ID>\"
```
The expected successful response is empty.
(switchcolumn)
<Message type=\"requirement\">
- You have a [Scaleway account](https://console.scaleway.com/)
- You have [created an API key](https://www.scaleway.com/en/docs/iam/how-to/create-api-keys/) and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/iam/reference-content/permission-sets/) to perform the actions described on this page
- You have [installed `curl`](https://curl.se/download.html)
</Message>
(switchcolumn)
## Technical limitations
The following limitations apply to Public Gateways:
- A maximum of eight (8) Private Networks can be plugged into a single Public Gateway
- Note that the Public Gateway takes some time to start up, and actions on it are
impossible unless it is in the `running` state. To check the current state of a Public Gateway, use the [Get a Public Gateway](#path-gateways-get-a-public-gateway) endpoint to get information for your gateway: the `status` field of the response will tell you if it is running or in another state.
- For further information about Public Gateway limitations see our [dedicated documentation](https://www.scaleway.com/en/docs/public-gateways/troubleshooting/gw-limitations/).
## Technical information
### Availability Zones
Public Gateways can be deployed in the following Availability Zones:
| Name | API ID |
|-----------|-----------------------|
| Paris | `fr-par-1` `fr-par-2` |
| Amsterdam | `nl-ams-1` `nl-ams-2` `nl-ams-3` |
| Warsaw | `pl-waw-1` `pl-waw-2` `pl-waw-3` |
The Scaleway Public Gateways API is a **zoned** API, meaning that each call must specify in its path parameters the Availability Zone for the resources concerned by the call.
## Going further
For more help using Scaleway Public Gateways, check out the following resources:
- Our [main documentation](https://www.scaleway.com/en/docs/public-gateways/)
- The #public-gateway channel on our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)
- Our [support ticketing system](https://www.scaleway.com/en/docs/account/how-to/open-a-support-ticket/).
## Installation & Usage
### Requirements
PHP 7.4 and later.
Should also work with PHP 8.0.
### Composer
To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:
```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
```
Then run `composer install`
### Manual Installation
Download the files and include `autoload.php`:
```php
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```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;
}
```
## API Endpoints
All URIs are relative to *https://api.scaleway.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AllowedIPsApi* | [**addBastionAllowedIPs**](docs/Api/AllowedIPsApi.md#addbastionallowedips) | **POST** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips | Add allowed IP range to SSH bastion
*AllowedIPsApi* | [**deleteBastionAllowedIPs**](docs/Api/AllowedIPsApi.md#deletebastionallowedips) | **DELETE** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips/{ip_range} | Delete allowed IP range from SSH bastion
*AllowedIPsApi* | [**setBastionAllowedIPs**](docs/Api/AllowedIPsApi.md#setbastionallowedips) | **PUT** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/bastion-allowed-ips | Set all IP ranges allowed for SSH bastion
*GatewayNetworksApi* | [**createGatewayNetwork**](docs/Api/GatewayNetworksApi.md#creategatewaynetwork) | **POST** /vpc-gw/v2/zones/{zone}/gateway-networks | Attach a Public Gateway to a Private Network
*GatewayNetworksApi* | [**deleteGatewayNetwork**](docs/Api/GatewayNetworksApi.md#deletegatewaynetwork) | **DELETE** /vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id} | Detach a Public Gateway from a Private Network
*GatewayNetworksApi* | [**getGatewayNetwork**](docs/Api/GatewayNetworksApi.md#getgatewaynetwork) | **GET** /vpc-gw/v2/zones/{zone}/gateway-networks/{gateway_network_id} | Get a Public Gateway connection to a Private Network
*GatewayNetworksApi* | [**listGatewayNetworks**](docs/Api/GatewayNetworksApi.md#listgatewaynetworks) | **GET** /vpc-gw/v2/zones/{zone}/gateway-networks | List Public Gateway connections to Private Networks
*GatewayNetworksApi* | [**updateGatewayNetwork**](docs/Api/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
*GatewayTypesApi* | [**listGatewayTypes**](docs/Api/GatewayTypesApi.md#listgatewaytypes) | **GET** /vpc-gw/v2/zones/{zone}/gateway-types | List Public Gateway types
*GatewaysApi* | [**createGateway**](docs/Api/GatewaysApi.md#creategateway) | **POST** /vpc-gw/v2/zones/{zone}/gateways | Create a Public Gateway
*GatewaysApi* | [**deleteGateway**](docs/Api/GatewaysApi.md#deletegateway) | **DELETE** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id} | Delete a Public Gateway
*GatewaysApi* | [**getGateway**](docs/Api/GatewaysApi.md#getgateway) | **GET** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id} | Get a Public Gateway
*GatewaysApi* | [**listGateways**](docs/Api/GatewaysApi.md#listgateways) | **GET** /vpc-gw/v2/zones/{zone}/gateways | List Public Gateways
*GatewaysApi* | [**refreshSSHKeys**](docs/Api/GatewaysApi.md#refreshsshkeys) | **POST** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id}/refresh-ssh-keys | Refresh a Public Gateway&#39;s SSH keys
*GatewaysApi* | [**updateGateway**](docs/Api/GatewaysApi.md#updategateway) | **PATCH** /vpc-gw/v2/zones/{zone}/gateways/{gateway_id} | Update a Public Gateway
*GatewaysApi* | [**upgradeGateway**](docs/Api/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
*IPsApi* | [**createIP**](docs/Api/IPsApi.md#createip) | **POST** /vpc-gw/v2/zones/{zone}/ips | Reserve an IP
*IPsApi* | [**deleteIP**](docs/Api/IPsApi.md#deleteip) | **DELETE** /vpc-gw/v2/zones/{zone}/ips/{ip_id} | Delete an IP
*IPsApi* | [**getIP**](docs/Api/IPsApi.md#getip) | **GET** /vpc-gw/v2/zones/{zone}/ips/{ip_id} | Get an IP
*IPsApi* | [**listIPs**](docs/Api/IPsApi.md#listips) | **GET** /vpc-gw/v2/zones/{zone}/ips | List IPs
*IPsApi* | [**updateIP**](docs/Api/IPsApi.md#updateip) | **PATCH** /vpc-gw/v2/zones/{zone}/ips/{ip_id} | Update an IP
*PATRulesApi* | [**createPatRule**](docs/Api/PATRulesApi.md#createpatrule) | **POST** /vpc-gw/v2/zones/{zone}/pat-rules | Create a PAT rule
*PATRulesApi* | [**deletePatRule**](docs/Api/PATRulesApi.md#deletepatrule) | **DELETE** /vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id} | Delete a PAT rule
*PATRulesApi* | [**getPatRule**](docs/Api/PATRulesApi.md#getpatrule) | **GET** /vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id} | Get a PAT rule
*PATRulesApi* | [**listPatRules**](docs/Api/PATRulesApi.md#listpatrules) | **GET** /vpc-gw/v2/zones/{zone}/pat-rules | List PAT rules
*PATRulesApi* | [**setPatRules**](docs/Api/PATRulesApi.md#setpatrules) | **PUT** /vpc-gw/v2/zones/{zone}/pat-rules | Set all PAT rules
*PATRulesApi* | [**updatePatRule**](docs/Api/PATRulesApi.md#updatepatrule) | **PATCH** /vpc-gw/v2/zones/{zone}/pat-rules/{pat_rule_id} | Update a PAT rule
## Models
- [AddBastionAllowedIPsRequest](docs/Model/AddBastionAllowedIPsRequest.md)
- [CreateGatewayNetworkRequest](docs/Model/CreateGatewayNetworkRequest.md)
- [CreateGatewayRequest](docs/Model/CreateGatewayRequest.md)
- [CreateIPRequest](docs/Model/CreateIPRequest.md)
- [CreatePatRuleRequest](docs/Model/CreatePatRuleRequest.md)
- [ScalewayVpcGwV2AddBastionAllowedIPsResponse](docs/Model/ScalewayVpcGwV2AddBastionAllowedIPsResponse.md)
- [ScalewayVpcGwV2Gateway](docs/Model/ScalewayVpcGwV2Gateway.md)
- [ScalewayVpcGwV2GatewayIpv4](docs/Model/ScalewayVpcGwV2GatewayIpv4.md)
- [ScalewayVpcGwV2GatewayNetwork](docs/Model/ScalewayVpcGwV2GatewayNetwork.md)
- [ScalewayVpcGwV2GatewayNetworkStatus](docs/Model/ScalewayVpcGwV2GatewayNetworkStatus.md)
- [ScalewayVpcGwV2GatewayStatus](docs/Model/ScalewayVpcGwV2GatewayStatus.md)
- [ScalewayVpcGwV2GatewayType](docs/Model/ScalewayVpcGwV2GatewayType.md)
- [ScalewayVpcGwV2IP](docs/Model/ScalewayVpcGwV2IP.md)
- [ScalewayVpcGwV2ListGatewayNetworksResponse](docs/Model/ScalewayVpcGwV2ListGatewayNetworksResponse.md)
- [ScalewayVpcGwV2ListGatewayTypesResponse](docs/Model/ScalewayVpcGwV2ListGatewayTypesResponse.md)
- [ScalewayVpcGwV2ListGatewaysResponse](docs/Model/ScalewayVpcGwV2ListGatewaysResponse.md)
- [ScalewayVpcGwV2ListIPsResponse](docs/Model/ScalewayVpcGwV2ListIPsResponse.md)
- [ScalewayVpcGwV2ListPatRulesResponse](docs/Model/ScalewayVpcGwV2ListPatRulesResponse.md)
- [ScalewayVpcGwV2PatRule](docs/Model/ScalewayVpcGwV2PatRule.md)
- [ScalewayVpcGwV2SetBastionAllowedIPsResponse](docs/Model/ScalewayVpcGwV2SetBastionAllowedIPsResponse.md)
- [ScalewayVpcGwV2SetPatRulesRequestRule](docs/Model/ScalewayVpcGwV2SetPatRulesRequestRule.md)
- [ScalewayVpcGwV2SetPatRulesResponse](docs/Model/ScalewayVpcGwV2SetPatRulesResponse.md)
- [SetBastionAllowedIPsRequest](docs/Model/SetBastionAllowedIPsRequest.md)
- [SetPatRulesRequest](docs/Model/SetPatRulesRequest.md)
- [UpdateGatewayNetworkRequest](docs/Model/UpdateGatewayNetworkRequest.md)
- [UpdateGatewayRequest](docs/Model/UpdateGatewayRequest.md)
- [UpdateIPRequest](docs/Model/UpdateIPRequest.md)
- [UpdatePatRuleRequest](docs/Model/UpdatePatRuleRequest.md)
- [UpgradeGatewayRequest](docs/Model/UpgradeGatewayRequest.md)
## Authorization
Authentication schemes defined for the API:
### scaleway
- **Type**: API key
- **API key parameter name**: X-Auth-Token
- **Location**: HTTP header
## Tests
To run the tests, use:
```bash
composer install
vendor/bin/phpunit
```
## Author
## About this package
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: `v2`
- Generator version: `7.11.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`

38
composer.json Normal file

File diff suppressed because one or more lines are too long

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)

57
git_push.sh Normal file
View file

@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

1115
lib/Api/AllowedIPsApi.php Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

456
lib/Api/GatewayTypesApi.php Normal file

File diff suppressed because one or more lines are too long

2714
lib/Api/GatewaysApi.php Normal file

File diff suppressed because one or more lines are too long

1847
lib/Api/IPsApi.php Normal file

File diff suppressed because one or more lines are too long

2152
lib/Api/PATRulesApi.php Normal file

File diff suppressed because one or more lines are too long

119
lib/ApiException.php Normal file

File diff suppressed because one or more lines are too long

531
lib/Configuration.php Normal file

File diff suppressed because one or more lines are too long

273
lib/HeaderSelector.php Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

617
lib/ObjectSerializer.php Normal file

File diff suppressed because one or more lines are too long

18
phpunit.xml.dist Normal file
View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./lib/Api</directory>
<directory suffix=".php">./lib/Model</directory>
</include>
</coverage>
<testsuites>
<testsuite name="tests">
<directory>./test/Api</directory>
<directory>./test/Model</directory>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="E_ALL"/>
</php>
</phpunit>

2573
scaleway.vpc_gw.v2.Api.yml Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

133
test/Api/IPsApiTest.php Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more