@scaleway/sdk 1.34.0 → 2.0.0-alpha.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/api/account/v2/api.gen.js +1 -1
- package/dist/api/account/v3/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
- package/dist/api/baremetal/v1/api.gen.js +6 -6
- package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
- package/dist/api/billing/v2alpha1/api.gen.js +3 -3
- package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
- package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
- package/dist/api/container/v1beta1/api.gen.js +11 -11
- package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
- package/dist/api/document_db/v1beta1/api.gen.js +6 -6
- package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
- package/dist/api/domain/v2beta1/api.gen.js +45 -38
- package/dist/api/domain/v2beta1/index.gen.js +2 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
- package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +11 -11
- package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
- package/dist/api/iam/v1alpha1/api.gen.js +64 -32
- package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
- package/dist/api/instance/v1/api.gen.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +397 -602
- package/dist/api/iot/v1/api.gen.js +35 -27
- package/dist/api/iot/v1/marshalling.gen.js +111 -162
- package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
- package/dist/api/k8s/v1/api.gen.js +3 -3
- package/dist/api/k8s/v1/marshalling.gen.js +109 -194
- package/dist/api/lb/v1/api.gen.js +583 -552
- package/dist/api/lb/v1/marshalling.gen.js +245 -361
- package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
- package/dist/api/marketplace/v2/api.gen.js +6 -6
- package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
- package/dist/api/rdb/v1/api.gen.js +7 -7
- package/dist/api/rdb/v1/marshalling.gen.js +184 -240
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/redis/v1/marshalling.gen.js +73 -97
- package/dist/api/registry/v1/api.gen.js +3 -3
- package/dist/api/registry/v1/marshalling.gen.js +5 -7
- package/dist/api/secret/v1alpha1/api.gen.js +2 -2
- package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
- package/dist/api/tem/v1alpha1/api.gen.js +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
- package/dist/api/test/v1/api.gen.js +8 -25
- package/dist/api/test/v1/marshalling.gen.js +5 -7
- package/dist/api/vpc/v1/api.gen.js +1 -1
- package/dist/api/vpc/v2/api.gen.js +2 -2
- package/dist/api/vpc/v2/marshalling.gen.js +3 -5
- package/dist/api/vpcgw/v1/api.gen.js +6 -6
- package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
- package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
- package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
- package/dist/index.cjs +3127 -3989
- package/dist/index.d.ts +9658 -12221
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
|
|
|
3
3
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { LB_TRANSIENT_STATUSES, CERTIFICATE_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListLbsResponse,
|
|
6
|
+
import { unmarshalListLbsResponse, marshalZonedApiCreateLbRequest, unmarshalLb, marshalZonedApiUpdateLbRequest, marshalZonedApiMigrateLbRequest, unmarshalListIpsResponse, marshalZonedApiCreateIpRequest, unmarshalIp, marshalZonedApiUpdateIpRequest, unmarshalListBackendsResponse, marshalZonedApiCreateBackendRequest, unmarshalBackend, marshalZonedApiUpdateBackendRequest, marshalZonedApiAddBackendServersRequest, marshalZonedApiRemoveBackendServersRequest, marshalZonedApiSetBackendServersRequest, marshalZonedApiUpdateHealthCheckRequest, unmarshalHealthCheck, unmarshalListFrontendsResponse, marshalZonedApiCreateFrontendRequest, unmarshalFrontend, marshalZonedApiUpdateFrontendRequest, unmarshalListRoutesResponse, marshalZonedApiCreateRouteRequest, unmarshalRoute, marshalZonedApiUpdateRouteRequest, unmarshalLbStats, unmarshalListBackendStatsResponse, unmarshalListAclResponse, marshalZonedApiCreateAclRequest, unmarshalAcl, marshalZonedApiUpdateAclRequest, marshalZonedApiSetAclsRequest, unmarshalSetAclsResponse, marshalZonedApiCreateCertificateRequest, unmarshalCertificate, unmarshalListCertificatesResponse, marshalZonedApiUpdateCertificateRequest, unmarshalListLbTypesResponse, marshalZonedApiCreateSubscriberRequest, unmarshalSubscriber, unmarshalListSubscriberResponse, marshalZonedApiUpdateSubscriberRequest, marshalZonedApiSubscribeToLbRequest, unmarshalListLbPrivateNetworksResponse, marshalZonedApiAttachPrivateNetworkRequest, unmarshalPrivateNetwork, marshalCreateLbRequest, marshalUpdateLbRequest, marshalMigrateLbRequest, marshalCreateIpRequest, marshalUpdateIpRequest, marshalCreateBackendRequest, marshalUpdateBackendRequest, marshalAddBackendServersRequest, marshalRemoveBackendServersRequest, marshalSetBackendServersRequest, marshalUpdateHealthCheckRequest, marshalCreateFrontendRequest, marshalUpdateFrontendRequest, marshalCreateRouteRequest, marshalUpdateRouteRequest, marshalCreateAclRequest, marshalUpdateAclRequest, marshalCreateCertificateRequest, marshalUpdateCertificateRequest, marshalCreateSubscriberRequest, marshalUpdateSubscriberRequest, marshalSubscribeToLbRequest, marshalAttachPrivateNetworkRequest } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -12,13 +12,13 @@ const jsonContentHeaders = {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Load
|
|
15
|
+
* Load Balancer API.
|
|
16
16
|
*
|
|
17
|
-
* This API allows you to manage your
|
|
17
|
+
* This API allows you to manage your Scaleway Load Balancer services.
|
|
18
18
|
*/
|
|
19
|
-
class
|
|
20
|
-
/** Lists the available
|
|
21
|
-
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
19
|
+
class ZonedAPI extends API$1 {
|
|
20
|
+
/** Lists the available zones of the API. */
|
|
21
|
+
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
22
22
|
pageOfListLbs = (() => {
|
|
23
23
|
var _this = this;
|
|
24
24
|
return function (request) {
|
|
@@ -27,16 +27,19 @@ class API extends API$1 {
|
|
|
27
27
|
}
|
|
28
28
|
return _this.client.fetch({
|
|
29
29
|
method: 'GET',
|
|
30
|
-
path: `/lb/v1/
|
|
31
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
30
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/lbs`,
|
|
31
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
32
32
|
}, unmarshalListLbsResponse);
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* List
|
|
37
|
+
* List Load Balancers. List all Load Balancers in the specified zone, for a
|
|
38
|
+
* Scaleway Organization or Scaleway Project. By default, the Load Balancers
|
|
39
|
+
* returned in the list are ordered by creation date in ascending order,
|
|
40
|
+
* though this can be modified via the `order_by` field.
|
|
38
41
|
*
|
|
39
|
-
* @param request - The request {@link
|
|
42
|
+
* @param request - The request {@link ZonedApiListLbsRequest}
|
|
40
43
|
* @returns A Promise of ListLbsResponse
|
|
41
44
|
*/
|
|
42
45
|
listLbs = (() => {
|
|
@@ -50,73 +53,84 @@ class API extends API$1 {
|
|
|
50
53
|
})();
|
|
51
54
|
|
|
52
55
|
/**
|
|
53
|
-
* Create a
|
|
56
|
+
* Create a Load Balancer. Create a new Load Balancer. Note that the Load
|
|
57
|
+
* Balancer will be created without frontends or backends; these must be
|
|
58
|
+
* created separately via the dedicated endpoints.
|
|
54
59
|
*
|
|
55
|
-
* @param request - The request {@link
|
|
60
|
+
* @param request - The request {@link ZonedApiCreateLbRequest}
|
|
56
61
|
* @returns A Promise of Lb
|
|
57
62
|
*/
|
|
58
63
|
createLb = request => this.client.fetch({
|
|
59
|
-
body: JSON.stringify(
|
|
64
|
+
body: JSON.stringify(marshalZonedApiCreateLbRequest(request, this.client.settings)),
|
|
60
65
|
headers: jsonContentHeaders,
|
|
61
66
|
method: 'POST',
|
|
62
|
-
path: `/lb/v1/
|
|
67
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs`
|
|
63
68
|
}, unmarshalLb);
|
|
64
69
|
|
|
65
70
|
/**
|
|
66
|
-
* Get a
|
|
71
|
+
* Get a Load Balancer. Retrieve information about an existing Load Balancer,
|
|
72
|
+
* specified by its Load Balancer ID. Its full details, including name, status
|
|
73
|
+
* and IP address, are returned in the response object.
|
|
67
74
|
*
|
|
68
|
-
* @param request - The request {@link
|
|
75
|
+
* @param request - The request {@link ZonedApiGetLbRequest}
|
|
69
76
|
* @returns A Promise of Lb
|
|
70
77
|
*/
|
|
71
78
|
getLb = request => this.client.fetch({
|
|
72
79
|
method: 'GET',
|
|
73
|
-
path: `/lb/v1/
|
|
80
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}`
|
|
74
81
|
}, unmarshalLb);
|
|
75
82
|
|
|
76
83
|
/**
|
|
77
84
|
* Waits for {@link Lb} to be in a final state.
|
|
78
85
|
*
|
|
79
|
-
* @param request - The request {@link
|
|
86
|
+
* @param request - The request {@link ZonedApiGetLbRequest}
|
|
80
87
|
* @param options - The waiting options
|
|
81
88
|
* @returns A Promise of Lb
|
|
82
89
|
*/
|
|
83
90
|
waitForLb = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
|
|
84
91
|
|
|
85
92
|
/**
|
|
86
|
-
* Update a
|
|
93
|
+
* Update a Load Balancer. Update the parameters of an existing Load Balancer,
|
|
94
|
+
* specified by its Load Balancer ID. Note that the request type is PUT and
|
|
95
|
+
* not PATCH. You must set all parameters.
|
|
87
96
|
*
|
|
88
|
-
* @param request - The request {@link
|
|
97
|
+
* @param request - The request {@link ZonedApiUpdateLbRequest}
|
|
89
98
|
* @returns A Promise of Lb
|
|
90
99
|
*/
|
|
91
100
|
updateLb = request => this.client.fetch({
|
|
92
|
-
body: JSON.stringify(
|
|
101
|
+
body: JSON.stringify(marshalZonedApiUpdateLbRequest(request, this.client.settings)),
|
|
93
102
|
headers: jsonContentHeaders,
|
|
94
103
|
method: 'PUT',
|
|
95
|
-
path: `/lb/v1/
|
|
104
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}`
|
|
96
105
|
}, unmarshalLb);
|
|
97
106
|
|
|
98
107
|
/**
|
|
99
|
-
* Delete a
|
|
108
|
+
* Delete a Load Balancer. Delete an existing Load Balancer, specified by its
|
|
109
|
+
* Load Balancer ID. Deleting a Load Balancer is permanent, and cannot be
|
|
110
|
+
* undone. The Load Balancer's flexible IP address can either be deleted with
|
|
111
|
+
* the Load Balancer, or kept in your account for future use.
|
|
100
112
|
*
|
|
101
|
-
* @param request - The request {@link
|
|
113
|
+
* @param request - The request {@link ZonedApiDeleteLbRequest}
|
|
102
114
|
*/
|
|
103
115
|
deleteLb = request => this.client.fetch({
|
|
104
116
|
method: 'DELETE',
|
|
105
|
-
path: `/lb/v1/
|
|
117
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}`,
|
|
106
118
|
urlParams: urlParams(['release_ip', request.releaseIp])
|
|
107
119
|
});
|
|
108
120
|
|
|
109
121
|
/**
|
|
110
|
-
* Migrate a
|
|
122
|
+
* Migrate a Load Balancer. Migrate an existing Load Balancer from one
|
|
123
|
+
* commercial type to another. Allows you to scale your Load Balancer up or
|
|
124
|
+
* down in terms of bandwidth or multi-cloud provision.
|
|
111
125
|
*
|
|
112
|
-
* @param request - The request {@link
|
|
126
|
+
* @param request - The request {@link ZonedApiMigrateLbRequest}
|
|
113
127
|
* @returns A Promise of Lb
|
|
114
128
|
*/
|
|
115
129
|
migrateLb = request => this.client.fetch({
|
|
116
|
-
body: JSON.stringify(
|
|
130
|
+
body: JSON.stringify(marshalZonedApiMigrateLbRequest(request, this.client.settings)),
|
|
117
131
|
headers: jsonContentHeaders,
|
|
118
132
|
method: 'POST',
|
|
119
|
-
path: `/lb/v1/
|
|
133
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/migrate`
|
|
120
134
|
}, unmarshalLb);
|
|
121
135
|
pageOfListIPs = (() => {
|
|
122
136
|
var _this3 = this;
|
|
@@ -126,16 +140,18 @@ class API extends API$1 {
|
|
|
126
140
|
}
|
|
127
141
|
return _this3.client.fetch({
|
|
128
142
|
method: 'GET',
|
|
129
|
-
path: `/lb/v1/
|
|
143
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/ips`,
|
|
130
144
|
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
131
145
|
}, unmarshalListIpsResponse);
|
|
132
146
|
};
|
|
133
147
|
})();
|
|
134
148
|
|
|
135
149
|
/**
|
|
136
|
-
* List
|
|
150
|
+
* List IP addresses. List the Load Balancer flexible IP addresses held in the
|
|
151
|
+
* account (filtered by Organization ID or Project ID). It is also possible to
|
|
152
|
+
* search for a specific IP address.
|
|
137
153
|
*
|
|
138
|
-
* @param request - The request {@link
|
|
154
|
+
* @param request - The request {@link ZonedApiListIPsRequest}
|
|
139
155
|
* @returns A Promise of ListIpsResponse
|
|
140
156
|
*/
|
|
141
157
|
listIPs = (() => {
|
|
@@ -149,9 +165,11 @@ class API extends API$1 {
|
|
|
149
165
|
})();
|
|
150
166
|
|
|
151
167
|
/**
|
|
152
|
-
* Create an IP.
|
|
168
|
+
* Create an IP address. Create a new Load Balancer flexible IP address, in
|
|
169
|
+
* the specified Scaleway Project. This can be attached to new Load Balancers
|
|
170
|
+
* created in the future.
|
|
153
171
|
*
|
|
154
|
-
* @param request - The request {@link
|
|
172
|
+
* @param request - The request {@link ZonedApiCreateIpRequest}
|
|
155
173
|
* @returns A Promise of Ip
|
|
156
174
|
*/
|
|
157
175
|
createIp = (() => {
|
|
@@ -161,218 +179,260 @@ class API extends API$1 {
|
|
|
161
179
|
request = {};
|
|
162
180
|
}
|
|
163
181
|
return _this5.client.fetch({
|
|
164
|
-
body: JSON.stringify(
|
|
182
|
+
body: JSON.stringify(marshalZonedApiCreateIpRequest(request, _this5.client.settings)),
|
|
165
183
|
headers: jsonContentHeaders,
|
|
166
184
|
method: 'POST',
|
|
167
|
-
path: `/lb/v1/
|
|
185
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this5.client.settings.defaultZone)}/ips`
|
|
168
186
|
}, unmarshalIp);
|
|
169
187
|
};
|
|
170
188
|
})();
|
|
171
189
|
|
|
172
190
|
/**
|
|
173
|
-
* Get an IP.
|
|
191
|
+
* Get an IP address. Retrieve the full details of a Load Balancer flexible IP
|
|
192
|
+
* address.
|
|
174
193
|
*
|
|
175
|
-
* @param request - The request {@link
|
|
194
|
+
* @param request - The request {@link ZonedApiGetIpRequest}
|
|
176
195
|
* @returns A Promise of Ip
|
|
177
196
|
*/
|
|
178
197
|
getIp = request => this.client.fetch({
|
|
179
198
|
method: 'GET',
|
|
180
|
-
path: `/lb/v1/
|
|
199
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
181
200
|
}, unmarshalIp);
|
|
182
201
|
|
|
183
202
|
/**
|
|
184
|
-
* Delete an IP.
|
|
203
|
+
* Delete an IP address. Delete a Load Balancer flexible IP address. This
|
|
204
|
+
* action is irreversible, and cannot be undone.
|
|
185
205
|
*
|
|
186
|
-
* @param request - The request {@link
|
|
206
|
+
* @param request - The request {@link ZonedApiReleaseIpRequest}
|
|
187
207
|
*/
|
|
188
208
|
releaseIp = request => this.client.fetch({
|
|
189
209
|
method: 'DELETE',
|
|
190
|
-
path: `/lb/v1/
|
|
210
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
191
211
|
});
|
|
192
212
|
|
|
193
213
|
/**
|
|
194
|
-
* Update an IP.
|
|
214
|
+
* Update an IP address. Update the reverse DNS of a Load Balancer flexible IP
|
|
215
|
+
* address.
|
|
195
216
|
*
|
|
196
|
-
* @param request - The request {@link
|
|
217
|
+
* @param request - The request {@link ZonedApiUpdateIpRequest}
|
|
197
218
|
* @returns A Promise of Ip
|
|
198
219
|
*/
|
|
199
220
|
updateIp = request => this.client.fetch({
|
|
200
|
-
body: JSON.stringify(
|
|
221
|
+
body: JSON.stringify(marshalZonedApiUpdateIpRequest(request, this.client.settings)),
|
|
201
222
|
headers: jsonContentHeaders,
|
|
202
223
|
method: 'PATCH',
|
|
203
|
-
path: `/lb/v1/
|
|
224
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
204
225
|
}, unmarshalIp);
|
|
205
226
|
pageOfListBackends = request => this.client.fetch({
|
|
206
227
|
method: 'GET',
|
|
207
|
-
path: `/lb/v1/
|
|
208
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
228
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/backends`,
|
|
229
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
209
230
|
}, unmarshalListBackendsResponse);
|
|
210
231
|
|
|
211
232
|
/**
|
|
212
|
-
* List backends
|
|
233
|
+
* List the backends of a given Load Balancer. List all the backends of a Load
|
|
234
|
+
* Balancer, specified by its Load Balancer ID. By default, results are
|
|
235
|
+
* returned in ascending order by the creation date of each backend. The
|
|
236
|
+
* response is an array of backend objects, containing full details of each
|
|
237
|
+
* one including their configuration parameters such as protocol, port and
|
|
238
|
+
* forwarding algorithm.
|
|
213
239
|
*
|
|
214
|
-
* @param request - The request {@link
|
|
240
|
+
* @param request - The request {@link ZonedApiListBackendsRequest}
|
|
215
241
|
* @returns A Promise of ListBackendsResponse
|
|
216
242
|
*/
|
|
217
243
|
listBackends = request => enrichForPagination('backends', this.pageOfListBackends, request);
|
|
218
244
|
|
|
219
245
|
/**
|
|
220
|
-
* Create a backend
|
|
246
|
+
* Create a backend for a given Load Balancer. Create a new backend for a
|
|
247
|
+
* given Load Balancer, specifying its full configuration including protocol,
|
|
248
|
+
* port and forwarding algorithm.
|
|
221
249
|
*
|
|
222
|
-
* @param request - The request {@link
|
|
250
|
+
* @param request - The request {@link ZonedApiCreateBackendRequest}
|
|
223
251
|
* @returns A Promise of Backend
|
|
224
252
|
*/
|
|
225
253
|
createBackend = request => this.client.fetch({
|
|
226
|
-
body: JSON.stringify(
|
|
254
|
+
body: JSON.stringify(marshalZonedApiCreateBackendRequest(request, this.client.settings)),
|
|
227
255
|
headers: jsonContentHeaders,
|
|
228
256
|
method: 'POST',
|
|
229
|
-
path: `/lb/v1/
|
|
257
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/backends`
|
|
230
258
|
}, unmarshalBackend);
|
|
231
259
|
|
|
232
260
|
/**
|
|
233
|
-
* Get a backend
|
|
261
|
+
* Get a backend of a given Load Balancer. Get the full details of a given
|
|
262
|
+
* backend, specified by its backend ID. The response contains the backend's
|
|
263
|
+
* full configuration parameters including protocol, port and forwarding
|
|
264
|
+
* algorithm.
|
|
234
265
|
*
|
|
235
|
-
* @param request - The request {@link
|
|
266
|
+
* @param request - The request {@link ZonedApiGetBackendRequest}
|
|
236
267
|
* @returns A Promise of Backend
|
|
237
268
|
*/
|
|
238
269
|
getBackend = request => this.client.fetch({
|
|
239
270
|
method: 'GET',
|
|
240
|
-
path: `/lb/v1/
|
|
271
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam('backendId', request.backendId)}`
|
|
241
272
|
}, unmarshalBackend);
|
|
242
273
|
|
|
243
274
|
/**
|
|
244
|
-
* Update a backend
|
|
275
|
+
* Update a backend of a given Load Balancer. Update a backend of a given Load
|
|
276
|
+
* Balancer, specified by its backend ID. Note that the request type is PUT
|
|
277
|
+
* and not PATCH. You must set all parameters.
|
|
245
278
|
*
|
|
246
|
-
* @param request - The request {@link
|
|
279
|
+
* @param request - The request {@link ZonedApiUpdateBackendRequest}
|
|
247
280
|
* @returns A Promise of Backend
|
|
248
281
|
*/
|
|
249
282
|
updateBackend = request => this.client.fetch({
|
|
250
|
-
body: JSON.stringify(
|
|
283
|
+
body: JSON.stringify(marshalZonedApiUpdateBackendRequest(request, this.client.settings)),
|
|
251
284
|
headers: jsonContentHeaders,
|
|
252
285
|
method: 'PUT',
|
|
253
|
-
path: `/lb/v1/
|
|
286
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam('backendId', request.backendId)}`
|
|
254
287
|
}, unmarshalBackend);
|
|
255
288
|
|
|
256
289
|
/**
|
|
257
|
-
* Delete a backend
|
|
290
|
+
* Delete a backend of a given Load Balancer. Delete a backend of a given Load
|
|
291
|
+
* Balancer, specified by its backend ID. This action is irreversible and
|
|
292
|
+
* cannot be undone.
|
|
258
293
|
*
|
|
259
|
-
* @param request - The request {@link
|
|
294
|
+
* @param request - The request {@link ZonedApiDeleteBackendRequest}
|
|
260
295
|
*/
|
|
261
296
|
deleteBackend = request => this.client.fetch({
|
|
262
297
|
method: 'DELETE',
|
|
263
|
-
path: `/lb/v1/
|
|
298
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam('backendId', request.backendId)}`
|
|
264
299
|
});
|
|
265
300
|
|
|
266
301
|
/**
|
|
267
|
-
* Add a set of servers
|
|
302
|
+
* Add a set of backend servers to a given backend. For a given backend
|
|
303
|
+
* specified by its backend ID, add a set of backend servers (identified by
|
|
304
|
+
* their IP addresses) it should forward traffic to. These will be appended to
|
|
305
|
+
* any existing set of backend servers for this backend.
|
|
268
306
|
*
|
|
269
|
-
* @param request - The request {@link
|
|
307
|
+
* @param request - The request {@link ZonedApiAddBackendServersRequest}
|
|
270
308
|
* @returns A Promise of Backend
|
|
271
309
|
*/
|
|
272
310
|
addBackendServers = request => this.client.fetch({
|
|
273
|
-
body: JSON.stringify(
|
|
311
|
+
body: JSON.stringify(marshalZonedApiAddBackendServersRequest(request, this.client.settings)),
|
|
274
312
|
headers: jsonContentHeaders,
|
|
275
313
|
method: 'POST',
|
|
276
|
-
path: `/lb/v1/
|
|
314
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam('backendId', request.backendId)}/servers`
|
|
277
315
|
}, unmarshalBackend);
|
|
278
316
|
|
|
279
317
|
/**
|
|
280
|
-
* Remove a set of servers for a given backend.
|
|
318
|
+
* Remove a set of servers for a given backend. For a given backend specified
|
|
319
|
+
* by its backend ID, remove the specified backend servers (identified by
|
|
320
|
+
* their IP addresses) so that it no longer forwards traffic to them.
|
|
281
321
|
*
|
|
282
|
-
* @param request - The request {@link
|
|
322
|
+
* @param request - The request {@link ZonedApiRemoveBackendServersRequest}
|
|
283
323
|
* @returns A Promise of Backend
|
|
284
324
|
*/
|
|
285
325
|
removeBackendServers = request => this.client.fetch({
|
|
286
|
-
body: JSON.stringify(
|
|
326
|
+
body: JSON.stringify(marshalZonedApiRemoveBackendServersRequest(request, this.client.settings)),
|
|
287
327
|
headers: jsonContentHeaders,
|
|
288
328
|
method: 'DELETE',
|
|
289
|
-
path: `/lb/v1/
|
|
329
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam('backendId', request.backendId)}/servers`
|
|
290
330
|
}, unmarshalBackend);
|
|
291
331
|
|
|
292
332
|
/**
|
|
293
|
-
* Define all servers
|
|
333
|
+
* Define all backend servers for a given backend. For a given backend
|
|
334
|
+
* specified by its backend ID, define the set of backend servers (identified
|
|
335
|
+
* by their IP addresses) that it should forward traffic to. Any existing
|
|
336
|
+
* backend servers configured for this backend will be removed.
|
|
294
337
|
*
|
|
295
|
-
* @param request - The request {@link
|
|
338
|
+
* @param request - The request {@link ZonedApiSetBackendServersRequest}
|
|
296
339
|
* @returns A Promise of Backend
|
|
297
340
|
*/
|
|
298
341
|
setBackendServers = request => this.client.fetch({
|
|
299
|
-
body: JSON.stringify(
|
|
342
|
+
body: JSON.stringify(marshalZonedApiSetBackendServersRequest(request, this.client.settings)),
|
|
300
343
|
headers: jsonContentHeaders,
|
|
301
344
|
method: 'PUT',
|
|
302
|
-
path: `/lb/v1/
|
|
345
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam('backendId', request.backendId)}/servers`
|
|
303
346
|
}, unmarshalBackend);
|
|
304
347
|
|
|
305
348
|
/**
|
|
306
|
-
* Update
|
|
349
|
+
* Update a health check for a given backend. Update the configuration of the
|
|
350
|
+
* health check performed by a given backend to verify the health of its
|
|
351
|
+
* backend servers, identified by its backend ID. Note that the request type
|
|
352
|
+
* is PUT and not PATCH. You must set all parameters.
|
|
307
353
|
*
|
|
308
|
-
* @param request - The request {@link
|
|
354
|
+
* @param request - The request {@link ZonedApiUpdateHealthCheckRequest}
|
|
309
355
|
* @returns A Promise of HealthCheck
|
|
310
356
|
*/
|
|
311
357
|
updateHealthCheck = request => this.client.fetch({
|
|
312
|
-
body: JSON.stringify(
|
|
358
|
+
body: JSON.stringify(marshalZonedApiUpdateHealthCheckRequest(request, this.client.settings)),
|
|
313
359
|
headers: jsonContentHeaders,
|
|
314
360
|
method: 'PUT',
|
|
315
|
-
path: `/lb/v1/
|
|
361
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam('backendId', request.backendId)}/healthcheck`
|
|
316
362
|
}, unmarshalHealthCheck);
|
|
317
363
|
pageOfListFrontends = request => this.client.fetch({
|
|
318
364
|
method: 'GET',
|
|
319
|
-
path: `/lb/v1/
|
|
320
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
365
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/frontends`,
|
|
366
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
321
367
|
}, unmarshalListFrontendsResponse);
|
|
322
368
|
|
|
323
369
|
/**
|
|
324
|
-
* List frontends
|
|
370
|
+
* List frontends of a given Load Balancer. List all the frontends of a Load
|
|
371
|
+
* Balancer, specified by its Load Balancer ID. By default, results are
|
|
372
|
+
* returned in ascending order by the creation date of each frontend. The
|
|
373
|
+
* response is an array of frontend objects, containing full details of each
|
|
374
|
+
* one including the port they listen on and the backend they are attached
|
|
375
|
+
* to.
|
|
325
376
|
*
|
|
326
|
-
* @param request - The request {@link
|
|
377
|
+
* @param request - The request {@link ZonedApiListFrontendsRequest}
|
|
327
378
|
* @returns A Promise of ListFrontendsResponse
|
|
328
379
|
*/
|
|
329
380
|
listFrontends = request => enrichForPagination('frontends', this.pageOfListFrontends, request);
|
|
330
381
|
|
|
331
382
|
/**
|
|
332
|
-
* Create a frontend in a given
|
|
383
|
+
* Create a frontend in a given Load Balancer. Create a new frontend for a
|
|
384
|
+
* given Load Balancer, specifying its configuration including the port it
|
|
385
|
+
* should listen on and the backend to attach it to.
|
|
333
386
|
*
|
|
334
|
-
* @param request - The request {@link
|
|
387
|
+
* @param request - The request {@link ZonedApiCreateFrontendRequest}
|
|
335
388
|
* @returns A Promise of Frontend
|
|
336
389
|
*/
|
|
337
390
|
createFrontend = request => this.client.fetch({
|
|
338
|
-
body: JSON.stringify(
|
|
391
|
+
body: JSON.stringify(marshalZonedApiCreateFrontendRequest(request, this.client.settings)),
|
|
339
392
|
headers: jsonContentHeaders,
|
|
340
393
|
method: 'POST',
|
|
341
|
-
path: `/lb/v1/
|
|
394
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/frontends`
|
|
342
395
|
}, unmarshalFrontend);
|
|
343
396
|
|
|
344
397
|
/**
|
|
345
|
-
* Get a frontend.
|
|
398
|
+
* Get a frontend. Get the full details of a given frontend, specified by its
|
|
399
|
+
* frontend ID. The response contains the frontend's full configuration
|
|
400
|
+
* parameters including the backend it is attached to, the port it listens on,
|
|
401
|
+
* and any certificates it has.
|
|
346
402
|
*
|
|
347
|
-
* @param request - The request {@link
|
|
403
|
+
* @param request - The request {@link ZonedApiGetFrontendRequest}
|
|
348
404
|
* @returns A Promise of Frontend
|
|
349
405
|
*/
|
|
350
406
|
getFrontend = request => this.client.fetch({
|
|
351
407
|
method: 'GET',
|
|
352
|
-
path: `/lb/v1/
|
|
408
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
353
409
|
}, unmarshalFrontend);
|
|
354
410
|
|
|
355
411
|
/**
|
|
356
|
-
* Update a frontend.
|
|
412
|
+
* Update a frontend. Update a given frontend, specified by its frontend ID.
|
|
413
|
+
* You can update configuration parameters including its name and the port it
|
|
414
|
+
* listens on. Note that the request type is PUT and not PATCH. You must set
|
|
415
|
+
* all parameters.
|
|
357
416
|
*
|
|
358
|
-
* @param request - The request {@link
|
|
417
|
+
* @param request - The request {@link ZonedApiUpdateFrontendRequest}
|
|
359
418
|
* @returns A Promise of Frontend
|
|
360
419
|
*/
|
|
361
420
|
updateFrontend = request => this.client.fetch({
|
|
362
|
-
body: JSON.stringify(
|
|
421
|
+
body: JSON.stringify(marshalZonedApiUpdateFrontendRequest(request, this.client.settings)),
|
|
363
422
|
headers: jsonContentHeaders,
|
|
364
423
|
method: 'PUT',
|
|
365
|
-
path: `/lb/v1/
|
|
424
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
366
425
|
}, unmarshalFrontend);
|
|
367
426
|
|
|
368
427
|
/**
|
|
369
|
-
* Delete a frontend.
|
|
428
|
+
* Delete a frontend. Delete a given frontend, specified by its frontend ID.
|
|
429
|
+
* This action is irreversible and cannot be undone.
|
|
370
430
|
*
|
|
371
|
-
* @param request - The request {@link
|
|
431
|
+
* @param request - The request {@link ZonedApiDeleteFrontendRequest}
|
|
372
432
|
*/
|
|
373
433
|
deleteFrontend = request => this.client.fetch({
|
|
374
434
|
method: 'DELETE',
|
|
375
|
-
path: `/lb/v1/
|
|
435
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
376
436
|
});
|
|
377
437
|
pageOfListRoutes = (() => {
|
|
378
438
|
var _this6 = this;
|
|
@@ -382,16 +442,19 @@ class API extends API$1 {
|
|
|
382
442
|
}
|
|
383
443
|
return _this6.client.fetch({
|
|
384
444
|
method: 'GET',
|
|
385
|
-
path: `/lb/v1/
|
|
386
|
-
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy
|
|
445
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this6.client.settings.defaultZone)}/routes`,
|
|
446
|
+
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
|
|
387
447
|
}, unmarshalListRoutesResponse);
|
|
388
448
|
};
|
|
389
449
|
})();
|
|
390
450
|
|
|
391
451
|
/**
|
|
392
|
-
* List all
|
|
452
|
+
* List all routes. List all routes for a given frontend. The response is an
|
|
453
|
+
* array of routes, each one with a specified backend to direct to if a
|
|
454
|
+
* certain condition is matched (based on the value of the SNI field or HTTP
|
|
455
|
+
* Host header).
|
|
393
456
|
*
|
|
394
|
-
* @param request - The request {@link
|
|
457
|
+
* @param request - The request {@link ZonedApiListRoutesRequest}
|
|
395
458
|
* @returns A Promise of ListRoutesResponse
|
|
396
459
|
*/
|
|
397
460
|
listRoutes = (() => {
|
|
@@ -405,206 +468,248 @@ class API extends API$1 {
|
|
|
405
468
|
})();
|
|
406
469
|
|
|
407
470
|
/**
|
|
408
|
-
* Create a
|
|
471
|
+
* Create a route. Create a new route on a given frontend. To configure a
|
|
472
|
+
* route, specify the backend to direct to if a certain condition is matched
|
|
473
|
+
* (based on the value of the SNI field or HTTP Host header).
|
|
409
474
|
*
|
|
410
|
-
* @param request - The request {@link
|
|
475
|
+
* @param request - The request {@link ZonedApiCreateRouteRequest}
|
|
411
476
|
* @returns A Promise of Route
|
|
412
477
|
*/
|
|
413
478
|
createRoute = request => this.client.fetch({
|
|
414
|
-
body: JSON.stringify(
|
|
479
|
+
body: JSON.stringify(marshalZonedApiCreateRouteRequest(request, this.client.settings)),
|
|
415
480
|
headers: jsonContentHeaders,
|
|
416
481
|
method: 'POST',
|
|
417
|
-
path: `/lb/v1/
|
|
482
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/routes`
|
|
418
483
|
}, unmarshalRoute);
|
|
419
484
|
|
|
420
485
|
/**
|
|
421
|
-
* Get
|
|
422
|
-
*
|
|
423
|
-
*
|
|
486
|
+
* Get a route. Retrieve information about an existing route, specified by its
|
|
487
|
+
* route ID. Its full details, origin frontend, target backend and match
|
|
488
|
+
* condition, are returned in the response object.
|
|
489
|
+
*
|
|
490
|
+
* @param request - The request {@link ZonedApiGetRouteRequest}
|
|
424
491
|
* @returns A Promise of Route
|
|
425
492
|
*/
|
|
426
493
|
getRoute = request => this.client.fetch({
|
|
427
494
|
method: 'GET',
|
|
428
|
-
path: `/lb/v1/
|
|
495
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
429
496
|
}, unmarshalRoute);
|
|
430
497
|
|
|
431
498
|
/**
|
|
432
|
-
*
|
|
499
|
+
* Update a route. Update the configuration of an existing route, specified by
|
|
500
|
+
* its route ID.
|
|
433
501
|
*
|
|
434
|
-
* @param request - The request {@link
|
|
502
|
+
* @param request - The request {@link ZonedApiUpdateRouteRequest}
|
|
435
503
|
* @returns A Promise of Route
|
|
436
504
|
*/
|
|
437
505
|
updateRoute = request => this.client.fetch({
|
|
438
|
-
body: JSON.stringify(
|
|
506
|
+
body: JSON.stringify(marshalZonedApiUpdateRouteRequest(request, this.client.settings)),
|
|
439
507
|
headers: jsonContentHeaders,
|
|
440
508
|
method: 'PUT',
|
|
441
|
-
path: `/lb/v1/
|
|
509
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
442
510
|
}, unmarshalRoute);
|
|
443
511
|
|
|
444
512
|
/**
|
|
445
|
-
* Delete a
|
|
513
|
+
* Delete a route. Delete an existing route, specified by its route ID.
|
|
514
|
+
* Deleting a route is permanent, and cannot be undone.
|
|
446
515
|
*
|
|
447
|
-
* @param request - The request {@link
|
|
516
|
+
* @param request - The request {@link ZonedApiDeleteRouteRequest}
|
|
448
517
|
*/
|
|
449
518
|
deleteRoute = request => this.client.fetch({
|
|
450
519
|
method: 'DELETE',
|
|
451
|
-
path: `/lb/v1/
|
|
520
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
452
521
|
});
|
|
453
522
|
|
|
454
523
|
/**
|
|
455
|
-
* Get usage statistics of a given
|
|
524
|
+
* Get usage statistics of a given Load Balancer.
|
|
456
525
|
*
|
|
457
526
|
* @deprecated
|
|
458
|
-
* @param request - The request {@link
|
|
527
|
+
* @param request - The request {@link ZonedApiGetLbStatsRequest}
|
|
459
528
|
* @returns A Promise of LbStats
|
|
460
529
|
*/
|
|
461
530
|
getLbStats = request => this.client.fetch({
|
|
462
531
|
method: 'GET',
|
|
463
|
-
path: `/lb/v1/
|
|
532
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/stats`,
|
|
464
533
|
urlParams: urlParams(['backend_id', request.backendId])
|
|
465
534
|
}, unmarshalLbStats);
|
|
466
535
|
pageOfListBackendStats = request => this.client.fetch({
|
|
467
536
|
method: 'GET',
|
|
468
|
-
path: `/lb/v1/
|
|
537
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/backend-stats`,
|
|
469
538
|
urlParams: urlParams(['backend_id', request.backendId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
470
539
|
}, unmarshalListBackendStatsResponse);
|
|
471
540
|
|
|
472
541
|
/**
|
|
473
|
-
* List backend server statistics.
|
|
542
|
+
* List backend server statistics. List information about your backend
|
|
543
|
+
* servers, including their state and the result of their last health check.
|
|
474
544
|
*
|
|
475
|
-
* @param request - The request {@link
|
|
545
|
+
* @param request - The request {@link ZonedApiListBackendStatsRequest}
|
|
476
546
|
* @returns A Promise of ListBackendStatsResponse
|
|
477
547
|
*/
|
|
478
548
|
listBackendStats = request => enrichForPagination('backendServersStats', this.pageOfListBackendStats, request);
|
|
479
549
|
pageOfListAcls = request => this.client.fetch({
|
|
480
550
|
method: 'GET',
|
|
481
|
-
path: `/lb/v1/
|
|
482
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
551
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}/acls`,
|
|
552
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
483
553
|
}, unmarshalListAclResponse);
|
|
484
554
|
|
|
485
555
|
/**
|
|
486
|
-
* List
|
|
556
|
+
* List ACLs for a given frontend. List the ACLs for a given frontend,
|
|
557
|
+
* specified by its frontend ID. The response is an array of ACL objects, each
|
|
558
|
+
* one representing an ACL that denies or allows traffic based on certain
|
|
559
|
+
* conditions.
|
|
487
560
|
*
|
|
488
|
-
* @param request - The request {@link
|
|
561
|
+
* @param request - The request {@link ZonedApiListAclsRequest}
|
|
489
562
|
* @returns A Promise of ListAclResponse
|
|
490
563
|
*/
|
|
491
564
|
listAcls = request => enrichForPagination('acls', this.pageOfListAcls, request);
|
|
492
565
|
|
|
493
566
|
/**
|
|
494
|
-
* Create an ACL for a given frontend.
|
|
567
|
+
* Create an ACL for a given frontend. Create a new ACL for a given frontend.
|
|
568
|
+
* Each ACL must have a name, an action to perform (allow or deny), and a
|
|
569
|
+
* match rule (the action is carried out when the incoming traffic matches the
|
|
570
|
+
* rule).
|
|
495
571
|
*
|
|
496
|
-
* @param request - The request {@link
|
|
572
|
+
* @param request - The request {@link ZonedApiCreateAclRequest}
|
|
497
573
|
* @returns A Promise of Acl
|
|
498
574
|
*/
|
|
499
575
|
createAcl = request => this.client.fetch({
|
|
500
|
-
body: JSON.stringify(
|
|
576
|
+
body: JSON.stringify(marshalZonedApiCreateAclRequest(request, this.client.settings)),
|
|
501
577
|
headers: jsonContentHeaders,
|
|
502
578
|
method: 'POST',
|
|
503
|
-
path: `/lb/v1/
|
|
579
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}/acls`
|
|
504
580
|
}, unmarshalAcl);
|
|
505
581
|
|
|
506
582
|
/**
|
|
507
|
-
* Get an ACL.
|
|
583
|
+
* Get an ACL. Get information for a particular ACL, specified by its ACL ID.
|
|
584
|
+
* The response returns full details of the ACL, including its name, action,
|
|
585
|
+
* match rule and frontend.
|
|
508
586
|
*
|
|
509
|
-
* @param request - The request {@link
|
|
587
|
+
* @param request - The request {@link ZonedApiGetAclRequest}
|
|
510
588
|
* @returns A Promise of Acl
|
|
511
589
|
*/
|
|
512
590
|
getAcl = request => this.client.fetch({
|
|
513
591
|
method: 'GET',
|
|
514
|
-
path: `/lb/v1/
|
|
592
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam('aclId', request.aclId)}`
|
|
515
593
|
}, unmarshalAcl);
|
|
516
594
|
|
|
517
595
|
/**
|
|
518
|
-
* Update an ACL.
|
|
596
|
+
* Update an ACL. Update a particular ACL, specified by its ACL ID. You can
|
|
597
|
+
* update details including its name, action and match rule.
|
|
519
598
|
*
|
|
520
|
-
* @param request - The request {@link
|
|
599
|
+
* @param request - The request {@link ZonedApiUpdateAclRequest}
|
|
521
600
|
* @returns A Promise of Acl
|
|
522
601
|
*/
|
|
523
602
|
updateAcl = request => this.client.fetch({
|
|
524
|
-
body: JSON.stringify(
|
|
603
|
+
body: JSON.stringify(marshalZonedApiUpdateAclRequest(request, this.client.settings)),
|
|
525
604
|
headers: jsonContentHeaders,
|
|
526
605
|
method: 'PUT',
|
|
527
|
-
path: `/lb/v1/
|
|
606
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam('aclId', request.aclId)}`
|
|
528
607
|
}, unmarshalAcl);
|
|
529
608
|
|
|
530
609
|
/**
|
|
531
|
-
* Delete an ACL.
|
|
610
|
+
* Delete an ACL. Delete an ACL, specified by its ACL ID. Deleting an ACL is
|
|
611
|
+
* irreversible and cannot be undone.
|
|
532
612
|
*
|
|
533
|
-
* @param request - The request {@link
|
|
613
|
+
* @param request - The request {@link ZonedApiDeleteAclRequest}
|
|
534
614
|
*/
|
|
535
615
|
deleteAcl = request => this.client.fetch({
|
|
536
616
|
method: 'DELETE',
|
|
537
|
-
path: `/lb/v1/
|
|
617
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam('aclId', request.aclId)}`
|
|
538
618
|
});
|
|
539
619
|
|
|
540
620
|
/**
|
|
541
|
-
*
|
|
542
|
-
*
|
|
621
|
+
* Define all ACLs for a given frontend. For a given frontend specified by its
|
|
622
|
+
* frontend ID, define and add the complete set of ACLS for that frontend. Any
|
|
623
|
+
* existing ACLs on this frontend will be removed.
|
|
543
624
|
*
|
|
544
|
-
* @param request - The request {@link
|
|
625
|
+
* @param request - The request {@link ZonedApiSetAclsRequest}
|
|
626
|
+
* @returns A Promise of SetAclsResponse
|
|
627
|
+
*/
|
|
628
|
+
setAcls = request => this.client.fetch({
|
|
629
|
+
body: JSON.stringify(marshalZonedApiSetAclsRequest(request, this.client.settings)),
|
|
630
|
+
headers: jsonContentHeaders,
|
|
631
|
+
method: 'PUT',
|
|
632
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}/acls`
|
|
633
|
+
}, unmarshalSetAclsResponse);
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Create an SSL/TLS certificate. Generate a new SSL/TLS certificate for a
|
|
637
|
+
* given Load Balancer. You can choose to create a Let's Encrypt certificate,
|
|
638
|
+
* or import a custom certificate.
|
|
639
|
+
*
|
|
640
|
+
* @param request - The request {@link ZonedApiCreateCertificateRequest}
|
|
545
641
|
* @returns A Promise of Certificate
|
|
546
642
|
*/
|
|
547
643
|
createCertificate = request => this.client.fetch({
|
|
548
|
-
body: JSON.stringify(
|
|
644
|
+
body: JSON.stringify(marshalZonedApiCreateCertificateRequest(request, this.client.settings)),
|
|
549
645
|
headers: jsonContentHeaders,
|
|
550
646
|
method: 'POST',
|
|
551
|
-
path: `/lb/v1/
|
|
647
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/certificates`
|
|
552
648
|
}, unmarshalCertificate);
|
|
553
649
|
pageOfListCertificates = request => this.client.fetch({
|
|
554
650
|
method: 'GET',
|
|
555
|
-
path: `/lb/v1/
|
|
556
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
651
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/certificates`,
|
|
652
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
557
653
|
}, unmarshalListCertificatesResponse);
|
|
558
654
|
|
|
559
655
|
/**
|
|
560
|
-
* List all TLS certificates on a given
|
|
656
|
+
* List all SSL/TLS certificates on a given Load Balancer. List all the
|
|
657
|
+
* SSL/TLS certificates on a given Load Balancer. The response is an array of
|
|
658
|
+
* certificate objects, which are by default listed in ascending order of
|
|
659
|
+
* creation date.
|
|
561
660
|
*
|
|
562
|
-
* @param request - The request {@link
|
|
661
|
+
* @param request - The request {@link ZonedApiListCertificatesRequest}
|
|
563
662
|
* @returns A Promise of ListCertificatesResponse
|
|
564
663
|
*/
|
|
565
664
|
listCertificates = request => enrichForPagination('certificates', this.pageOfListCertificates, request);
|
|
566
665
|
|
|
567
666
|
/**
|
|
568
|
-
* Get
|
|
667
|
+
* Get an SSL/TLS certificate. Get information for a particular SSL/TLS
|
|
668
|
+
* certificate, specified by its certificate ID. The response returns full
|
|
669
|
+
* details of the certificate, including its type, main domain name, and
|
|
670
|
+
* alternative domain names.
|
|
569
671
|
*
|
|
570
|
-
* @param request - The request {@link
|
|
672
|
+
* @param request - The request {@link ZonedApiGetCertificateRequest}
|
|
571
673
|
* @returns A Promise of Certificate
|
|
572
674
|
*/
|
|
573
675
|
getCertificate = request => this.client.fetch({
|
|
574
676
|
method: 'GET',
|
|
575
|
-
path: `/lb/v1/
|
|
677
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
576
678
|
}, unmarshalCertificate);
|
|
577
679
|
|
|
578
680
|
/**
|
|
579
681
|
* Waits for {@link Certificate} to be in a final state.
|
|
580
682
|
*
|
|
581
|
-
* @param request - The request {@link
|
|
683
|
+
* @param request - The request {@link ZonedApiGetCertificateRequest}
|
|
582
684
|
* @param options - The waiting options
|
|
583
685
|
* @returns A Promise of Certificate
|
|
584
686
|
*/
|
|
585
687
|
waitForCertificate = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
|
|
586
688
|
|
|
587
689
|
/**
|
|
588
|
-
* Update
|
|
690
|
+
* Update an SSL/TLS certificate. Update the name of a particular SSL/TLS
|
|
691
|
+
* certificate, specified by its certificate ID.
|
|
589
692
|
*
|
|
590
|
-
* @param request - The request {@link
|
|
693
|
+
* @param request - The request {@link ZonedApiUpdateCertificateRequest}
|
|
591
694
|
* @returns A Promise of Certificate
|
|
592
695
|
*/
|
|
593
696
|
updateCertificate = request => this.client.fetch({
|
|
594
|
-
body: JSON.stringify(
|
|
697
|
+
body: JSON.stringify(marshalZonedApiUpdateCertificateRequest(request, this.client.settings)),
|
|
595
698
|
headers: jsonContentHeaders,
|
|
596
699
|
method: 'PUT',
|
|
597
|
-
path: `/lb/v1/
|
|
700
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
598
701
|
}, unmarshalCertificate);
|
|
599
702
|
|
|
600
703
|
/**
|
|
601
|
-
* Delete
|
|
704
|
+
* Delete an SSL/TLS certificate. Delete an SSL/TLS certificate, specified by
|
|
705
|
+
* its certificate ID. Deleting a certificate is irreversible and cannot be
|
|
706
|
+
* undone.
|
|
602
707
|
*
|
|
603
|
-
* @param request - The request {@link
|
|
708
|
+
* @param request - The request {@link ZonedApiDeleteCertificateRequest}
|
|
604
709
|
*/
|
|
605
710
|
deleteCertificate = request => this.client.fetch({
|
|
606
711
|
method: 'DELETE',
|
|
607
|
-
path: `/lb/v1/
|
|
712
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
608
713
|
});
|
|
609
714
|
pageOfListLbTypes = (() => {
|
|
610
715
|
var _this8 = this;
|
|
@@ -614,16 +719,18 @@ class API extends API$1 {
|
|
|
614
719
|
}
|
|
615
720
|
return _this8.client.fetch({
|
|
616
721
|
method: 'GET',
|
|
617
|
-
path: `/lb/v1/
|
|
722
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this8.client.settings.defaultZone)}/lb-types`,
|
|
618
723
|
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize])
|
|
619
724
|
}, unmarshalListLbTypesResponse);
|
|
620
725
|
};
|
|
621
726
|
})();
|
|
622
727
|
|
|
623
728
|
/**
|
|
624
|
-
* List all
|
|
729
|
+
* List all Load Balancer offer types. List all the different commercial Load
|
|
730
|
+
* Balancer types. The response includes an array of offer types, each with a
|
|
731
|
+
* name, description, and information about its stock availability.
|
|
625
732
|
*
|
|
626
|
-
* @param request - The request {@link
|
|
733
|
+
* @param request - The request {@link ZonedApiListLbTypesRequest}
|
|
627
734
|
* @returns A Promise of ListLbTypesResponse
|
|
628
735
|
*/
|
|
629
736
|
listLbTypes = (() => {
|
|
@@ -637,196 +744,224 @@ class API extends API$1 {
|
|
|
637
744
|
})();
|
|
638
745
|
|
|
639
746
|
/**
|
|
640
|
-
* Create a subscriber,
|
|
747
|
+
* Create a subscriber. Create a new subscriber, either with an email
|
|
748
|
+
* configuration or a webhook configuration, for a specified Scaleway
|
|
749
|
+
* Project.
|
|
641
750
|
*
|
|
642
|
-
* @param request - The request {@link
|
|
751
|
+
* @param request - The request {@link ZonedApiCreateSubscriberRequest}
|
|
643
752
|
* @returns A Promise of Subscriber
|
|
644
753
|
*/
|
|
645
754
|
createSubscriber = request => this.client.fetch({
|
|
646
|
-
body: JSON.stringify(
|
|
755
|
+
body: JSON.stringify(marshalZonedApiCreateSubscriberRequest(request, this.client.settings)),
|
|
647
756
|
headers: jsonContentHeaders,
|
|
648
757
|
method: 'POST',
|
|
649
|
-
path: `/lb/v1/
|
|
758
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/subscribers`
|
|
650
759
|
}, unmarshalSubscriber);
|
|
651
760
|
|
|
652
761
|
/**
|
|
653
|
-
* Get a subscriber.
|
|
762
|
+
* Get a subscriber. Retrieve information about an existing subscriber,
|
|
763
|
+
* specified by its subscriber ID. Its full details, including name and
|
|
764
|
+
* email/webhook configuration, are returned in the response object.
|
|
654
765
|
*
|
|
655
|
-
* @param request - The request {@link
|
|
766
|
+
* @param request - The request {@link ZonedApiGetSubscriberRequest}
|
|
656
767
|
* @returns A Promise of Subscriber
|
|
657
768
|
*/
|
|
658
769
|
getSubscriber = request => this.client.fetch({
|
|
659
770
|
method: 'GET',
|
|
660
|
-
path: `/lb/v1/
|
|
771
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam('subscriberId', request.subscriberId)}`
|
|
661
772
|
}, unmarshalSubscriber);
|
|
662
|
-
pageOfListSubscriber =
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
773
|
+
pageOfListSubscriber = (() => {
|
|
774
|
+
var _this10 = this;
|
|
775
|
+
return function (request) {
|
|
776
|
+
if (request === void 0) {
|
|
777
|
+
request = {};
|
|
778
|
+
}
|
|
779
|
+
return _this10.client.fetch({
|
|
780
|
+
method: 'GET',
|
|
781
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? _this10.client.settings.defaultZone)}/subscribers`,
|
|
782
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this10.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
783
|
+
}, unmarshalListSubscriberResponse);
|
|
784
|
+
};
|
|
785
|
+
})();
|
|
667
786
|
|
|
668
787
|
/**
|
|
669
|
-
* List all
|
|
788
|
+
* List all subscribers. List all subscribers to Load Balancer alerts. By
|
|
789
|
+
* default, returns all subscribers to Load Balancer alerts for the
|
|
790
|
+
* Organization associated with the authentication token used for the
|
|
791
|
+
* request.
|
|
670
792
|
*
|
|
671
|
-
* @param request - The request {@link
|
|
793
|
+
* @param request - The request {@link ZonedApiListSubscriberRequest}
|
|
672
794
|
* @returns A Promise of ListSubscriberResponse
|
|
673
795
|
*/
|
|
674
|
-
listSubscriber =
|
|
796
|
+
listSubscriber = (() => {
|
|
797
|
+
var _this11 = this;
|
|
798
|
+
return function (request) {
|
|
799
|
+
if (request === void 0) {
|
|
800
|
+
request = {};
|
|
801
|
+
}
|
|
802
|
+
return enrichForPagination('subscribers', _this11.pageOfListSubscriber, request);
|
|
803
|
+
};
|
|
804
|
+
})();
|
|
675
805
|
|
|
676
806
|
/**
|
|
677
|
-
* Update a subscriber.
|
|
807
|
+
* Update a subscriber. Update the parameters of a given subscriber (e.g.
|
|
808
|
+
* name, webhook configuration, email configuration), specified by its
|
|
809
|
+
* subscriber ID.
|
|
678
810
|
*
|
|
679
|
-
* @param request - The request {@link
|
|
811
|
+
* @param request - The request {@link ZonedApiUpdateSubscriberRequest}
|
|
680
812
|
* @returns A Promise of Subscriber
|
|
681
813
|
*/
|
|
682
814
|
updateSubscriber = request => this.client.fetch({
|
|
683
|
-
body: JSON.stringify(
|
|
815
|
+
body: JSON.stringify(marshalZonedApiUpdateSubscriberRequest(request, this.client.settings)),
|
|
684
816
|
headers: jsonContentHeaders,
|
|
685
817
|
method: 'PUT',
|
|
686
|
-
path: `/lb/v1/
|
|
818
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam('subscriberId', request.subscriberId)}`
|
|
687
819
|
}, unmarshalSubscriber);
|
|
688
820
|
|
|
689
821
|
/**
|
|
690
|
-
* Delete a subscriber.
|
|
822
|
+
* Delete a subscriber. Delete an existing subscriber, specified by its
|
|
823
|
+
* subscriber ID. Deleting a subscriber is permanent, and cannot be undone.
|
|
691
824
|
*
|
|
692
|
-
* @param request - The request {@link
|
|
825
|
+
* @param request - The request {@link ZonedApiDeleteSubscriberRequest}
|
|
693
826
|
*/
|
|
694
827
|
deleteSubscriber = request => this.client.fetch({
|
|
695
828
|
method: 'DELETE',
|
|
696
|
-
path: `/lb/v1/
|
|
829
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lb/subscription/${validatePathParam('subscriberId', request.subscriberId)}`
|
|
697
830
|
});
|
|
698
831
|
|
|
699
832
|
/**
|
|
700
|
-
* Subscribe a subscriber to a given
|
|
833
|
+
* Subscribe a subscriber to alerts for a given Load Balancer. Subscribe an
|
|
834
|
+
* existing subscriber to alerts for a given Load Balancer.
|
|
701
835
|
*
|
|
702
|
-
* @param request - The request {@link
|
|
836
|
+
* @param request - The request {@link ZonedApiSubscribeToLbRequest}
|
|
703
837
|
* @returns A Promise of Lb
|
|
704
838
|
*/
|
|
705
839
|
subscribeToLb = request => this.client.fetch({
|
|
706
|
-
body: JSON.stringify(
|
|
840
|
+
body: JSON.stringify(marshalZonedApiSubscribeToLbRequest(request, this.client.settings)),
|
|
707
841
|
headers: jsonContentHeaders,
|
|
708
842
|
method: 'POST',
|
|
709
|
-
path: `/lb/v1/
|
|
843
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lb/${validatePathParam('lbId', request.lbId)}/subscribe`
|
|
710
844
|
}, unmarshalLb);
|
|
711
845
|
|
|
712
846
|
/**
|
|
713
|
-
* Unsubscribe a subscriber from a given
|
|
847
|
+
* Unsubscribe a subscriber from alerts for a given Load Balancer. Unsubscribe
|
|
848
|
+
* a subscriber from alerts for a given Load Balancer. The subscriber is not
|
|
849
|
+
* deleted, and can be resubscribed in the future if necessary.
|
|
714
850
|
*
|
|
715
|
-
* @param request - The request {@link
|
|
851
|
+
* @param request - The request {@link ZonedApiUnsubscribeFromLbRequest}
|
|
716
852
|
* @returns A Promise of Lb
|
|
717
853
|
*/
|
|
718
854
|
unsubscribeFromLb = request => this.client.fetch({
|
|
719
855
|
method: 'DELETE',
|
|
720
|
-
path: `/lb/v1/
|
|
856
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lb/${validatePathParam('lbId', request.lbId)}/unsubscribe`
|
|
721
857
|
}, unmarshalLb);
|
|
722
858
|
pageOfListLbPrivateNetworks = request => this.client.fetch({
|
|
723
859
|
method: 'GET',
|
|
724
|
-
path: `/lb/v1/
|
|
725
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
860
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks`,
|
|
861
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
726
862
|
}, unmarshalListLbPrivateNetworksResponse);
|
|
727
863
|
|
|
728
864
|
/**
|
|
729
|
-
* List attached
|
|
865
|
+
* List Private Networks attached to a Load Balancer. List the Private
|
|
866
|
+
* Networks attached to a given Load Balancer, specified by its Load Balancer
|
|
867
|
+
* ID. The response is an array of Private Network objects, giving information
|
|
868
|
+
* including the status, configuration, name and creation date of each Private
|
|
869
|
+
* Network.
|
|
730
870
|
*
|
|
731
|
-
* @param request - The request {@link
|
|
871
|
+
* @param request - The request {@link ZonedApiListLbPrivateNetworksRequest}
|
|
732
872
|
* @returns A Promise of ListLbPrivateNetworksResponse
|
|
733
873
|
*/
|
|
734
874
|
listLbPrivateNetworks = request => enrichForPagination('privateNetwork', this.pageOfListLbPrivateNetworks, request);
|
|
735
875
|
|
|
736
876
|
/**
|
|
737
|
-
*
|
|
877
|
+
* Attach a Load Balancer to a Private Network. Attach a specified Load
|
|
878
|
+
* Balancer to a specified Private Network, defining a static or DHCP
|
|
879
|
+
* configuration for the Load Balancer on the network.
|
|
738
880
|
*
|
|
739
|
-
* @param request - The request {@link
|
|
881
|
+
* @param request - The request {@link ZonedApiAttachPrivateNetworkRequest}
|
|
740
882
|
* @returns A Promise of PrivateNetwork
|
|
741
883
|
*/
|
|
742
884
|
attachPrivateNetwork = request => this.client.fetch({
|
|
743
|
-
body: JSON.stringify(
|
|
885
|
+
body: JSON.stringify(marshalZonedApiAttachPrivateNetworkRequest(request, this.client.settings)),
|
|
744
886
|
headers: jsonContentHeaders,
|
|
745
887
|
method: 'POST',
|
|
746
|
-
path: `/lb/v1/
|
|
888
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/attach`
|
|
747
889
|
}, unmarshalPrivateNetwork);
|
|
748
890
|
|
|
749
891
|
/**
|
|
750
|
-
*
|
|
892
|
+
* Detach Load Balancer from Private Network. Detach a specified Load Balancer
|
|
893
|
+
* from a specified Private Network.
|
|
751
894
|
*
|
|
752
|
-
* @param request - The request {@link
|
|
895
|
+
* @param request - The request {@link ZonedApiDetachPrivateNetworkRequest}
|
|
753
896
|
*/
|
|
754
897
|
detachPrivateNetwork = request => this.client.fetch({
|
|
755
898
|
body: '{}',
|
|
756
899
|
headers: jsonContentHeaders,
|
|
757
900
|
method: 'POST',
|
|
758
|
-
path: `/lb/v1/
|
|
901
|
+
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/detach`
|
|
759
902
|
});
|
|
760
903
|
}
|
|
761
904
|
|
|
762
905
|
/**
|
|
763
|
-
* Load
|
|
906
|
+
* Load balancer API.
|
|
764
907
|
*
|
|
765
|
-
* This API allows you to manage your
|
|
766
|
-
* Balancer API.
|
|
908
|
+
* This API allows you to manage your load balancer service.
|
|
767
909
|
*/
|
|
768
|
-
class
|
|
769
|
-
/** Lists the available
|
|
770
|
-
static LOCALITIES = ['fr-par
|
|
910
|
+
class API extends API$1 {
|
|
911
|
+
/** Lists the available regions of the API. */
|
|
912
|
+
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
771
913
|
pageOfListLbs = (() => {
|
|
772
|
-
var
|
|
914
|
+
var _this12 = this;
|
|
773
915
|
return function (request) {
|
|
774
916
|
if (request === void 0) {
|
|
775
917
|
request = {};
|
|
776
918
|
}
|
|
777
|
-
return
|
|
919
|
+
return _this12.client.fetch({
|
|
778
920
|
method: 'GET',
|
|
779
|
-
path: `/lb/v1/
|
|
780
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
921
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this12.client.settings.defaultRegion)}/lbs`,
|
|
922
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this12.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
781
923
|
}, unmarshalListLbsResponse);
|
|
782
924
|
};
|
|
783
925
|
})();
|
|
784
926
|
|
|
785
927
|
/**
|
|
786
|
-
* List
|
|
787
|
-
* Scaleway Organization or Scaleway Project. By default, the Load Balancers
|
|
788
|
-
* returned in the list are ordered by creation date in ascending order,
|
|
789
|
-
* though this can be modified via the `order_by` field.
|
|
928
|
+
* List load balancers.
|
|
790
929
|
*
|
|
791
|
-
* @param request - The request {@link
|
|
930
|
+
* @param request - The request {@link ListLbsRequest}
|
|
792
931
|
* @returns A Promise of ListLbsResponse
|
|
793
932
|
*/
|
|
794
933
|
listLbs = (() => {
|
|
795
|
-
var
|
|
934
|
+
var _this13 = this;
|
|
796
935
|
return function (request) {
|
|
797
936
|
if (request === void 0) {
|
|
798
937
|
request = {};
|
|
799
938
|
}
|
|
800
|
-
return enrichForPagination('lbs',
|
|
939
|
+
return enrichForPagination('lbs', _this13.pageOfListLbs, request);
|
|
801
940
|
};
|
|
802
941
|
})();
|
|
803
942
|
|
|
804
943
|
/**
|
|
805
|
-
* Create a
|
|
806
|
-
* Balancer will be created without frontends or backends; these must be
|
|
807
|
-
* created separately via the dedicated endpoints.
|
|
944
|
+
* Create a load balancer.
|
|
808
945
|
*
|
|
809
|
-
* @param request - The request {@link
|
|
946
|
+
* @param request - The request {@link CreateLbRequest}
|
|
810
947
|
* @returns A Promise of Lb
|
|
811
948
|
*/
|
|
812
949
|
createLb = request => this.client.fetch({
|
|
813
|
-
body: JSON.stringify(
|
|
950
|
+
body: JSON.stringify(marshalCreateLbRequest(request, this.client.settings)),
|
|
814
951
|
headers: jsonContentHeaders,
|
|
815
952
|
method: 'POST',
|
|
816
|
-
path: `/lb/v1/
|
|
953
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs`
|
|
817
954
|
}, unmarshalLb);
|
|
818
955
|
|
|
819
956
|
/**
|
|
820
|
-
* Get a
|
|
821
|
-
* specified by its Load Balancer ID. Its full details, including name, status
|
|
822
|
-
* and IP address, are returned in the response object.
|
|
957
|
+
* Get a load balancer.
|
|
823
958
|
*
|
|
824
|
-
* @param request - The request {@link
|
|
959
|
+
* @param request - The request {@link GetLbRequest}
|
|
825
960
|
* @returns A Promise of Lb
|
|
826
961
|
*/
|
|
827
962
|
getLb = request => this.client.fetch({
|
|
828
963
|
method: 'GET',
|
|
829
|
-
path: `/lb/v1/
|
|
964
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}`
|
|
830
965
|
}, unmarshalLb);
|
|
831
966
|
|
|
832
967
|
/**
|
|
@@ -839,591 +974,496 @@ class ZonedAPI extends API$1 {
|
|
|
839
974
|
waitForLb = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
|
|
840
975
|
|
|
841
976
|
/**
|
|
842
|
-
* Update a
|
|
843
|
-
* specified by its Load Balancer ID. Note that the request type is PUT and
|
|
844
|
-
* not PATCH. You must set all parameters.
|
|
977
|
+
* Update a load balancer.
|
|
845
978
|
*
|
|
846
|
-
* @param request - The request {@link
|
|
979
|
+
* @param request - The request {@link UpdateLbRequest}
|
|
847
980
|
* @returns A Promise of Lb
|
|
848
981
|
*/
|
|
849
982
|
updateLb = request => this.client.fetch({
|
|
850
|
-
body: JSON.stringify(
|
|
983
|
+
body: JSON.stringify(marshalUpdateLbRequest(request, this.client.settings)),
|
|
851
984
|
headers: jsonContentHeaders,
|
|
852
985
|
method: 'PUT',
|
|
853
|
-
path: `/lb/v1/
|
|
986
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}`
|
|
854
987
|
}, unmarshalLb);
|
|
855
988
|
|
|
856
989
|
/**
|
|
857
|
-
* Delete a
|
|
858
|
-
* Load Balancer ID. Deleting a Load Balancer is permanent, and cannot be
|
|
859
|
-
* undone. The Load Balancer's flexible IP address can either be deleted with
|
|
860
|
-
* the Load Balancer, or kept in your account for future use.
|
|
990
|
+
* Delete a load balancer.
|
|
861
991
|
*
|
|
862
|
-
* @param request - The request {@link
|
|
992
|
+
* @param request - The request {@link DeleteLbRequest}
|
|
863
993
|
*/
|
|
864
994
|
deleteLb = request => this.client.fetch({
|
|
865
995
|
method: 'DELETE',
|
|
866
|
-
path: `/lb/v1/
|
|
996
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}`,
|
|
867
997
|
urlParams: urlParams(['release_ip', request.releaseIp])
|
|
868
998
|
});
|
|
869
999
|
|
|
870
1000
|
/**
|
|
871
|
-
* Migrate a
|
|
872
|
-
* commercial type to another. Allows you to scale your Load Balancer up or
|
|
873
|
-
* down in terms of bandwidth or multi-cloud provision.
|
|
1001
|
+
* Migrate a load balancer.
|
|
874
1002
|
*
|
|
875
|
-
* @param request - The request {@link
|
|
1003
|
+
* @param request - The request {@link MigrateLbRequest}
|
|
876
1004
|
* @returns A Promise of Lb
|
|
877
1005
|
*/
|
|
878
1006
|
migrateLb = request => this.client.fetch({
|
|
879
|
-
body: JSON.stringify(
|
|
1007
|
+
body: JSON.stringify(marshalMigrateLbRequest(request, this.client.settings)),
|
|
880
1008
|
headers: jsonContentHeaders,
|
|
881
1009
|
method: 'POST',
|
|
882
|
-
path: `/lb/v1/
|
|
1010
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/migrate`
|
|
883
1011
|
}, unmarshalLb);
|
|
884
1012
|
pageOfListIPs = (() => {
|
|
885
|
-
var
|
|
1013
|
+
var _this14 = this;
|
|
886
1014
|
return function (request) {
|
|
887
1015
|
if (request === void 0) {
|
|
888
1016
|
request = {};
|
|
889
1017
|
}
|
|
890
|
-
return
|
|
1018
|
+
return _this14.client.fetch({
|
|
891
1019
|
method: 'GET',
|
|
892
|
-
path: `/lb/v1/
|
|
893
|
-
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ??
|
|
1020
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this14.client.settings.defaultRegion)}/ips`,
|
|
1021
|
+
urlParams: urlParams(['ip_address', request.ipAddress], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this14.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
894
1022
|
}, unmarshalListIpsResponse);
|
|
895
1023
|
};
|
|
896
1024
|
})();
|
|
897
1025
|
|
|
898
1026
|
/**
|
|
899
|
-
* List
|
|
900
|
-
* account (filtered by Organization ID or Project ID). It is also possible to
|
|
901
|
-
* search for a specific IP address.
|
|
1027
|
+
* List IPs.
|
|
902
1028
|
*
|
|
903
|
-
* @param request - The request {@link
|
|
1029
|
+
* @param request - The request {@link ListIPsRequest}
|
|
904
1030
|
* @returns A Promise of ListIpsResponse
|
|
905
1031
|
*/
|
|
906
1032
|
listIPs = (() => {
|
|
907
|
-
var
|
|
1033
|
+
var _this15 = this;
|
|
908
1034
|
return function (request) {
|
|
909
1035
|
if (request === void 0) {
|
|
910
1036
|
request = {};
|
|
911
1037
|
}
|
|
912
|
-
return enrichForPagination('ips',
|
|
1038
|
+
return enrichForPagination('ips', _this15.pageOfListIPs, request);
|
|
913
1039
|
};
|
|
914
1040
|
})();
|
|
915
1041
|
|
|
916
1042
|
/**
|
|
917
|
-
* Create an IP
|
|
918
|
-
* the specified Scaleway Project. This can be attached to new Load Balancers
|
|
919
|
-
* created in the future.
|
|
1043
|
+
* Create an IP.
|
|
920
1044
|
*
|
|
921
|
-
* @param request - The request {@link
|
|
1045
|
+
* @param request - The request {@link CreateIpRequest}
|
|
922
1046
|
* @returns A Promise of Ip
|
|
923
1047
|
*/
|
|
924
1048
|
createIp = (() => {
|
|
925
|
-
var
|
|
1049
|
+
var _this16 = this;
|
|
926
1050
|
return function (request) {
|
|
927
1051
|
if (request === void 0) {
|
|
928
1052
|
request = {};
|
|
929
1053
|
}
|
|
930
|
-
return
|
|
931
|
-
body: JSON.stringify(
|
|
1054
|
+
return _this16.client.fetch({
|
|
1055
|
+
body: JSON.stringify(marshalCreateIpRequest(request, _this16.client.settings)),
|
|
932
1056
|
headers: jsonContentHeaders,
|
|
933
1057
|
method: 'POST',
|
|
934
|
-
path: `/lb/v1/
|
|
1058
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this16.client.settings.defaultRegion)}/ips`
|
|
935
1059
|
}, unmarshalIp);
|
|
936
1060
|
};
|
|
937
1061
|
})();
|
|
938
1062
|
|
|
939
1063
|
/**
|
|
940
|
-
* Get an IP
|
|
941
|
-
* address.
|
|
1064
|
+
* Get an IP.
|
|
942
1065
|
*
|
|
943
|
-
* @param request - The request {@link
|
|
1066
|
+
* @param request - The request {@link GetIpRequest}
|
|
944
1067
|
* @returns A Promise of Ip
|
|
945
1068
|
*/
|
|
946
1069
|
getIp = request => this.client.fetch({
|
|
947
1070
|
method: 'GET',
|
|
948
|
-
path: `/lb/v1/
|
|
1071
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
949
1072
|
}, unmarshalIp);
|
|
950
1073
|
|
|
951
1074
|
/**
|
|
952
|
-
* Delete an IP
|
|
953
|
-
* action is irreversible, and cannot be undone.
|
|
1075
|
+
* Delete an IP.
|
|
954
1076
|
*
|
|
955
|
-
* @param request - The request {@link
|
|
1077
|
+
* @param request - The request {@link ReleaseIpRequest}
|
|
956
1078
|
*/
|
|
957
1079
|
releaseIp = request => this.client.fetch({
|
|
958
1080
|
method: 'DELETE',
|
|
959
|
-
path: `/lb/v1/
|
|
1081
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
960
1082
|
});
|
|
961
1083
|
|
|
962
1084
|
/**
|
|
963
|
-
* Update an IP
|
|
964
|
-
* address.
|
|
1085
|
+
* Update an IP.
|
|
965
1086
|
*
|
|
966
|
-
* @param request - The request {@link
|
|
1087
|
+
* @param request - The request {@link UpdateIpRequest}
|
|
967
1088
|
* @returns A Promise of Ip
|
|
968
1089
|
*/
|
|
969
1090
|
updateIp = request => this.client.fetch({
|
|
970
|
-
body: JSON.stringify(
|
|
1091
|
+
body: JSON.stringify(marshalUpdateIpRequest(request, this.client.settings)),
|
|
971
1092
|
headers: jsonContentHeaders,
|
|
972
1093
|
method: 'PATCH',
|
|
973
|
-
path: `/lb/v1/
|
|
1094
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam('ipId', request.ipId)}`
|
|
974
1095
|
}, unmarshalIp);
|
|
975
1096
|
pageOfListBackends = request => this.client.fetch({
|
|
976
1097
|
method: 'GET',
|
|
977
|
-
path: `/lb/v1/
|
|
978
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
1098
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/backends`,
|
|
1099
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
979
1100
|
}, unmarshalListBackendsResponse);
|
|
980
1101
|
|
|
981
1102
|
/**
|
|
982
|
-
* List
|
|
983
|
-
* Balancer, specified by its Load Balancer ID. By default, results are
|
|
984
|
-
* returned in ascending order by the creation date of each backend. The
|
|
985
|
-
* response is an array of backend objects, containing full details of each
|
|
986
|
-
* one including their configuration parameters such as protocol, port and
|
|
987
|
-
* forwarding algorithm.
|
|
1103
|
+
* List backends in a given load balancer.
|
|
988
1104
|
*
|
|
989
|
-
* @param request - The request {@link
|
|
1105
|
+
* @param request - The request {@link ListBackendsRequest}
|
|
990
1106
|
* @returns A Promise of ListBackendsResponse
|
|
991
1107
|
*/
|
|
992
1108
|
listBackends = request => enrichForPagination('backends', this.pageOfListBackends, request);
|
|
993
1109
|
|
|
994
1110
|
/**
|
|
995
|
-
* Create a backend
|
|
996
|
-
* given Load Balancer, specifying its full configuration including protocol,
|
|
997
|
-
* port and forwarding algorithm.
|
|
1111
|
+
* Create a backend in a given load balancer.
|
|
998
1112
|
*
|
|
999
|
-
* @param request - The request {@link
|
|
1113
|
+
* @param request - The request {@link CreateBackendRequest}
|
|
1000
1114
|
* @returns A Promise of Backend
|
|
1001
1115
|
*/
|
|
1002
1116
|
createBackend = request => this.client.fetch({
|
|
1003
|
-
body: JSON.stringify(
|
|
1117
|
+
body: JSON.stringify(marshalCreateBackendRequest(request, this.client.settings)),
|
|
1004
1118
|
headers: jsonContentHeaders,
|
|
1005
1119
|
method: 'POST',
|
|
1006
|
-
path: `/lb/v1/
|
|
1120
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/backends`
|
|
1007
1121
|
}, unmarshalBackend);
|
|
1008
1122
|
|
|
1009
1123
|
/**
|
|
1010
|
-
* Get a backend
|
|
1011
|
-
* backend, specified by its backend ID. The response contains the backend's
|
|
1012
|
-
* full configuration parameters including protocol, port and forwarding
|
|
1013
|
-
* algorithm.
|
|
1124
|
+
* Get a backend in a given load balancer.
|
|
1014
1125
|
*
|
|
1015
|
-
* @param request - The request {@link
|
|
1126
|
+
* @param request - The request {@link GetBackendRequest}
|
|
1016
1127
|
* @returns A Promise of Backend
|
|
1017
1128
|
*/
|
|
1018
1129
|
getBackend = request => this.client.fetch({
|
|
1019
1130
|
method: 'GET',
|
|
1020
|
-
path: `/lb/v1/
|
|
1131
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam('backendId', request.backendId)}`
|
|
1021
1132
|
}, unmarshalBackend);
|
|
1022
1133
|
|
|
1023
1134
|
/**
|
|
1024
|
-
* Update a backend
|
|
1025
|
-
* Balancer, specified by its backend ID. Note that the request type is PUT
|
|
1026
|
-
* and not PATCH. You must set all parameters.
|
|
1135
|
+
* Update a backend in a given load balancer.
|
|
1027
1136
|
*
|
|
1028
|
-
* @param request - The request {@link
|
|
1137
|
+
* @param request - The request {@link UpdateBackendRequest}
|
|
1029
1138
|
* @returns A Promise of Backend
|
|
1030
1139
|
*/
|
|
1031
1140
|
updateBackend = request => this.client.fetch({
|
|
1032
|
-
body: JSON.stringify(
|
|
1141
|
+
body: JSON.stringify(marshalUpdateBackendRequest(request, this.client.settings)),
|
|
1033
1142
|
headers: jsonContentHeaders,
|
|
1034
1143
|
method: 'PUT',
|
|
1035
|
-
path: `/lb/v1/
|
|
1144
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam('backendId', request.backendId)}`
|
|
1036
1145
|
}, unmarshalBackend);
|
|
1037
1146
|
|
|
1038
1147
|
/**
|
|
1039
|
-
* Delete a backend
|
|
1040
|
-
* Balancer, specified by its backend ID. This action is irreversible and
|
|
1041
|
-
* cannot be undone.
|
|
1148
|
+
* Delete a backend in a given load balancer.
|
|
1042
1149
|
*
|
|
1043
|
-
* @param request - The request {@link
|
|
1150
|
+
* @param request - The request {@link DeleteBackendRequest}
|
|
1044
1151
|
*/
|
|
1045
1152
|
deleteBackend = request => this.client.fetch({
|
|
1046
1153
|
method: 'DELETE',
|
|
1047
|
-
path: `/lb/v1/
|
|
1154
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam('backendId', request.backendId)}`
|
|
1048
1155
|
});
|
|
1049
1156
|
|
|
1050
1157
|
/**
|
|
1051
|
-
* Add a set of
|
|
1052
|
-
* specified by its backend ID, add a set of backend servers (identified by
|
|
1053
|
-
* their IP addresses) it should forward traffic to. These will be appended to
|
|
1054
|
-
* any existing set of backend servers for this backend.
|
|
1158
|
+
* Add a set of servers in a given backend.
|
|
1055
1159
|
*
|
|
1056
|
-
* @param request - The request {@link
|
|
1160
|
+
* @param request - The request {@link AddBackendServersRequest}
|
|
1057
1161
|
* @returns A Promise of Backend
|
|
1058
1162
|
*/
|
|
1059
1163
|
addBackendServers = request => this.client.fetch({
|
|
1060
|
-
body: JSON.stringify(
|
|
1164
|
+
body: JSON.stringify(marshalAddBackendServersRequest(request, this.client.settings)),
|
|
1061
1165
|
headers: jsonContentHeaders,
|
|
1062
1166
|
method: 'POST',
|
|
1063
|
-
path: `/lb/v1/
|
|
1167
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam('backendId', request.backendId)}/servers`
|
|
1064
1168
|
}, unmarshalBackend);
|
|
1065
1169
|
|
|
1066
1170
|
/**
|
|
1067
|
-
* Remove a set of servers for a given backend.
|
|
1068
|
-
* by its backend ID, remove the specified backend servers (identified by
|
|
1069
|
-
* their IP addresses) so that it no longer forwards traffic to them.
|
|
1171
|
+
* Remove a set of servers for a given backend.
|
|
1070
1172
|
*
|
|
1071
|
-
* @param request - The request {@link
|
|
1173
|
+
* @param request - The request {@link RemoveBackendServersRequest}
|
|
1072
1174
|
* @returns A Promise of Backend
|
|
1073
1175
|
*/
|
|
1074
1176
|
removeBackendServers = request => this.client.fetch({
|
|
1075
|
-
body: JSON.stringify(
|
|
1177
|
+
body: JSON.stringify(marshalRemoveBackendServersRequest(request, this.client.settings)),
|
|
1076
1178
|
headers: jsonContentHeaders,
|
|
1077
1179
|
method: 'DELETE',
|
|
1078
|
-
path: `/lb/v1/
|
|
1180
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam('backendId', request.backendId)}/servers`
|
|
1079
1181
|
}, unmarshalBackend);
|
|
1080
1182
|
|
|
1081
1183
|
/**
|
|
1082
|
-
* Define all
|
|
1083
|
-
* specified by its backend ID, define the set of backend servers (identified
|
|
1084
|
-
* by their IP addresses) that it should forward traffic to. Any existing
|
|
1085
|
-
* backend servers configured for this backend will be removed.
|
|
1184
|
+
* Define all servers in a given backend.
|
|
1086
1185
|
*
|
|
1087
|
-
* @param request - The request {@link
|
|
1186
|
+
* @param request - The request {@link SetBackendServersRequest}
|
|
1088
1187
|
* @returns A Promise of Backend
|
|
1089
1188
|
*/
|
|
1090
1189
|
setBackendServers = request => this.client.fetch({
|
|
1091
|
-
body: JSON.stringify(
|
|
1190
|
+
body: JSON.stringify(marshalSetBackendServersRequest(request, this.client.settings)),
|
|
1092
1191
|
headers: jsonContentHeaders,
|
|
1093
1192
|
method: 'PUT',
|
|
1094
|
-
path: `/lb/v1/
|
|
1193
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam('backendId', request.backendId)}/servers`
|
|
1095
1194
|
}, unmarshalBackend);
|
|
1096
1195
|
|
|
1097
1196
|
/**
|
|
1098
|
-
* Update
|
|
1099
|
-
* health check performed by a given backend to verify the health of its
|
|
1100
|
-
* backend servers, identified by its backend ID. Note that the request type
|
|
1101
|
-
* is PUT and not PATCH. You must set all parameters.
|
|
1197
|
+
* Update an health check for a given backend.
|
|
1102
1198
|
*
|
|
1103
|
-
* @param request - The request {@link
|
|
1199
|
+
* @param request - The request {@link UpdateHealthCheckRequest}
|
|
1104
1200
|
* @returns A Promise of HealthCheck
|
|
1105
1201
|
*/
|
|
1106
1202
|
updateHealthCheck = request => this.client.fetch({
|
|
1107
|
-
body: JSON.stringify(
|
|
1203
|
+
body: JSON.stringify(marshalUpdateHealthCheckRequest(request, this.client.settings)),
|
|
1108
1204
|
headers: jsonContentHeaders,
|
|
1109
1205
|
method: 'PUT',
|
|
1110
|
-
path: `/lb/v1/
|
|
1206
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam('backendId', request.backendId)}/healthcheck`
|
|
1111
1207
|
}, unmarshalHealthCheck);
|
|
1112
1208
|
pageOfListFrontends = request => this.client.fetch({
|
|
1113
1209
|
method: 'GET',
|
|
1114
|
-
path: `/lb/v1/
|
|
1115
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
1210
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/frontends`,
|
|
1211
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1116
1212
|
}, unmarshalListFrontendsResponse);
|
|
1117
1213
|
|
|
1118
1214
|
/**
|
|
1119
|
-
* List frontends
|
|
1120
|
-
* Balancer, specified by its Load Balancer ID. By default, results are
|
|
1121
|
-
* returned in ascending order by the creation date of each frontend. The
|
|
1122
|
-
* response is an array of frontend objects, containing full details of each
|
|
1123
|
-
* one including the port they listen on and the backend they are attached
|
|
1124
|
-
* to.
|
|
1215
|
+
* List frontends in a given load balancer.
|
|
1125
1216
|
*
|
|
1126
|
-
* @param request - The request {@link
|
|
1217
|
+
* @param request - The request {@link ListFrontendsRequest}
|
|
1127
1218
|
* @returns A Promise of ListFrontendsResponse
|
|
1128
1219
|
*/
|
|
1129
1220
|
listFrontends = request => enrichForPagination('frontends', this.pageOfListFrontends, request);
|
|
1130
1221
|
|
|
1131
1222
|
/**
|
|
1132
|
-
* Create a frontend in a given
|
|
1133
|
-
* given Load Balancer, specifying its configuration including the port it
|
|
1134
|
-
* should listen on and the backend to attach it to.
|
|
1223
|
+
* Create a frontend in a given load balancer.
|
|
1135
1224
|
*
|
|
1136
|
-
* @param request - The request {@link
|
|
1225
|
+
* @param request - The request {@link CreateFrontendRequest}
|
|
1137
1226
|
* @returns A Promise of Frontend
|
|
1138
1227
|
*/
|
|
1139
1228
|
createFrontend = request => this.client.fetch({
|
|
1140
|
-
body: JSON.stringify(
|
|
1229
|
+
body: JSON.stringify(marshalCreateFrontendRequest(request, this.client.settings)),
|
|
1141
1230
|
headers: jsonContentHeaders,
|
|
1142
1231
|
method: 'POST',
|
|
1143
|
-
path: `/lb/v1/
|
|
1232
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/frontends`
|
|
1144
1233
|
}, unmarshalFrontend);
|
|
1145
1234
|
|
|
1146
1235
|
/**
|
|
1147
|
-
* Get a frontend.
|
|
1148
|
-
* frontend ID. The response contains the frontend's full configuration
|
|
1149
|
-
* parameters including the backend it is attached to, the port it listens on,
|
|
1150
|
-
* and any certificates it has.
|
|
1236
|
+
* Get a frontend.
|
|
1151
1237
|
*
|
|
1152
|
-
* @param request - The request {@link
|
|
1238
|
+
* @param request - The request {@link GetFrontendRequest}
|
|
1153
1239
|
* @returns A Promise of Frontend
|
|
1154
1240
|
*/
|
|
1155
1241
|
getFrontend = request => this.client.fetch({
|
|
1156
1242
|
method: 'GET',
|
|
1157
|
-
path: `/lb/v1/
|
|
1243
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
1158
1244
|
}, unmarshalFrontend);
|
|
1159
1245
|
|
|
1160
1246
|
/**
|
|
1161
|
-
* Update a frontend.
|
|
1162
|
-
* You can update configuration parameters including its name and the port it
|
|
1163
|
-
* listens on. Note that the request type is PUT and not PATCH. You must set
|
|
1164
|
-
* all parameters.
|
|
1247
|
+
* Update a frontend.
|
|
1165
1248
|
*
|
|
1166
|
-
* @param request - The request {@link
|
|
1249
|
+
* @param request - The request {@link UpdateFrontendRequest}
|
|
1167
1250
|
* @returns A Promise of Frontend
|
|
1168
1251
|
*/
|
|
1169
1252
|
updateFrontend = request => this.client.fetch({
|
|
1170
|
-
body: JSON.stringify(
|
|
1253
|
+
body: JSON.stringify(marshalUpdateFrontendRequest(request, this.client.settings)),
|
|
1171
1254
|
headers: jsonContentHeaders,
|
|
1172
1255
|
method: 'PUT',
|
|
1173
|
-
path: `/lb/v1/
|
|
1256
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
1174
1257
|
}, unmarshalFrontend);
|
|
1175
1258
|
|
|
1176
1259
|
/**
|
|
1177
|
-
* Delete a frontend.
|
|
1178
|
-
* This action is irreversible and cannot be undone.
|
|
1260
|
+
* Delete a frontend.
|
|
1179
1261
|
*
|
|
1180
|
-
* @param request - The request {@link
|
|
1262
|
+
* @param request - The request {@link DeleteFrontendRequest}
|
|
1181
1263
|
*/
|
|
1182
1264
|
deleteFrontend = request => this.client.fetch({
|
|
1183
1265
|
method: 'DELETE',
|
|
1184
|
-
path: `/lb/v1/
|
|
1266
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam('frontendId', request.frontendId)}`
|
|
1185
1267
|
});
|
|
1186
1268
|
pageOfListRoutes = (() => {
|
|
1187
|
-
var
|
|
1269
|
+
var _this17 = this;
|
|
1188
1270
|
return function (request) {
|
|
1189
1271
|
if (request === void 0) {
|
|
1190
1272
|
request = {};
|
|
1191
1273
|
}
|
|
1192
|
-
return
|
|
1274
|
+
return _this17.client.fetch({
|
|
1193
1275
|
method: 'GET',
|
|
1194
|
-
path: `/lb/v1/
|
|
1195
|
-
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy
|
|
1276
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this17.client.settings.defaultRegion)}/routes`,
|
|
1277
|
+
urlParams: urlParams(['frontend_id', request.frontendId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize])
|
|
1196
1278
|
}, unmarshalListRoutesResponse);
|
|
1197
1279
|
};
|
|
1198
1280
|
})();
|
|
1199
1281
|
|
|
1200
1282
|
/**
|
|
1201
|
-
* List all
|
|
1202
|
-
* array of routes, each one with a specified backend to direct to if a
|
|
1203
|
-
* certain condition is matched (based on the value of the SNI field or HTTP
|
|
1204
|
-
* Host header).
|
|
1283
|
+
* List all backend redirections.
|
|
1205
1284
|
*
|
|
1206
|
-
* @param request - The request {@link
|
|
1285
|
+
* @param request - The request {@link ListRoutesRequest}
|
|
1207
1286
|
* @returns A Promise of ListRoutesResponse
|
|
1208
1287
|
*/
|
|
1209
1288
|
listRoutes = (() => {
|
|
1210
|
-
var
|
|
1289
|
+
var _this18 = this;
|
|
1211
1290
|
return function (request) {
|
|
1212
1291
|
if (request === void 0) {
|
|
1213
1292
|
request = {};
|
|
1214
1293
|
}
|
|
1215
|
-
return enrichForPagination('routes',
|
|
1294
|
+
return enrichForPagination('routes', _this18.pageOfListRoutes, request);
|
|
1216
1295
|
};
|
|
1217
1296
|
})();
|
|
1218
1297
|
|
|
1219
1298
|
/**
|
|
1220
|
-
* Create a
|
|
1221
|
-
* route, specify the backend to direct to if a certain condition is matched
|
|
1222
|
-
* (based on the value of the SNI field or HTTP Host header).
|
|
1299
|
+
* Create a backend redirection.
|
|
1223
1300
|
*
|
|
1224
|
-
* @param request - The request {@link
|
|
1301
|
+
* @param request - The request {@link CreateRouteRequest}
|
|
1225
1302
|
* @returns A Promise of Route
|
|
1226
1303
|
*/
|
|
1227
1304
|
createRoute = request => this.client.fetch({
|
|
1228
|
-
body: JSON.stringify(
|
|
1305
|
+
body: JSON.stringify(marshalCreateRouteRequest(request, this.client.settings)),
|
|
1229
1306
|
headers: jsonContentHeaders,
|
|
1230
1307
|
method: 'POST',
|
|
1231
|
-
path: `/lb/v1/
|
|
1308
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes`
|
|
1232
1309
|
}, unmarshalRoute);
|
|
1233
1310
|
|
|
1234
1311
|
/**
|
|
1235
|
-
* Get
|
|
1236
|
-
* route ID. Its full details, origin frontend, target backend and match
|
|
1237
|
-
* condition, are returned in the response object.
|
|
1312
|
+
* Get single backend redirection.
|
|
1238
1313
|
*
|
|
1239
|
-
* @param request - The request {@link
|
|
1314
|
+
* @param request - The request {@link GetRouteRequest}
|
|
1240
1315
|
* @returns A Promise of Route
|
|
1241
1316
|
*/
|
|
1242
1317
|
getRoute = request => this.client.fetch({
|
|
1243
1318
|
method: 'GET',
|
|
1244
|
-
path: `/lb/v1/
|
|
1319
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
1245
1320
|
}, unmarshalRoute);
|
|
1246
1321
|
|
|
1247
1322
|
/**
|
|
1248
|
-
*
|
|
1249
|
-
* its route ID.
|
|
1323
|
+
* Edit a backend redirection.
|
|
1250
1324
|
*
|
|
1251
|
-
* @param request - The request {@link
|
|
1325
|
+
* @param request - The request {@link UpdateRouteRequest}
|
|
1252
1326
|
* @returns A Promise of Route
|
|
1253
1327
|
*/
|
|
1254
1328
|
updateRoute = request => this.client.fetch({
|
|
1255
|
-
body: JSON.stringify(
|
|
1329
|
+
body: JSON.stringify(marshalUpdateRouteRequest(request, this.client.settings)),
|
|
1256
1330
|
headers: jsonContentHeaders,
|
|
1257
1331
|
method: 'PUT',
|
|
1258
|
-
path: `/lb/v1/
|
|
1332
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
1259
1333
|
}, unmarshalRoute);
|
|
1260
1334
|
|
|
1261
1335
|
/**
|
|
1262
|
-
* Delete a
|
|
1263
|
-
* Deleting a route is permanent, and cannot be undone.
|
|
1336
|
+
* Delete a backend redirection.
|
|
1264
1337
|
*
|
|
1265
|
-
* @param request - The request {@link
|
|
1338
|
+
* @param request - The request {@link DeleteRouteRequest}
|
|
1266
1339
|
*/
|
|
1267
1340
|
deleteRoute = request => this.client.fetch({
|
|
1268
1341
|
method: 'DELETE',
|
|
1269
|
-
path: `/lb/v1/
|
|
1342
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
1270
1343
|
});
|
|
1271
1344
|
|
|
1272
1345
|
/**
|
|
1273
|
-
* Get usage statistics of a given
|
|
1346
|
+
* Get usage statistics of a given load balancer.
|
|
1274
1347
|
*
|
|
1275
1348
|
* @deprecated
|
|
1276
|
-
* @param request - The request {@link
|
|
1349
|
+
* @param request - The request {@link GetLbStatsRequest}
|
|
1277
1350
|
* @returns A Promise of LbStats
|
|
1278
1351
|
*/
|
|
1279
1352
|
getLbStats = request => this.client.fetch({
|
|
1280
1353
|
method: 'GET',
|
|
1281
|
-
path: `/lb/v1/
|
|
1354
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/stats`,
|
|
1282
1355
|
urlParams: urlParams(['backend_id', request.backendId])
|
|
1283
1356
|
}, unmarshalLbStats);
|
|
1284
1357
|
pageOfListBackendStats = request => this.client.fetch({
|
|
1285
1358
|
method: 'GET',
|
|
1286
|
-
path: `/lb/v1/
|
|
1359
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/backend-stats`,
|
|
1287
1360
|
urlParams: urlParams(['backend_id', request.backendId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1288
1361
|
}, unmarshalListBackendStatsResponse);
|
|
1289
1362
|
|
|
1290
1363
|
/**
|
|
1291
|
-
* List backend server statistics.
|
|
1292
|
-
* servers, including their state and the result of their last health check.
|
|
1364
|
+
* List backend server statistics.
|
|
1293
1365
|
*
|
|
1294
|
-
* @param request - The request {@link
|
|
1366
|
+
* @param request - The request {@link ListBackendStatsRequest}
|
|
1295
1367
|
* @returns A Promise of ListBackendStatsResponse
|
|
1296
1368
|
*/
|
|
1297
1369
|
listBackendStats = request => enrichForPagination('backendServersStats', this.pageOfListBackendStats, request);
|
|
1298
1370
|
pageOfListAcls = request => this.client.fetch({
|
|
1299
1371
|
method: 'GET',
|
|
1300
|
-
path: `/lb/v1/
|
|
1301
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
1372
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam('frontendId', request.frontendId)}/acls`,
|
|
1373
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1302
1374
|
}, unmarshalListAclResponse);
|
|
1303
1375
|
|
|
1304
1376
|
/**
|
|
1305
|
-
* List
|
|
1306
|
-
* specified by its frontend ID. The response is an array of ACL objects, each
|
|
1307
|
-
* one representing an ACL that denies or allows traffic based on certain
|
|
1308
|
-
* conditions.
|
|
1377
|
+
* List ACL for a given frontend.
|
|
1309
1378
|
*
|
|
1310
|
-
* @param request - The request {@link
|
|
1379
|
+
* @param request - The request {@link ListAclsRequest}
|
|
1311
1380
|
* @returns A Promise of ListAclResponse
|
|
1312
1381
|
*/
|
|
1313
1382
|
listAcls = request => enrichForPagination('acls', this.pageOfListAcls, request);
|
|
1314
1383
|
|
|
1315
1384
|
/**
|
|
1316
|
-
* Create an ACL for a given frontend.
|
|
1317
|
-
* Each ACL must have a name, an action to perform (allow or deny), and a
|
|
1318
|
-
* match rule (the action is carried out when the incoming traffic matches the
|
|
1319
|
-
* rule).
|
|
1385
|
+
* Create an ACL for a given frontend.
|
|
1320
1386
|
*
|
|
1321
|
-
* @param request - The request {@link
|
|
1387
|
+
* @param request - The request {@link CreateAclRequest}
|
|
1322
1388
|
* @returns A Promise of Acl
|
|
1323
1389
|
*/
|
|
1324
1390
|
createAcl = request => this.client.fetch({
|
|
1325
|
-
body: JSON.stringify(
|
|
1391
|
+
body: JSON.stringify(marshalCreateAclRequest(request, this.client.settings)),
|
|
1326
1392
|
headers: jsonContentHeaders,
|
|
1327
1393
|
method: 'POST',
|
|
1328
|
-
path: `/lb/v1/
|
|
1394
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam('frontendId', request.frontendId)}/acls`
|
|
1329
1395
|
}, unmarshalAcl);
|
|
1330
1396
|
|
|
1331
1397
|
/**
|
|
1332
|
-
* Get an ACL.
|
|
1333
|
-
* The response returns full details of the ACL, including its name, action,
|
|
1334
|
-
* match rule and frontend.
|
|
1398
|
+
* Get an ACL.
|
|
1335
1399
|
*
|
|
1336
|
-
* @param request - The request {@link
|
|
1400
|
+
* @param request - The request {@link GetAclRequest}
|
|
1337
1401
|
* @returns A Promise of Acl
|
|
1338
1402
|
*/
|
|
1339
1403
|
getAcl = request => this.client.fetch({
|
|
1340
1404
|
method: 'GET',
|
|
1341
|
-
path: `/lb/v1/
|
|
1405
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam('aclId', request.aclId)}`
|
|
1342
1406
|
}, unmarshalAcl);
|
|
1343
1407
|
|
|
1344
1408
|
/**
|
|
1345
|
-
* Update an ACL.
|
|
1346
|
-
* update details including its name, action and match rule.
|
|
1409
|
+
* Update an ACL.
|
|
1347
1410
|
*
|
|
1348
|
-
* @param request - The request {@link
|
|
1411
|
+
* @param request - The request {@link UpdateAclRequest}
|
|
1349
1412
|
* @returns A Promise of Acl
|
|
1350
1413
|
*/
|
|
1351
1414
|
updateAcl = request => this.client.fetch({
|
|
1352
|
-
body: JSON.stringify(
|
|
1415
|
+
body: JSON.stringify(marshalUpdateAclRequest(request, this.client.settings)),
|
|
1353
1416
|
headers: jsonContentHeaders,
|
|
1354
1417
|
method: 'PUT',
|
|
1355
|
-
path: `/lb/v1/
|
|
1418
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam('aclId', request.aclId)}`
|
|
1356
1419
|
}, unmarshalAcl);
|
|
1357
1420
|
|
|
1358
1421
|
/**
|
|
1359
|
-
* Delete an ACL.
|
|
1360
|
-
* irreversible and cannot be undone.
|
|
1422
|
+
* Delete an ACL.
|
|
1361
1423
|
*
|
|
1362
|
-
* @param request - The request {@link
|
|
1424
|
+
* @param request - The request {@link DeleteAclRequest}
|
|
1363
1425
|
*/
|
|
1364
1426
|
deleteAcl = request => this.client.fetch({
|
|
1365
1427
|
method: 'DELETE',
|
|
1366
|
-
path: `/lb/v1/
|
|
1428
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam('aclId', request.aclId)}`
|
|
1367
1429
|
});
|
|
1368
1430
|
|
|
1369
1431
|
/**
|
|
1370
|
-
*
|
|
1371
|
-
*
|
|
1372
|
-
* existing ACLs on this frontend will be removed.
|
|
1373
|
-
*
|
|
1374
|
-
* @param request - The request {@link ZonedApiSetAclsRequest}
|
|
1375
|
-
* @returns A Promise of SetAclsResponse
|
|
1376
|
-
*/
|
|
1377
|
-
setAcls = request => this.client.fetch({
|
|
1378
|
-
body: JSON.stringify(marshalZonedApiSetAclsRequest(request, this.client.settings)),
|
|
1379
|
-
headers: jsonContentHeaders,
|
|
1380
|
-
method: 'PUT',
|
|
1381
|
-
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam('frontendId', request.frontendId)}/acls`
|
|
1382
|
-
}, unmarshalSetAclsResponse);
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* Create an SSL/TLS certificate. Generate a new SSL/TLS certificate for a
|
|
1386
|
-
* given Load Balancer. You can choose to create a Let's Encrypt certificate,
|
|
1387
|
-
* or import a custom certificate.
|
|
1432
|
+
* Create a TLS certificate. Generate a new TLS certificate using Let's
|
|
1433
|
+
* Encrypt or import your certificate.
|
|
1388
1434
|
*
|
|
1389
|
-
* @param request - The request {@link
|
|
1435
|
+
* @param request - The request {@link CreateCertificateRequest}
|
|
1390
1436
|
* @returns A Promise of Certificate
|
|
1391
1437
|
*/
|
|
1392
1438
|
createCertificate = request => this.client.fetch({
|
|
1393
|
-
body: JSON.stringify(
|
|
1439
|
+
body: JSON.stringify(marshalCreateCertificateRequest(request, this.client.settings)),
|
|
1394
1440
|
headers: jsonContentHeaders,
|
|
1395
1441
|
method: 'POST',
|
|
1396
|
-
path: `/lb/v1/
|
|
1442
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/certificates`
|
|
1397
1443
|
}, unmarshalCertificate);
|
|
1398
1444
|
pageOfListCertificates = request => this.client.fetch({
|
|
1399
1445
|
method: 'GET',
|
|
1400
|
-
path: `/lb/v1/
|
|
1401
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
1446
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/certificates`,
|
|
1447
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1402
1448
|
}, unmarshalListCertificatesResponse);
|
|
1403
1449
|
|
|
1404
1450
|
/**
|
|
1405
|
-
* List all
|
|
1406
|
-
* SSL/TLS certificates on a given Load Balancer. The response is an array of
|
|
1407
|
-
* certificate objects, which are by default listed in ascending order of
|
|
1408
|
-
* creation date.
|
|
1451
|
+
* List all TLS certificates on a given load balancer.
|
|
1409
1452
|
*
|
|
1410
|
-
* @param request - The request {@link
|
|
1453
|
+
* @param request - The request {@link ListCertificatesRequest}
|
|
1411
1454
|
* @returns A Promise of ListCertificatesResponse
|
|
1412
1455
|
*/
|
|
1413
1456
|
listCertificates = request => enrichForPagination('certificates', this.pageOfListCertificates, request);
|
|
1414
1457
|
|
|
1415
1458
|
/**
|
|
1416
|
-
* Get
|
|
1417
|
-
* certificate, specified by its certificate ID. The response returns full
|
|
1418
|
-
* details of the certificate, including its type, main domain name, and
|
|
1419
|
-
* alternative domain names.
|
|
1459
|
+
* Get a TLS certificate.
|
|
1420
1460
|
*
|
|
1421
|
-
* @param request - The request {@link
|
|
1461
|
+
* @param request - The request {@link GetCertificateRequest}
|
|
1422
1462
|
* @returns A Promise of Certificate
|
|
1423
1463
|
*/
|
|
1424
1464
|
getCertificate = request => this.client.fetch({
|
|
1425
1465
|
method: 'GET',
|
|
1426
|
-
path: `/lb/v1/
|
|
1466
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
1427
1467
|
}, unmarshalCertificate);
|
|
1428
1468
|
|
|
1429
1469
|
/**
|
|
@@ -1436,202 +1476,193 @@ class ZonedAPI extends API$1 {
|
|
|
1436
1476
|
waitForCertificate = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
|
|
1437
1477
|
|
|
1438
1478
|
/**
|
|
1439
|
-
* Update
|
|
1440
|
-
* certificate, specified by its certificate ID.
|
|
1479
|
+
* Update a TLS certificate.
|
|
1441
1480
|
*
|
|
1442
|
-
* @param request - The request {@link
|
|
1481
|
+
* @param request - The request {@link UpdateCertificateRequest}
|
|
1443
1482
|
* @returns A Promise of Certificate
|
|
1444
1483
|
*/
|
|
1445
1484
|
updateCertificate = request => this.client.fetch({
|
|
1446
|
-
body: JSON.stringify(
|
|
1485
|
+
body: JSON.stringify(marshalUpdateCertificateRequest(request, this.client.settings)),
|
|
1447
1486
|
headers: jsonContentHeaders,
|
|
1448
1487
|
method: 'PUT',
|
|
1449
|
-
path: `/lb/v1/
|
|
1488
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
1450
1489
|
}, unmarshalCertificate);
|
|
1451
1490
|
|
|
1452
1491
|
/**
|
|
1453
|
-
* Delete
|
|
1454
|
-
* its certificate ID. Deleting a certificate is irreversible and cannot be
|
|
1455
|
-
* undone.
|
|
1492
|
+
* Delete a TLS certificate.
|
|
1456
1493
|
*
|
|
1457
|
-
* @param request - The request {@link
|
|
1494
|
+
* @param request - The request {@link DeleteCertificateRequest}
|
|
1458
1495
|
*/
|
|
1459
1496
|
deleteCertificate = request => this.client.fetch({
|
|
1460
1497
|
method: 'DELETE',
|
|
1461
|
-
path: `/lb/v1/
|
|
1498
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam('certificateId', request.certificateId)}`
|
|
1462
1499
|
});
|
|
1463
1500
|
pageOfListLbTypes = (() => {
|
|
1464
|
-
var
|
|
1501
|
+
var _this19 = this;
|
|
1465
1502
|
return function (request) {
|
|
1466
1503
|
if (request === void 0) {
|
|
1467
1504
|
request = {};
|
|
1468
1505
|
}
|
|
1469
|
-
return
|
|
1506
|
+
return _this19.client.fetch({
|
|
1470
1507
|
method: 'GET',
|
|
1471
|
-
path: `/lb/v1/
|
|
1472
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ??
|
|
1508
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this19.client.settings.defaultRegion)}/lb-types`,
|
|
1509
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
|
|
1473
1510
|
}, unmarshalListLbTypesResponse);
|
|
1474
1511
|
};
|
|
1475
1512
|
})();
|
|
1476
1513
|
|
|
1477
1514
|
/**
|
|
1478
|
-
* List all
|
|
1479
|
-
* Balancer types. The response includes an array of offer types, each with a
|
|
1480
|
-
* name, description, and information about its stock availability.
|
|
1515
|
+
* List all load balancer offer type.
|
|
1481
1516
|
*
|
|
1482
|
-
* @param request - The request {@link
|
|
1517
|
+
* @param request - The request {@link ListLbTypesRequest}
|
|
1483
1518
|
* @returns A Promise of ListLbTypesResponse
|
|
1484
1519
|
*/
|
|
1485
1520
|
listLbTypes = (() => {
|
|
1486
|
-
var
|
|
1521
|
+
var _this20 = this;
|
|
1487
1522
|
return function (request) {
|
|
1488
1523
|
if (request === void 0) {
|
|
1489
1524
|
request = {};
|
|
1490
1525
|
}
|
|
1491
|
-
return enrichForPagination('lbTypes',
|
|
1526
|
+
return enrichForPagination('lbTypes', _this20.pageOfListLbTypes, request);
|
|
1492
1527
|
};
|
|
1493
1528
|
})();
|
|
1494
1529
|
|
|
1495
1530
|
/**
|
|
1496
|
-
* Create a subscriber
|
|
1497
|
-
* configuration or a webhook configuration, for a specified Scaleway
|
|
1498
|
-
* Project.
|
|
1531
|
+
* Create a subscriber, webhook or email.
|
|
1499
1532
|
*
|
|
1500
|
-
* @param request - The request {@link
|
|
1533
|
+
* @param request - The request {@link CreateSubscriberRequest}
|
|
1501
1534
|
* @returns A Promise of Subscriber
|
|
1502
1535
|
*/
|
|
1503
1536
|
createSubscriber = request => this.client.fetch({
|
|
1504
|
-
body: JSON.stringify(
|
|
1537
|
+
body: JSON.stringify(marshalCreateSubscriberRequest(request, this.client.settings)),
|
|
1505
1538
|
headers: jsonContentHeaders,
|
|
1506
1539
|
method: 'POST',
|
|
1507
|
-
path: `/lb/v1/
|
|
1540
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/subscribers`
|
|
1508
1541
|
}, unmarshalSubscriber);
|
|
1509
1542
|
|
|
1510
1543
|
/**
|
|
1511
|
-
* Get a subscriber.
|
|
1512
|
-
* specified by its subscriber ID. Its full details, including name and
|
|
1513
|
-
* email/webhook configuration, are returned in the response object.
|
|
1544
|
+
* Get a subscriber.
|
|
1514
1545
|
*
|
|
1515
|
-
* @param request - The request {@link
|
|
1546
|
+
* @param request - The request {@link GetSubscriberRequest}
|
|
1516
1547
|
* @returns A Promise of Subscriber
|
|
1517
1548
|
*/
|
|
1518
1549
|
getSubscriber = request => this.client.fetch({
|
|
1519
1550
|
method: 'GET',
|
|
1520
|
-
path: `/lb/v1/
|
|
1551
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam('subscriberId', request.subscriberId)}`
|
|
1521
1552
|
}, unmarshalSubscriber);
|
|
1522
|
-
pageOfListSubscriber =
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1553
|
+
pageOfListSubscriber = (() => {
|
|
1554
|
+
var _this21 = this;
|
|
1555
|
+
return function (request) {
|
|
1556
|
+
if (request === void 0) {
|
|
1557
|
+
request = {};
|
|
1558
|
+
}
|
|
1559
|
+
return _this21.client.fetch({
|
|
1560
|
+
method: 'GET',
|
|
1561
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? _this21.client.settings.defaultRegion)}/subscribers`,
|
|
1562
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this21.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
1563
|
+
}, unmarshalListSubscriberResponse);
|
|
1564
|
+
};
|
|
1565
|
+
})();
|
|
1527
1566
|
|
|
1528
1567
|
/**
|
|
1529
|
-
* List all
|
|
1530
|
-
* default, returns all subscribers to Load Balancer alerts for the
|
|
1531
|
-
* Organization associated with the authentication token used for the
|
|
1532
|
-
* request.
|
|
1568
|
+
* List all subscriber.
|
|
1533
1569
|
*
|
|
1534
|
-
* @param request - The request {@link
|
|
1570
|
+
* @param request - The request {@link ListSubscriberRequest}
|
|
1535
1571
|
* @returns A Promise of ListSubscriberResponse
|
|
1536
1572
|
*/
|
|
1537
|
-
listSubscriber =
|
|
1573
|
+
listSubscriber = (() => {
|
|
1574
|
+
var _this22 = this;
|
|
1575
|
+
return function (request) {
|
|
1576
|
+
if (request === void 0) {
|
|
1577
|
+
request = {};
|
|
1578
|
+
}
|
|
1579
|
+
return enrichForPagination('subscribers', _this22.pageOfListSubscriber, request);
|
|
1580
|
+
};
|
|
1581
|
+
})();
|
|
1538
1582
|
|
|
1539
1583
|
/**
|
|
1540
|
-
* Update a subscriber.
|
|
1541
|
-
* name, webhook configuration, email configuration), specified by its
|
|
1542
|
-
* subscriber ID.
|
|
1584
|
+
* Update a subscriber.
|
|
1543
1585
|
*
|
|
1544
|
-
* @param request - The request {@link
|
|
1586
|
+
* @param request - The request {@link UpdateSubscriberRequest}
|
|
1545
1587
|
* @returns A Promise of Subscriber
|
|
1546
1588
|
*/
|
|
1547
1589
|
updateSubscriber = request => this.client.fetch({
|
|
1548
|
-
body: JSON.stringify(
|
|
1590
|
+
body: JSON.stringify(marshalUpdateSubscriberRequest(request, this.client.settings)),
|
|
1549
1591
|
headers: jsonContentHeaders,
|
|
1550
1592
|
method: 'PUT',
|
|
1551
|
-
path: `/lb/v1/
|
|
1593
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam('subscriberId', request.subscriberId)}`
|
|
1552
1594
|
}, unmarshalSubscriber);
|
|
1553
1595
|
|
|
1554
1596
|
/**
|
|
1555
|
-
* Delete a subscriber.
|
|
1556
|
-
* subscriber ID. Deleting a subscriber is permanent, and cannot be undone.
|
|
1597
|
+
* Delete a subscriber.
|
|
1557
1598
|
*
|
|
1558
|
-
* @param request - The request {@link
|
|
1599
|
+
* @param request - The request {@link DeleteSubscriberRequest}
|
|
1559
1600
|
*/
|
|
1560
1601
|
deleteSubscriber = request => this.client.fetch({
|
|
1561
1602
|
method: 'DELETE',
|
|
1562
|
-
path: `/lb/v1/
|
|
1603
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lb/subscriber/${validatePathParam('subscriberId', request.subscriberId)}`
|
|
1563
1604
|
});
|
|
1564
1605
|
|
|
1565
1606
|
/**
|
|
1566
|
-
* Subscribe a subscriber to
|
|
1567
|
-
* existing subscriber to alerts for a given Load Balancer.
|
|
1607
|
+
* Subscribe a subscriber to a given load balancer.
|
|
1568
1608
|
*
|
|
1569
|
-
* @param request - The request {@link
|
|
1609
|
+
* @param request - The request {@link SubscribeToLbRequest}
|
|
1570
1610
|
* @returns A Promise of Lb
|
|
1571
1611
|
*/
|
|
1572
1612
|
subscribeToLb = request => this.client.fetch({
|
|
1573
|
-
body: JSON.stringify(
|
|
1613
|
+
body: JSON.stringify(marshalSubscribeToLbRequest(request, this.client.settings)),
|
|
1574
1614
|
headers: jsonContentHeaders,
|
|
1575
1615
|
method: 'POST',
|
|
1576
|
-
path: `/lb/v1/
|
|
1616
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lb/${validatePathParam('lbId', request.lbId)}/subscribe`
|
|
1577
1617
|
}, unmarshalLb);
|
|
1578
1618
|
|
|
1579
1619
|
/**
|
|
1580
|
-
* Unsubscribe a subscriber from
|
|
1581
|
-
* a subscriber from alerts for a given Load Balancer. The subscriber is not
|
|
1582
|
-
* deleted, and can be resubscribed in the future if necessary.
|
|
1620
|
+
* Unsubscribe a subscriber from a given load balancer.
|
|
1583
1621
|
*
|
|
1584
|
-
* @param request - The request {@link
|
|
1622
|
+
* @param request - The request {@link UnsubscribeFromLbRequest}
|
|
1585
1623
|
* @returns A Promise of Lb
|
|
1586
1624
|
*/
|
|
1587
1625
|
unsubscribeFromLb = request => this.client.fetch({
|
|
1588
1626
|
method: 'DELETE',
|
|
1589
|
-
path: `/lb/v1/
|
|
1627
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lb/${validatePathParam('lbId', request.lbId)}/unsubscribe`
|
|
1590
1628
|
}, unmarshalLb);
|
|
1591
1629
|
pageOfListLbPrivateNetworks = request => this.client.fetch({
|
|
1592
1630
|
method: 'GET',
|
|
1593
|
-
path: `/lb/v1/
|
|
1594
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
1631
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks`,
|
|
1632
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
1595
1633
|
}, unmarshalListLbPrivateNetworksResponse);
|
|
1596
1634
|
|
|
1597
1635
|
/**
|
|
1598
|
-
* List
|
|
1599
|
-
* Networks attached to a given Load Balancer, specified by its Load Balancer
|
|
1600
|
-
* ID. The response is an array of Private Network objects, giving information
|
|
1601
|
-
* including the status, configuration, name and creation date of each Private
|
|
1602
|
-
* Network.
|
|
1636
|
+
* List attached private network of load balancer.
|
|
1603
1637
|
*
|
|
1604
|
-
* @param request - The request {@link
|
|
1638
|
+
* @param request - The request {@link ListLbPrivateNetworksRequest}
|
|
1605
1639
|
* @returns A Promise of ListLbPrivateNetworksResponse
|
|
1606
1640
|
*/
|
|
1607
1641
|
listLbPrivateNetworks = request => enrichForPagination('privateNetwork', this.pageOfListLbPrivateNetworks, request);
|
|
1608
1642
|
|
|
1609
1643
|
/**
|
|
1610
|
-
*
|
|
1611
|
-
* Balancer to a specified Private Network, defining a static or DHCP
|
|
1612
|
-
* configuration for the Load Balancer on the network.
|
|
1644
|
+
* Add load balancer on instance private network.
|
|
1613
1645
|
*
|
|
1614
|
-
* @param request - The request {@link
|
|
1646
|
+
* @param request - The request {@link AttachPrivateNetworkRequest}
|
|
1615
1647
|
* @returns A Promise of PrivateNetwork
|
|
1616
1648
|
*/
|
|
1617
1649
|
attachPrivateNetwork = request => this.client.fetch({
|
|
1618
|
-
body: JSON.stringify(
|
|
1650
|
+
body: JSON.stringify(marshalAttachPrivateNetworkRequest(request, this.client.settings)),
|
|
1619
1651
|
headers: jsonContentHeaders,
|
|
1620
1652
|
method: 'POST',
|
|
1621
|
-
path: `/lb/v1/
|
|
1653
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/attach`
|
|
1622
1654
|
}, unmarshalPrivateNetwork);
|
|
1623
1655
|
|
|
1624
1656
|
/**
|
|
1625
|
-
*
|
|
1626
|
-
* from a specified Private Network.
|
|
1657
|
+
* Remove load balancer of private network.
|
|
1627
1658
|
*
|
|
1628
|
-
* @param request - The request {@link
|
|
1659
|
+
* @param request - The request {@link DetachPrivateNetworkRequest}
|
|
1629
1660
|
*/
|
|
1630
1661
|
detachPrivateNetwork = request => this.client.fetch({
|
|
1631
1662
|
body: '{}',
|
|
1632
1663
|
headers: jsonContentHeaders,
|
|
1633
1664
|
method: 'POST',
|
|
1634
|
-
path: `/lb/v1/
|
|
1665
|
+
path: `/lb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam('lbId', request.lbId)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/detach`
|
|
1635
1666
|
});
|
|
1636
1667
|
}
|
|
1637
1668
|
|