@scaleway/sdk 3.0.0-alpha.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.gen.d.ts +362 -0
- package/dist/index.gen.js +323 -0
- package/package.json +71 -25
- package/README.md +0 -46
- package/dist/api/account/index.js +0 -4
- package/dist/api/account/v2/api.gen.js +0 -147
- package/dist/api/account/v2/index.gen.js +0 -4
- package/dist/api/account/v2/marshalling.gen.js +0 -39
- package/dist/api/account/v3/api.gen.js +0 -129
- package/dist/api/account/v3/index.gen.js +0 -6
- package/dist/api/account/v3/marshalling.gen.js +0 -39
- package/dist/api/account/v3/validation-rules.gen.js +0 -39
- package/dist/api/applesilicon/index.js +0 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
- package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
- package/dist/api/baremetal/index.js +0 -2
- package/dist/api/baremetal/v1/api.gen.js +0 -523
- package/dist/api/baremetal/v1/api.utils.js +0 -27
- package/dist/api/baremetal/v1/content.gen.js +0 -13
- package/dist/api/baremetal/v1/index.js +0 -5
- package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
- package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
- package/dist/api/billing/index.js +0 -2
- package/dist/api/billing/v2alpha1/api.gen.js +0 -80
- package/dist/api/billing/v2alpha1/index.gen.js +0 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
- package/dist/api/block/index.js +0 -2
- package/dist/api/block/v1alpha1/api.gen.js +0 -245
- package/dist/api/block/v1alpha1/content.gen.js +0 -13
- package/dist/api/block/v1alpha1/index.gen.js +0 -7
- package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
- package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
- package/dist/api/cockpit/index.js +0 -2
- package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
- package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
- package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
- package/dist/api/container/index.js +0 -2
- package/dist/api/container/v1beta1/api.gen.js +0 -549
- package/dist/api/container/v1beta1/content.gen.js +0 -22
- package/dist/api/container/v1beta1/index.gen.js +0 -5
- package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
- package/dist/api/document_db/index.js +0 -2
- package/dist/api/document_db/v1beta1/api.gen.js +0 -830
- package/dist/api/document_db/v1beta1/content.gen.js +0 -19
- package/dist/api/document_db/v1beta1/index.gen.js +0 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
- package/dist/api/domain/index.js +0 -2
- package/dist/api/domain/v2beta1/api.gen.js +0 -875
- package/dist/api/domain/v2beta1/content.gen.js +0 -28
- package/dist/api/domain/v2beta1/index.gen.js +0 -7
- package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
- package/dist/api/flexibleip/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
- package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
- package/dist/api/function/index.js +0 -2
- package/dist/api/function/v1beta1/api.gen.js +0 -560
- package/dist/api/function/v1beta1/content.gen.js +0 -22
- package/dist/api/function/v1beta1/index.gen.js +0 -5
- package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
- package/dist/api/iam/index.js +0 -2
- package/dist/api/iam/v1alpha1/api.gen.js +0 -799
- package/dist/api/iam/v1alpha1/index.gen.js +0 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
- package/dist/api/instance/index.js +0 -2
- package/dist/api/instance/v1/api.gen.js +0 -1003
- package/dist/api/instance/v1/api.utils.js +0 -369
- package/dist/api/instance/v1/content.gen.js +0 -31
- package/dist/api/instance/v1/index.js +0 -2
- package/dist/api/instance/v1/marshalling.gen.js +0 -1206
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
- package/dist/api/iot/index.js +0 -2
- package/dist/api/iot/v1/api.gen.js +0 -581
- package/dist/api/iot/v1/content.gen.js +0 -7
- package/dist/api/iot/v1/index.gen.js +0 -5
- package/dist/api/iot/v1/marshalling.gen.js +0 -388
- package/dist/api/ipfs/index.js +0 -2
- package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
- package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
- package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/k8s/index.js +0 -2
- package/dist/api/k8s/v1/api.gen.js +0 -454
- package/dist/api/k8s/v1/api.utils.js +0 -13
- package/dist/api/k8s/v1/content.gen.js +0 -13
- package/dist/api/k8s/v1/index.js +0 -4
- package/dist/api/k8s/v1/marshalling.gen.js +0 -333
- package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
- package/dist/api/lb/index.js +0 -2
- package/dist/api/lb/v1/api.gen.js +0 -1669
- package/dist/api/lb/v1/api.utils.js +0 -81
- package/dist/api/lb/v1/content.gen.js +0 -16
- package/dist/api/lb/v1/index.js +0 -2
- package/dist/api/lb/v1/marshalling.gen.js +0 -923
- package/dist/api/marketplace/index.js +0 -4
- package/dist/api/marketplace/v1/api.gen.js +0 -60
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
- package/dist/api/marketplace/v2/api.gen.js +0 -162
- package/dist/api/marketplace/v2/index.gen.js +0 -4
- package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
- package/dist/api/mnq/index.js +0 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
- package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/rdb/index.js +0 -2
- package/dist/api/rdb/v1/api.gen.js +0 -972
- package/dist/api/rdb/v1/content.gen.js +0 -22
- package/dist/api/rdb/v1/index.gen.js +0 -7
- package/dist/api/rdb/v1/marshalling.gen.js +0 -636
- package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
- package/dist/api/redis/index.js +0 -2
- package/dist/api/redis/v1/api.gen.js +0 -389
- package/dist/api/redis/v1/content.gen.js +0 -7
- package/dist/api/redis/v1/index.gen.js +0 -5
- package/dist/api/redis/v1/marshalling.gen.js +0 -259
- package/dist/api/registry/index.js +0 -2
- package/dist/api/registry/v1/api.gen.js +0 -252
- package/dist/api/registry/v1/content.gen.js +0 -13
- package/dist/api/registry/v1/index.gen.js +0 -5
- package/dist/api/registry/v1/marshalling.gen.js +0 -106
- package/dist/api/secret/index.js +0 -2
- package/dist/api/secret/v1alpha1/api.gen.js +0 -415
- package/dist/api/secret/v1alpha1/index.gen.js +0 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
- package/dist/api/tem/index.js +0 -2
- package/dist/api/tem/v1alpha1/api.gen.js +0 -229
- package/dist/api/tem/v1alpha1/content.gen.js +0 -10
- package/dist/api/tem/v1alpha1/index.gen.js +0 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
- package/dist/api/test/index.js +0 -2
- package/dist/api/test/v1/api.gen.js +0 -152
- package/dist/api/test/v1/content.gen.js +0 -7
- package/dist/api/test/v1/index.gen.js +0 -5
- package/dist/api/test/v1/marshalling.gen.js +0 -79
- package/dist/api/vpc/index.js +0 -4
- package/dist/api/vpc/v1/api.gen.js +0 -110
- package/dist/api/vpc/v1/index.gen.js +0 -4
- package/dist/api/vpc/v1/marshalling.gen.js +0 -44
- package/dist/api/vpc/v2/api.gen.js +0 -276
- package/dist/api/vpc/v2/index.gen.js +0 -4
- package/dist/api/vpc/v2/marshalling.gen.js +0 -135
- package/dist/api/vpcgw/index.js +0 -2
- package/dist/api/vpcgw/v1/api.gen.js +0 -669
- package/dist/api/vpcgw/v1/content.gen.js +0 -10
- package/dist/api/vpcgw/v1/index.gen.js +0 -5
- package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
- package/dist/api/webhosting/index.js +0 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
- package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
- package/dist/helpers/is-browser.js +0 -5
- package/dist/helpers/is-response.js +0 -10
- package/dist/helpers/json.js +0 -11
- package/dist/helpers/marshalling.js +0 -130
- package/dist/index.cjs +0 -24364
- package/dist/index.d.ts +0 -27584
- package/dist/index.js +0 -69
- package/dist/internal/async/interval-retrier.js +0 -105
- package/dist/internal/async/sleep.js +0 -13
- package/dist/internal/interceptors/composer.js +0 -46
- package/dist/internal/interceptors/helpers.js +0 -32
- package/dist/internal/logger/console-logger.js +0 -38
- package/dist/internal/logger/index.js +0 -41
- package/dist/internal/logger/level-resolver.js +0 -13
- package/dist/internal/validations/string-validation.js +0 -38
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/dist/scw/api.js +0 -12
- package/dist/scw/auth.js +0 -68
- package/dist/scw/client-ini-factory.js +0 -174
- package/dist/scw/client-ini-profile.js +0 -54
- package/dist/scw/client-settings.js +0 -78
- package/dist/scw/client.js +0 -98
- package/dist/scw/constants.js +0 -4
- package/dist/scw/custom-marshalling.js +0 -131
- package/dist/scw/errors/error-parser.js +0 -107
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
- package/dist/scw/errors/scw-error.js +0 -66
- package/dist/scw/errors/standard/already-exists-error.js +0 -26
- package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
- package/dist/scw/errors/standard/index.js +0 -13
- package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
- package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
- package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
- package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
- package/dist/scw/errors/standard/resource-expired-error.js +0 -26
- package/dist/scw/errors/standard/resource-locked-error.js +0 -25
- package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
- package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
- package/dist/scw/errors/standard/transient-state-error.js +0 -26
- package/dist/scw/errors/types.js +0 -23
- package/dist/scw/fetch/build-fetcher.js +0 -72
- package/dist/scw/fetch/http-dumper.js +0 -54
- package/dist/scw/fetch/http-interceptors.js +0 -99
- package/dist/scw/fetch/resource-paginator.js +0 -84
- package/dist/scw/fetch/response-parser.js +0 -72
- package/node_modules/@scaleway/random-name/.npmignore +0 -4
- package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
- package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
- package/node_modules/@scaleway/random-name/README.md +0 -26
- package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
- package/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/node_modules/@scaleway/random-name/package.json +0 -23
|
@@ -1,669 +0,0 @@
|
|
|
1
|
-
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
|
-
import { API as API$1 } from '../../../scw/api.js';
|
|
3
|
-
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
-
import { GATEWAY_TRANSIENT_STATUSES, GATEWAY_NETWORK_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListDHCPsResponse, unmarshalDHCP, marshalCreateDHCPRequest, marshalUpdateDHCPRequest, unmarshalListDHCPEntriesResponse, unmarshalDHCPEntry, marshalCreateDHCPEntryRequest, marshalUpdateDHCPEntryRequest, marshalSetDHCPEntriesRequest, unmarshalSetDHCPEntriesResponse, unmarshalListPATRulesResponse, unmarshalPATRule, marshalCreatePATRuleRequest, marshalUpdatePATRuleRequest, marshalSetPATRulesRequest, unmarshalSetPATRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest } from './marshalling.gen.js';
|
|
7
|
-
|
|
8
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
9
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
10
|
-
const jsonContentHeaders = {
|
|
11
|
-
'Content-Type': 'application/json; charset=utf-8'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/** Public Gateways API. */
|
|
15
|
-
class API extends API$1 {
|
|
16
|
-
/** Lists the available zones of the API. */
|
|
17
|
-
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
18
|
-
pageOfListGateways = (() => {
|
|
19
|
-
var _this = this;
|
|
20
|
-
return function (request) {
|
|
21
|
-
if (request === void 0) {
|
|
22
|
-
request = {};
|
|
23
|
-
}
|
|
24
|
-
return _this.client.fetch({
|
|
25
|
-
method: 'GET',
|
|
26
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/gateways`,
|
|
27
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['project_id', request.projectId], ['status', request.status], ['tags', request.tags], ['type', request.type])
|
|
28
|
-
}, unmarshalListGatewaysResponse);
|
|
29
|
-
};
|
|
30
|
-
})();
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* List Public Gateways. List Public Gateways in a given Scaleway Organization
|
|
34
|
-
* or Project. By default, results are displayed in ascending order of
|
|
35
|
-
* creation date.
|
|
36
|
-
*
|
|
37
|
-
* @param request - The request {@link ListGatewaysRequest}
|
|
38
|
-
* @returns A Promise of ListGatewaysResponse
|
|
39
|
-
*/
|
|
40
|
-
listGateways = (() => {
|
|
41
|
-
var _this2 = this;
|
|
42
|
-
return function (request) {
|
|
43
|
-
if (request === void 0) {
|
|
44
|
-
request = {};
|
|
45
|
-
}
|
|
46
|
-
return enrichForPagination('gateways', _this2.pageOfListGateways, request);
|
|
47
|
-
};
|
|
48
|
-
})();
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Get a Public Gateway. Get details of a Public Gateway, specified by its
|
|
52
|
-
* gateway ID. The response object contains full details of the gateway,
|
|
53
|
-
* including its **name**, **type**, **status** and more.
|
|
54
|
-
*
|
|
55
|
-
* @param request - The request {@link GetGatewayRequest}
|
|
56
|
-
* @returns A Promise of Gateway
|
|
57
|
-
*/
|
|
58
|
-
getGateway = request => this.client.fetch({
|
|
59
|
-
method: 'GET',
|
|
60
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam('gatewayId', request.gatewayId)}`
|
|
61
|
-
}, unmarshalGateway);
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Waits for {@link Gateway} to be in a final state.
|
|
65
|
-
*
|
|
66
|
-
* @param request - The request {@link GetGatewayRequest}
|
|
67
|
-
* @param options - The waiting options
|
|
68
|
-
* @returns A Promise of Gateway
|
|
69
|
-
*/
|
|
70
|
-
waitForGateway = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!GATEWAY_TRANSIENT_STATUSES.includes(res.status))), this.getGateway, request, options);
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Create a Public Gateway. Create a new Public Gateway in the specified
|
|
74
|
-
* Scaleway Project, defining its **name**, **type** and other configuration
|
|
75
|
-
* details such as whether to enable SSH bastion.
|
|
76
|
-
*
|
|
77
|
-
* @param request - The request {@link CreateGatewayRequest}
|
|
78
|
-
* @returns A Promise of Gateway
|
|
79
|
-
*/
|
|
80
|
-
createGateway = request => this.client.fetch({
|
|
81
|
-
body: JSON.stringify(marshalCreateGatewayRequest(request, this.client.settings)),
|
|
82
|
-
headers: jsonContentHeaders,
|
|
83
|
-
method: 'POST',
|
|
84
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways`
|
|
85
|
-
}, unmarshalGateway);
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Update a Public Gateway. Update the parameters of an existing Public
|
|
89
|
-
* Gateway, for example, its **name**, **tags**, **SSH bastion
|
|
90
|
-
* configuration**, and **DNS servers**.
|
|
91
|
-
*
|
|
92
|
-
* @param request - The request {@link UpdateGatewayRequest}
|
|
93
|
-
* @returns A Promise of Gateway
|
|
94
|
-
*/
|
|
95
|
-
updateGateway = request => this.client.fetch({
|
|
96
|
-
body: JSON.stringify(marshalUpdateGatewayRequest(request, this.client.settings)),
|
|
97
|
-
headers: jsonContentHeaders,
|
|
98
|
-
method: 'PATCH',
|
|
99
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam('gatewayId', request.gatewayId)}`
|
|
100
|
-
}, unmarshalGateway);
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Delete a Public Gateway. Delete an existing Public Gateway, specified by
|
|
104
|
-
* its gateway ID. This action is irreversible.
|
|
105
|
-
*
|
|
106
|
-
* @param request - The request {@link DeleteGatewayRequest}
|
|
107
|
-
*/
|
|
108
|
-
deleteGateway = request => this.client.fetch({
|
|
109
|
-
method: 'DELETE',
|
|
110
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam('gatewayId', request.gatewayId)}`,
|
|
111
|
-
urlParams: urlParams(['cleanup_dhcp', request.cleanupDhcp])
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Upgrade a Public Gateway to the latest version. Upgrade a given Public
|
|
116
|
-
* Gateway to the newest software version. This applies the latest bugfixes
|
|
117
|
-
* and features to your Public Gateway, but its service will be interrupted
|
|
118
|
-
* during the update.
|
|
119
|
-
*
|
|
120
|
-
* @param request - The request {@link UpgradeGatewayRequest}
|
|
121
|
-
* @returns A Promise of Gateway
|
|
122
|
-
*/
|
|
123
|
-
upgradeGateway = request => this.client.fetch({
|
|
124
|
-
body: '{}',
|
|
125
|
-
headers: jsonContentHeaders,
|
|
126
|
-
method: 'POST',
|
|
127
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam('gatewayId', request.gatewayId)}/upgrade`
|
|
128
|
-
}, unmarshalGateway);
|
|
129
|
-
pageOfListGatewayNetworks = (() => {
|
|
130
|
-
var _this3 = this;
|
|
131
|
-
return function (request) {
|
|
132
|
-
if (request === void 0) {
|
|
133
|
-
request = {};
|
|
134
|
-
}
|
|
135
|
-
return _this3.client.fetch({
|
|
136
|
-
method: 'GET',
|
|
137
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/gateway-networks`,
|
|
138
|
-
urlParams: urlParams(['dhcp_id', request.dhcpId], ['enable_masquerade', request.enableMasquerade], ['gateway_id', request.gatewayId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['status', request.status])
|
|
139
|
-
}, unmarshalListGatewayNetworksResponse);
|
|
140
|
-
};
|
|
141
|
-
})();
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* List Public Gateway connections to Private Networks. List the connections
|
|
145
|
-
* between Public Gateways and Private Networks (a connection = a
|
|
146
|
-
* GatewayNetwork). You can choose to filter by `gateway-id` to list all
|
|
147
|
-
* Private Networks attached to the specified Public Gateway, or by
|
|
148
|
-
* `private_network_id` to list all Public Gateways attached to the specified
|
|
149
|
-
* Private Network. Other query parameters are also available. The result is
|
|
150
|
-
* an array of GatewayNetwork objects, each giving details of the connection
|
|
151
|
-
* between a given Public Gateway and a given Private Network.
|
|
152
|
-
*
|
|
153
|
-
* @param request - The request {@link ListGatewayNetworksRequest}
|
|
154
|
-
* @returns A Promise of ListGatewayNetworksResponse
|
|
155
|
-
*/
|
|
156
|
-
listGatewayNetworks = (() => {
|
|
157
|
-
var _this4 = this;
|
|
158
|
-
return function (request) {
|
|
159
|
-
if (request === void 0) {
|
|
160
|
-
request = {};
|
|
161
|
-
}
|
|
162
|
-
return enrichForPagination('gatewayNetworks', _this4.pageOfListGatewayNetworks, request);
|
|
163
|
-
};
|
|
164
|
-
})();
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Get a Public Gateway connection to a Private Network. Get details of a
|
|
168
|
-
* given connection between a Public Gateway and a Private Network (this
|
|
169
|
-
* connection = a GatewayNetwork), specified by its `gateway_network_id`. The
|
|
170
|
-
* response object contains details of the connection including the IDs of the
|
|
171
|
-
* Public Gateway and Private Network, the dates the connection was
|
|
172
|
-
* created/updated and its configuration settings.
|
|
173
|
-
*
|
|
174
|
-
* @param request - The request {@link GetGatewayNetworkRequest}
|
|
175
|
-
* @returns A Promise of GatewayNetwork
|
|
176
|
-
*/
|
|
177
|
-
getGatewayNetwork = request => this.client.fetch({
|
|
178
|
-
method: 'GET',
|
|
179
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${validatePathParam('gatewayNetworkId', request.gatewayNetworkId)}`
|
|
180
|
-
}, unmarshalGatewayNetwork);
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Waits for {@link GatewayNetwork} to be in a final state.
|
|
184
|
-
*
|
|
185
|
-
* @param request - The request {@link GetGatewayNetworkRequest}
|
|
186
|
-
* @param options - The waiting options
|
|
187
|
-
* @returns A Promise of GatewayNetwork
|
|
188
|
-
*/
|
|
189
|
-
waitForGatewayNetwork = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!GATEWAY_NETWORK_TRANSIENT_STATUSES.includes(res.status))), this.getGatewayNetwork, request, options);
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Attach a Public Gateway to a Private Network. Attach a specific Public
|
|
193
|
-
* Gateway to a specific Private Network (create a GatewayNetwork). You can
|
|
194
|
-
* configure parameters for the connection including DHCP settings, whether to
|
|
195
|
-
* enable masquerade (dynamic NAT), and more.
|
|
196
|
-
*
|
|
197
|
-
* @param request - The request {@link CreateGatewayNetworkRequest}
|
|
198
|
-
* @returns A Promise of GatewayNetwork
|
|
199
|
-
*/
|
|
200
|
-
createGatewayNetwork = request => this.client.fetch({
|
|
201
|
-
body: JSON.stringify(marshalCreateGatewayNetworkRequest(request, this.client.settings)),
|
|
202
|
-
headers: jsonContentHeaders,
|
|
203
|
-
method: 'POST',
|
|
204
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateway-networks`
|
|
205
|
-
}, unmarshalGatewayNetwork);
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Update a Public Gateway's connection to a Private Network. Update the
|
|
209
|
-
* configuration parameters of a connection between a given Public Gateway and
|
|
210
|
-
* Private Network (the connection = a GatewayNetwork). Updatable parameters
|
|
211
|
-
* include DHCP settings and whether to enable traffic masquerade (dynamic
|
|
212
|
-
* NAT).
|
|
213
|
-
*
|
|
214
|
-
* @param request - The request {@link UpdateGatewayNetworkRequest}
|
|
215
|
-
* @returns A Promise of GatewayNetwork
|
|
216
|
-
*/
|
|
217
|
-
updateGatewayNetwork = request => this.client.fetch({
|
|
218
|
-
body: JSON.stringify(marshalUpdateGatewayNetworkRequest(request, this.client.settings)),
|
|
219
|
-
headers: jsonContentHeaders,
|
|
220
|
-
method: 'PATCH',
|
|
221
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${validatePathParam('gatewayNetworkId', request.gatewayNetworkId)}`
|
|
222
|
-
}, unmarshalGatewayNetwork);
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Detach a Public Gateway from a Private Network. Detach a given Public
|
|
226
|
-
* Gateway from a given Private Network, i.e. delete a GatewayNetwork
|
|
227
|
-
* specified by a gateway_network_id.
|
|
228
|
-
*
|
|
229
|
-
* @param request - The request {@link DeleteGatewayNetworkRequest}
|
|
230
|
-
*/
|
|
231
|
-
deleteGatewayNetwork = request => this.client.fetch({
|
|
232
|
-
method: 'DELETE',
|
|
233
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${validatePathParam('gatewayNetworkId', request.gatewayNetworkId)}`,
|
|
234
|
-
urlParams: urlParams(['cleanup_dhcp', request.cleanupDhcp])
|
|
235
|
-
});
|
|
236
|
-
pageOfListDHCPs = (() => {
|
|
237
|
-
var _this5 = this;
|
|
238
|
-
return function (request) {
|
|
239
|
-
if (request === void 0) {
|
|
240
|
-
request = {};
|
|
241
|
-
}
|
|
242
|
-
return _this5.client.fetch({
|
|
243
|
-
method: 'GET',
|
|
244
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this5.client.settings.defaultZone)}/dhcps`,
|
|
245
|
-
urlParams: urlParams(['address', request.address], ['has_address', request.hasAddress], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this5.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
246
|
-
}, unmarshalListDHCPsResponse);
|
|
247
|
-
};
|
|
248
|
-
})();
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* List DHCP configurations. List DHCP configurations, optionally filtering by
|
|
252
|
-
* Organization, Project, Public Gateway IP address or more. The response is
|
|
253
|
-
* an array of DHCP configuration objects, each identified by a DHCP ID and
|
|
254
|
-
* containing configuration settings for the assignment of IP addresses to
|
|
255
|
-
* devices on a Private Network attached to a Public Gateway. Note that the
|
|
256
|
-
* response does not contain the IDs of any Private Network / Public Gateway
|
|
257
|
-
* the configuration is attached to. Use the `List Public Gateway connections
|
|
258
|
-
* to Private Networks` method for that purpose, filtering on DHCP ID.
|
|
259
|
-
*
|
|
260
|
-
* @param request - The request {@link ListDHCPsRequest}
|
|
261
|
-
* @returns A Promise of ListDHCPsResponse
|
|
262
|
-
*/
|
|
263
|
-
listDHCPs = (() => {
|
|
264
|
-
var _this6 = this;
|
|
265
|
-
return function (request) {
|
|
266
|
-
if (request === void 0) {
|
|
267
|
-
request = {};
|
|
268
|
-
}
|
|
269
|
-
return enrichForPagination('dhcps', _this6.pageOfListDHCPs, request);
|
|
270
|
-
};
|
|
271
|
-
})();
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Get a DHCP configuration. Get a DHCP configuration object, identified by
|
|
275
|
-
* its DHCP ID. The response object contains configuration settings for the
|
|
276
|
-
* assignment of IP addresses to devices on a Private Network attached to a
|
|
277
|
-
* Public Gateway. Note that the response does not contain the IDs of any
|
|
278
|
-
* Private Network / Public Gateway the configuration is attached to. Use the
|
|
279
|
-
* `List Public Gateway connections to Private Networks` method for that
|
|
280
|
-
* purpose, filtering on DHCP ID.
|
|
281
|
-
*
|
|
282
|
-
* @param request - The request {@link GetDHCPRequest}
|
|
283
|
-
* @returns A Promise of DHCP
|
|
284
|
-
*/
|
|
285
|
-
getDHCP = request => this.client.fetch({
|
|
286
|
-
method: 'GET',
|
|
287
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcps/${validatePathParam('dhcpId', request.dhcpId)}`
|
|
288
|
-
}, unmarshalDHCP);
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Create a DHCP configuration. Create a new DHCP configuration object,
|
|
292
|
-
* containing settings for the assignment of IP addresses to devices on a
|
|
293
|
-
* Private Network attached to a Public Gateway. The response object includes
|
|
294
|
-
* the ID of the DHCP configuration object. You can use this ID as part of a
|
|
295
|
-
* call to `Create a Public Gateway connection to a Private Network` or
|
|
296
|
-
* `Update a Public Gateway connection to a Private Network` to directly apply
|
|
297
|
-
* this DHCP configuration.
|
|
298
|
-
*
|
|
299
|
-
* @param request - The request {@link CreateDHCPRequest}
|
|
300
|
-
* @returns A Promise of DHCP
|
|
301
|
-
*/
|
|
302
|
-
createDHCP = request => this.client.fetch({
|
|
303
|
-
body: JSON.stringify(marshalCreateDHCPRequest(request, this.client.settings)),
|
|
304
|
-
headers: jsonContentHeaders,
|
|
305
|
-
method: 'POST',
|
|
306
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcps`
|
|
307
|
-
}, unmarshalDHCP);
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Update a DHCP configuration. Update a DHCP configuration object, identified
|
|
311
|
-
* by its DHCP ID.
|
|
312
|
-
*
|
|
313
|
-
* @param request - The request {@link UpdateDHCPRequest}
|
|
314
|
-
* @returns A Promise of DHCP
|
|
315
|
-
*/
|
|
316
|
-
updateDHCP = request => this.client.fetch({
|
|
317
|
-
body: JSON.stringify(marshalUpdateDHCPRequest(request, this.client.settings)),
|
|
318
|
-
headers: jsonContentHeaders,
|
|
319
|
-
method: 'PATCH',
|
|
320
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcps/${validatePathParam('dhcpId', request.dhcpId)}`
|
|
321
|
-
}, unmarshalDHCP);
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Delete a DHCP configuration. Delete a DHCP configuration object, identified
|
|
325
|
-
* by its DHCP ID. Note that you cannot delete a DHCP configuration object
|
|
326
|
-
* that is currently being used by a Gateway Network.
|
|
327
|
-
*
|
|
328
|
-
* @param request - The request {@link DeleteDHCPRequest}
|
|
329
|
-
*/
|
|
330
|
-
deleteDHCP = request => this.client.fetch({
|
|
331
|
-
method: 'DELETE',
|
|
332
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcps/${validatePathParam('dhcpId', request.dhcpId)}`
|
|
333
|
-
});
|
|
334
|
-
pageOfListDHCPEntries = (() => {
|
|
335
|
-
var _this7 = this;
|
|
336
|
-
return function (request) {
|
|
337
|
-
if (request === void 0) {
|
|
338
|
-
request = {};
|
|
339
|
-
}
|
|
340
|
-
return _this7.client.fetch({
|
|
341
|
-
method: 'GET',
|
|
342
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this7.client.settings.defaultZone)}/dhcp-entries`,
|
|
343
|
-
urlParams: urlParams(['gateway_network_id', request.gatewayNetworkId], ['hostname', request.hostname], ['ip_address', request.ipAddress], ['mac_address', request.macAddress], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['type', request.type])
|
|
344
|
-
}, unmarshalListDHCPEntriesResponse);
|
|
345
|
-
};
|
|
346
|
-
})();
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* List DHCP entries. List DHCP entries, whether dynamically assigned and/or
|
|
350
|
-
* statically reserved. DHCP entries can be filtered by the Gateway Network
|
|
351
|
-
* they are on, their MAC address, IP address, type or hostname.
|
|
352
|
-
*
|
|
353
|
-
* @param request - The request {@link ListDHCPEntriesRequest}
|
|
354
|
-
* @returns A Promise of ListDHCPEntriesResponse
|
|
355
|
-
*/
|
|
356
|
-
listDHCPEntries = (() => {
|
|
357
|
-
var _this8 = this;
|
|
358
|
-
return function (request) {
|
|
359
|
-
if (request === void 0) {
|
|
360
|
-
request = {};
|
|
361
|
-
}
|
|
362
|
-
return enrichForPagination('dhcpEntries', _this8.pageOfListDHCPEntries, request);
|
|
363
|
-
};
|
|
364
|
-
})();
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Get a DHCP entry. Get a DHCP entry, specified by its DHCP entry ID.
|
|
368
|
-
*
|
|
369
|
-
* @param request - The request {@link GetDHCPEntryRequest}
|
|
370
|
-
* @returns A Promise of DHCPEntry
|
|
371
|
-
*/
|
|
372
|
-
getDHCPEntry = request => this.client.fetch({
|
|
373
|
-
method: 'GET',
|
|
374
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcp-entries/${validatePathParam('dhcpEntryId', request.dhcpEntryId)}`
|
|
375
|
-
}, unmarshalDHCPEntry);
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Create a DHCP entry. Create a static DHCP reservation, specifying the
|
|
379
|
-
* Gateway Network for the reservation, the MAC address of the target device
|
|
380
|
-
* and the IP address to assign this device. The response is a DHCP entry
|
|
381
|
-
* object, confirming the ID and configuration details of the static DHCP
|
|
382
|
-
* reservation.
|
|
383
|
-
*
|
|
384
|
-
* @param request - The request {@link CreateDHCPEntryRequest}
|
|
385
|
-
* @returns A Promise of DHCPEntry
|
|
386
|
-
*/
|
|
387
|
-
createDHCPEntry = request => this.client.fetch({
|
|
388
|
-
body: JSON.stringify(marshalCreateDHCPEntryRequest(request, this.client.settings)),
|
|
389
|
-
headers: jsonContentHeaders,
|
|
390
|
-
method: 'POST',
|
|
391
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcp-entries`
|
|
392
|
-
}, unmarshalDHCPEntry);
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Update a DHCP entry. Update the IP address for a DHCP entry, specified by
|
|
396
|
-
* its DHCP entry ID. You can update an existing DHCP entry of any type
|
|
397
|
-
* (`reservation` (static), `lease` (dynamic) or `unknown`), but in manually
|
|
398
|
-
* updating the IP address the entry will necessarily be of type `reservation`
|
|
399
|
-
* after the update.
|
|
400
|
-
*
|
|
401
|
-
* @param request - The request {@link UpdateDHCPEntryRequest}
|
|
402
|
-
* @returns A Promise of DHCPEntry
|
|
403
|
-
*/
|
|
404
|
-
updateDHCPEntry = request => this.client.fetch({
|
|
405
|
-
body: JSON.stringify(marshalUpdateDHCPEntryRequest(request, this.client.settings)),
|
|
406
|
-
headers: jsonContentHeaders,
|
|
407
|
-
method: 'PATCH',
|
|
408
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcp-entries/${validatePathParam('dhcpEntryId', request.dhcpEntryId)}`
|
|
409
|
-
}, unmarshalDHCPEntry);
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Set all DHCP reservations on a Gateway Network. Set the list of DHCP
|
|
413
|
-
* reservations attached to a Gateway Network. Reservations are identified by
|
|
414
|
-
* their MAC address, and will sync the current DHCP entry list to the given
|
|
415
|
-
* list, creating, updating or deleting DHCP entries accordingly.
|
|
416
|
-
*
|
|
417
|
-
* @param request - The request {@link SetDHCPEntriesRequest}
|
|
418
|
-
* @returns A Promise of SetDHCPEntriesResponse
|
|
419
|
-
*/
|
|
420
|
-
setDHCPEntries = request => this.client.fetch({
|
|
421
|
-
body: JSON.stringify(marshalSetDHCPEntriesRequest(request, this.client.settings)),
|
|
422
|
-
headers: jsonContentHeaders,
|
|
423
|
-
method: 'PUT',
|
|
424
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcp-entries`
|
|
425
|
-
}, unmarshalSetDHCPEntriesResponse);
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Delete a DHCP entry. Delete a static DHCP reservation, identified by its
|
|
429
|
-
* DHCP entry ID. Note that you cannot delete DHCP entries of type `lease`,
|
|
430
|
-
* these are deleted automatically when their time-to-live expires.
|
|
431
|
-
*
|
|
432
|
-
* @param request - The request {@link DeleteDHCPEntryRequest}
|
|
433
|
-
*/
|
|
434
|
-
deleteDHCPEntry = request => this.client.fetch({
|
|
435
|
-
method: 'DELETE',
|
|
436
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/dhcp-entries/${validatePathParam('dhcpEntryId', request.dhcpEntryId)}`
|
|
437
|
-
});
|
|
438
|
-
pageOfListPATRules = (() => {
|
|
439
|
-
var _this9 = this;
|
|
440
|
-
return function (request) {
|
|
441
|
-
if (request === void 0) {
|
|
442
|
-
request = {};
|
|
443
|
-
}
|
|
444
|
-
return _this9.client.fetch({
|
|
445
|
-
method: 'GET',
|
|
446
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this9.client.settings.defaultZone)}/pat-rules`,
|
|
447
|
-
urlParams: urlParams(['gateway_id', request.gatewayId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['protocol', request.protocol])
|
|
448
|
-
}, unmarshalListPATRulesResponse);
|
|
449
|
-
};
|
|
450
|
-
})();
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* List PAT rules. List PAT rules. You can filter by gateway ID to list all
|
|
454
|
-
* PAT rules for a particular gateway, or filter for PAT rules targeting a
|
|
455
|
-
* specific IP address or using a specific protocol.
|
|
456
|
-
*
|
|
457
|
-
* @param request - The request {@link ListPATRulesRequest}
|
|
458
|
-
* @returns A Promise of ListPATRulesResponse
|
|
459
|
-
*/
|
|
460
|
-
listPATRules = (() => {
|
|
461
|
-
var _this10 = this;
|
|
462
|
-
return function (request) {
|
|
463
|
-
if (request === void 0) {
|
|
464
|
-
request = {};
|
|
465
|
-
}
|
|
466
|
-
return enrichForPagination('patRules', _this10.pageOfListPATRules, request);
|
|
467
|
-
};
|
|
468
|
-
})();
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Get a PAT rule. Get a PAT rule, specified by its PAT rule ID. The response
|
|
472
|
-
* object gives full details of the PAT rule, including the Public Gateway it
|
|
473
|
-
* belongs to and the configuration settings in terms of public / private
|
|
474
|
-
* ports, private IP and protocol.
|
|
475
|
-
*
|
|
476
|
-
* @param request - The request {@link GetPATRuleRequest}
|
|
477
|
-
* @returns A Promise of PATRule
|
|
478
|
-
*/
|
|
479
|
-
getPATRule = request => this.client.fetch({
|
|
480
|
-
method: 'GET',
|
|
481
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/pat-rules/${validatePathParam('patRuleId', request.patRuleId)}`
|
|
482
|
-
}, unmarshalPATRule);
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* Create a PAT rule. Create a new PAT rule on a specified Public Gateway,
|
|
486
|
-
* defining the protocol to use, public port to listen on, and private port /
|
|
487
|
-
* IP address to map to.
|
|
488
|
-
*
|
|
489
|
-
* @param request - The request {@link CreatePATRuleRequest}
|
|
490
|
-
* @returns A Promise of PATRule
|
|
491
|
-
*/
|
|
492
|
-
createPATRule = request => this.client.fetch({
|
|
493
|
-
body: JSON.stringify(marshalCreatePATRuleRequest(request, this.client.settings)),
|
|
494
|
-
headers: jsonContentHeaders,
|
|
495
|
-
method: 'POST',
|
|
496
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/pat-rules`
|
|
497
|
-
}, unmarshalPATRule);
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Update a PAT rule. Update a PAT rule, specified by its PAT rule ID.
|
|
501
|
-
* Configuration settings including private/public port, private IP address
|
|
502
|
-
* and protocol can all be updated.
|
|
503
|
-
*
|
|
504
|
-
* @param request - The request {@link UpdatePATRuleRequest}
|
|
505
|
-
* @returns A Promise of PATRule
|
|
506
|
-
*/
|
|
507
|
-
updatePATRule = request => this.client.fetch({
|
|
508
|
-
body: JSON.stringify(marshalUpdatePATRuleRequest(request, this.client.settings)),
|
|
509
|
-
headers: jsonContentHeaders,
|
|
510
|
-
method: 'PATCH',
|
|
511
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/pat-rules/${validatePathParam('patRuleId', request.patRuleId)}`
|
|
512
|
-
}, unmarshalPATRule);
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Set all PAT rules. Set a definitive list of PAT rules attached to a Public
|
|
516
|
-
* Gateway. Each rule is identified by its public port and protocol. This will
|
|
517
|
-
* sync the current PAT rule list on the gateway with the new list, creating,
|
|
518
|
-
* updating or deleting PAT rules accordingly.
|
|
519
|
-
*
|
|
520
|
-
* @param request - The request {@link SetPATRulesRequest}
|
|
521
|
-
* @returns A Promise of SetPATRulesResponse
|
|
522
|
-
*/
|
|
523
|
-
setPATRules = request => this.client.fetch({
|
|
524
|
-
body: JSON.stringify(marshalSetPATRulesRequest(request, this.client.settings)),
|
|
525
|
-
headers: jsonContentHeaders,
|
|
526
|
-
method: 'PUT',
|
|
527
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/pat-rules`
|
|
528
|
-
}, unmarshalSetPATRulesResponse);
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* Delete a PAT rule. Delete a PAT rule, identified by its PAT rule ID. This
|
|
532
|
-
* action is irreversible.
|
|
533
|
-
*
|
|
534
|
-
* @param request - The request {@link DeletePATRuleRequest}
|
|
535
|
-
*/
|
|
536
|
-
deletePATRule = request => this.client.fetch({
|
|
537
|
-
method: 'DELETE',
|
|
538
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/pat-rules/${validatePathParam('patRuleId', request.patRuleId)}`
|
|
539
|
-
});
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* List Public Gateway types. List the different Public Gateway commercial
|
|
543
|
-
* offer types available at Scaleway. The response is an array of objects
|
|
544
|
-
* describing the name and technical details of each available gateway type.
|
|
545
|
-
*
|
|
546
|
-
* @param request - The request {@link ListGatewayTypesRequest}
|
|
547
|
-
* @returns A Promise of ListGatewayTypesResponse
|
|
548
|
-
*/
|
|
549
|
-
listGatewayTypes = (() => {
|
|
550
|
-
var _this11 = this;
|
|
551
|
-
return function (request) {
|
|
552
|
-
if (request === void 0) {
|
|
553
|
-
request = {};
|
|
554
|
-
}
|
|
555
|
-
return _this11.client.fetch({
|
|
556
|
-
method: 'GET',
|
|
557
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this11.client.settings.defaultZone)}/gateway-types`
|
|
558
|
-
}, unmarshalListGatewayTypesResponse);
|
|
559
|
-
};
|
|
560
|
-
})();
|
|
561
|
-
pageOfListIPs = (() => {
|
|
562
|
-
var _this12 = this;
|
|
563
|
-
return function (request) {
|
|
564
|
-
if (request === void 0) {
|
|
565
|
-
request = {};
|
|
566
|
-
}
|
|
567
|
-
return _this12.client.fetch({
|
|
568
|
-
method: 'GET',
|
|
569
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this12.client.settings.defaultZone)}/ips`,
|
|
570
|
-
urlParams: urlParams(['is_free', request.isFree], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this12.client.settings.defaultPageSize], ['project_id', request.projectId], ['reverse', request.reverse], ['tags', request.tags])
|
|
571
|
-
}, unmarshalListIPsResponse);
|
|
572
|
-
};
|
|
573
|
-
})();
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* List IPs. List Public Gateway flexible IP addresses. A number of filter
|
|
577
|
-
* options are available for limiting results in the response.
|
|
578
|
-
*
|
|
579
|
-
* @param request - The request {@link ListIPsRequest}
|
|
580
|
-
* @returns A Promise of ListIPsResponse
|
|
581
|
-
*/
|
|
582
|
-
listIPs = (() => {
|
|
583
|
-
var _this13 = this;
|
|
584
|
-
return function (request) {
|
|
585
|
-
if (request === void 0) {
|
|
586
|
-
request = {};
|
|
587
|
-
}
|
|
588
|
-
return enrichForPagination('ips', _this13.pageOfListIPs, request);
|
|
589
|
-
};
|
|
590
|
-
})();
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* Get an IP. Get details of a Public Gateway flexible IP address, identified
|
|
594
|
-
* by its IP ID. The response object contains information including which (if
|
|
595
|
-
* any) Public Gateway using this IP address, the reverse and various other
|
|
596
|
-
* metadata.
|
|
597
|
-
*
|
|
598
|
-
* @param request - The request {@link GetIPRequest}
|
|
599
|
-
* @returns A Promise of IP
|
|
600
|
-
*/
|
|
601
|
-
getIP = request => this.client.fetch({
|
|
602
|
-
method: 'GET',
|
|
603
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
604
|
-
}, unmarshalIP);
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Reserve an IP. Create (reserve) a new flexible IP address that can be used
|
|
608
|
-
* for a Public Gateway in a specified Scaleway Project.
|
|
609
|
-
*
|
|
610
|
-
* @param request - The request {@link CreateIPRequest}
|
|
611
|
-
* @returns A Promise of IP
|
|
612
|
-
*/
|
|
613
|
-
createIP = (() => {
|
|
614
|
-
var _this14 = this;
|
|
615
|
-
return function (request) {
|
|
616
|
-
if (request === void 0) {
|
|
617
|
-
request = {};
|
|
618
|
-
}
|
|
619
|
-
return _this14.client.fetch({
|
|
620
|
-
body: JSON.stringify(marshalCreateIPRequest(request, _this14.client.settings)),
|
|
621
|
-
headers: jsonContentHeaders,
|
|
622
|
-
method: 'POST',
|
|
623
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? _this14.client.settings.defaultZone)}/ips`
|
|
624
|
-
}, unmarshalIP);
|
|
625
|
-
};
|
|
626
|
-
})();
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* Update an IP. Update details of an existing flexible IP address, including
|
|
630
|
-
* its tags, reverse and the Public Gateway it is assigned to.
|
|
631
|
-
*
|
|
632
|
-
* @param request - The request {@link UpdateIPRequest}
|
|
633
|
-
* @returns A Promise of IP
|
|
634
|
-
*/
|
|
635
|
-
updateIP = request => this.client.fetch({
|
|
636
|
-
body: JSON.stringify(marshalUpdateIPRequest(request, this.client.settings)),
|
|
637
|
-
headers: jsonContentHeaders,
|
|
638
|
-
method: 'PATCH',
|
|
639
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
640
|
-
}, unmarshalIP);
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* Delete an IP. Delete a flexible IP address from your account. This action
|
|
644
|
-
* is irreversible.
|
|
645
|
-
*
|
|
646
|
-
* @param request - The request {@link DeleteIPRequest}
|
|
647
|
-
*/
|
|
648
|
-
deleteIP = request => this.client.fetch({
|
|
649
|
-
method: 'DELETE',
|
|
650
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
651
|
-
});
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* Refresh a Public Gateway's SSH keys. Refresh the SSH keys of a given Public
|
|
655
|
-
* Gateway, specified by its gateway ID. This adds any new SSH keys in the
|
|
656
|
-
* gateway's Scaleway Project to the gateway itself.
|
|
657
|
-
*
|
|
658
|
-
* @param request - The request {@link RefreshSSHKeysRequest}
|
|
659
|
-
* @returns A Promise of Gateway
|
|
660
|
-
*/
|
|
661
|
-
refreshSSHKeys = request => this.client.fetch({
|
|
662
|
-
body: '{}',
|
|
663
|
-
headers: jsonContentHeaders,
|
|
664
|
-
method: 'POST',
|
|
665
|
-
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam('gatewayId', request.gatewayId)}/refresh-ssh-keys`
|
|
666
|
-
}, unmarshalGateway);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
export { API };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
-
|
|
4
|
-
/** Lists transient statutes of the enum {@link GatewayNetworkStatus}. */
|
|
5
|
-
const GATEWAY_NETWORK_TRANSIENT_STATUSES = ['attaching', 'configuring', 'detaching'];
|
|
6
|
-
|
|
7
|
-
/** Lists transient statutes of the enum {@link GatewayStatus}. */
|
|
8
|
-
const GATEWAY_TRANSIENT_STATUSES = ['allocating', 'configuring', 'stopping', 'deleting'];
|
|
9
|
-
|
|
10
|
-
export { GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES };
|