@scaleway/sdk-lb 2.9.0 → 2.11.0
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/.vite/license.md +3 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/index.gen.d.ts +5 -0
- package/dist/index.gen.js +2 -0
- package/dist/metadata.gen.d.ts +12 -0
- package/dist/metadata.gen.js +13 -0
- package/dist/v1/api.gen.d.ts +880 -0
- package/dist/v1/api.gen.js +624 -0
- package/dist/v1/content.gen.d.ts +9 -0
- package/dist/v1/content.gen.js +18 -0
- package/dist/v1/index.gen.d.ts +5 -0
- package/dist/v1/index.gen.js +89 -0
- package/dist/v1/marshalling.gen.d.ts +74 -0
- package/dist/v1/marshalling.gen.js +976 -0
- package/dist/v1/metadata.gen.d.ts +419 -0
- package/dist/v1/metadata.gen.js +463 -0
- package/dist/v1/types.gen.d.ts +3561 -0
- package/dist/v1/types.gen.js +0 -0
- package/dist/v1/validation-rules.gen.d.ts +10 -0
- package/dist/v1/validation-rules.gen.js +10 -0
- package/package.json +4 -4
- package/LICENSE +0 -191
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
import { CERTIFICATE_TRANSIENT_STATUSES, LB_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
+
import { marshalAddBackendServersRequest, marshalAttachPrivateNetworkRequest, marshalCreateAclRequest, marshalCreateBackendRequest, marshalCreateCertificateRequest, marshalCreateFrontendRequest, marshalCreateIpRequest, marshalCreateLbRequest, marshalCreateRouteRequest, marshalCreateSubscriberRequest, marshalMigrateLbRequest, marshalRemoveBackendServersRequest, marshalSetBackendServersRequest, marshalSubscribeToLbRequest, marshalUpdateAclRequest, marshalUpdateBackendRequest, marshalUpdateCertificateRequest, marshalUpdateFrontendRequest, marshalUpdateHealthCheckRequest, marshalUpdateIpRequest, marshalUpdateLbRequest, marshalUpdateRouteRequest, marshalUpdateSubscriberRequest, marshalZonedApiAddBackendServersRequest, marshalZonedApiAttachPrivateNetworkRequest, marshalZonedApiCreateAclRequest, marshalZonedApiCreateBackendRequest, marshalZonedApiCreateCertificateRequest, marshalZonedApiCreateFrontendRequest, marshalZonedApiCreateIpRequest, marshalZonedApiCreateLbRequest, marshalZonedApiCreateRouteRequest, marshalZonedApiCreateSubscriberRequest, marshalZonedApiDetachPrivateNetworkRequest, marshalZonedApiMigrateLbRequest, marshalZonedApiRemoveBackendServersRequest, marshalZonedApiSetAclsRequest, marshalZonedApiSetBackendServersRequest, marshalZonedApiSubscribeToLbRequest, marshalZonedApiUpdateAclRequest, marshalZonedApiUpdateBackendRequest, marshalZonedApiUpdateCertificateRequest, marshalZonedApiUpdateFrontendRequest, marshalZonedApiUpdateHealthCheckRequest, marshalZonedApiUpdateIpRequest, marshalZonedApiUpdateLbRequest, marshalZonedApiUpdateRouteRequest, marshalZonedApiUpdateSubscriberRequest, unmarshalAcl, unmarshalBackend, unmarshalCertificate, unmarshalFrontend, unmarshalHealthCheck, unmarshalIp, unmarshalLb, unmarshalLbStats, unmarshalListAclResponse, unmarshalListBackendStatsResponse, unmarshalListBackendsResponse, unmarshalListCertificatesResponse, unmarshalListFrontendsResponse, unmarshalListIpsResponse, unmarshalListLbPrivateNetworksResponse, unmarshalListLbTypesResponse, unmarshalListLbsResponse, unmarshalListRoutesResponse, unmarshalListSubscriberResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclsResponse, unmarshalSubscriber } from "./marshalling.gen.js";
|
|
3
|
+
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v1/api.gen.ts
|
|
5
|
+
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
6
|
+
/**
|
|
7
|
+
* Load Balancer API.
|
|
8
|
+
|
|
9
|
+
This API allows you to manage your Scaleway Load Balancer services.
|
|
10
|
+
*/
|
|
11
|
+
var ZonedAPI = class extends API$1 {
|
|
12
|
+
constructor(..._args) {
|
|
13
|
+
super(..._args);
|
|
14
|
+
this.pageOfListLbs = (request = {}) => this.client.fetch({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs`,
|
|
17
|
+
urlParams: urlParams(["lb_ids", request.lbIds], ["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], ["tags", request.tags])
|
|
18
|
+
}, unmarshalListLbsResponse);
|
|
19
|
+
this.listLbs = (request = {}) => enrichForPagination("lbs", this.pageOfListLbs, request);
|
|
20
|
+
this.createLb = (request) => this.client.fetch({
|
|
21
|
+
body: JSON.stringify(marshalZonedApiCreateLbRequest(request, this.client.settings)),
|
|
22
|
+
headers: jsonContentHeaders,
|
|
23
|
+
method: "POST",
|
|
24
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs`
|
|
25
|
+
}, unmarshalLb);
|
|
26
|
+
this.getLb = (request) => this.client.fetch({
|
|
27
|
+
method: "GET",
|
|
28
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}`
|
|
29
|
+
}, unmarshalLb);
|
|
30
|
+
this.waitForLb = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
|
|
31
|
+
this.updateLb = (request) => this.client.fetch({
|
|
32
|
+
body: JSON.stringify(marshalZonedApiUpdateLbRequest(request, this.client.settings)),
|
|
33
|
+
headers: jsonContentHeaders,
|
|
34
|
+
method: "PUT",
|
|
35
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}`
|
|
36
|
+
}, unmarshalLb);
|
|
37
|
+
this.deleteLb = (request) => this.client.fetch({
|
|
38
|
+
method: "DELETE",
|
|
39
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}`,
|
|
40
|
+
urlParams: urlParams(["release_ip", request.releaseIp])
|
|
41
|
+
});
|
|
42
|
+
this.migrateLb = (request) => this.client.fetch({
|
|
43
|
+
body: JSON.stringify(marshalZonedApiMigrateLbRequest(request, this.client.settings)),
|
|
44
|
+
headers: jsonContentHeaders,
|
|
45
|
+
method: "POST",
|
|
46
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/migrate`
|
|
47
|
+
}, unmarshalLb);
|
|
48
|
+
this.pageOfListIPs = (request = {}) => this.client.fetch({
|
|
49
|
+
method: "GET",
|
|
50
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`,
|
|
51
|
+
urlParams: urlParams(["ip_address", request.ipAddress], ["ip_type", request.ipType], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
52
|
+
}, unmarshalListIpsResponse);
|
|
53
|
+
this.listIPs = (request = {}) => enrichForPagination("ips", this.pageOfListIPs, request);
|
|
54
|
+
this.createIp = (request) => this.client.fetch({
|
|
55
|
+
body: JSON.stringify(marshalZonedApiCreateIpRequest(request, this.client.settings)),
|
|
56
|
+
headers: jsonContentHeaders,
|
|
57
|
+
method: "POST",
|
|
58
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips`
|
|
59
|
+
}, unmarshalIp);
|
|
60
|
+
this.getIp = (request) => this.client.fetch({
|
|
61
|
+
method: "GET",
|
|
62
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
63
|
+
}, unmarshalIp);
|
|
64
|
+
this.releaseIp = (request) => this.client.fetch({
|
|
65
|
+
method: "DELETE",
|
|
66
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
67
|
+
});
|
|
68
|
+
this.updateIp = (request) => this.client.fetch({
|
|
69
|
+
body: JSON.stringify(marshalZonedApiUpdateIpRequest(request, this.client.settings)),
|
|
70
|
+
headers: jsonContentHeaders,
|
|
71
|
+
method: "PATCH",
|
|
72
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
73
|
+
}, unmarshalIp);
|
|
74
|
+
this.pageOfListBackends = (request) => this.client.fetch({
|
|
75
|
+
method: "GET",
|
|
76
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/backends`,
|
|
77
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
78
|
+
}, unmarshalListBackendsResponse);
|
|
79
|
+
this.listBackends = (request) => enrichForPagination("backends", this.pageOfListBackends, request);
|
|
80
|
+
this.createBackend = (request) => this.client.fetch({
|
|
81
|
+
body: JSON.stringify(marshalZonedApiCreateBackendRequest(request, this.client.settings)),
|
|
82
|
+
headers: jsonContentHeaders,
|
|
83
|
+
method: "POST",
|
|
84
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/backends`
|
|
85
|
+
}, unmarshalBackend);
|
|
86
|
+
this.getBackend = (request) => this.client.fetch({
|
|
87
|
+
method: "GET",
|
|
88
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
89
|
+
}, unmarshalBackend);
|
|
90
|
+
this.updateBackend = (request) => this.client.fetch({
|
|
91
|
+
body: JSON.stringify(marshalZonedApiUpdateBackendRequest(request, this.client.settings)),
|
|
92
|
+
headers: jsonContentHeaders,
|
|
93
|
+
method: "PUT",
|
|
94
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
95
|
+
}, unmarshalBackend);
|
|
96
|
+
this.deleteBackend = (request) => this.client.fetch({
|
|
97
|
+
method: "DELETE",
|
|
98
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
99
|
+
});
|
|
100
|
+
this.addBackendServers = (request) => this.client.fetch({
|
|
101
|
+
body: JSON.stringify(marshalZonedApiAddBackendServersRequest(request, this.client.settings)),
|
|
102
|
+
headers: jsonContentHeaders,
|
|
103
|
+
method: "POST",
|
|
104
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
105
|
+
}, unmarshalBackend);
|
|
106
|
+
this.removeBackendServers = (request) => this.client.fetch({
|
|
107
|
+
body: JSON.stringify(marshalZonedApiRemoveBackendServersRequest(request, this.client.settings)),
|
|
108
|
+
headers: jsonContentHeaders,
|
|
109
|
+
method: "DELETE",
|
|
110
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
111
|
+
}, unmarshalBackend);
|
|
112
|
+
this.setBackendServers = (request) => this.client.fetch({
|
|
113
|
+
body: JSON.stringify(marshalZonedApiSetBackendServersRequest(request, this.client.settings)),
|
|
114
|
+
headers: jsonContentHeaders,
|
|
115
|
+
method: "PUT",
|
|
116
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
117
|
+
}, unmarshalBackend);
|
|
118
|
+
this.updateHealthCheck = (request) => this.client.fetch({
|
|
119
|
+
body: JSON.stringify(marshalZonedApiUpdateHealthCheckRequest(request, this.client.settings)),
|
|
120
|
+
headers: jsonContentHeaders,
|
|
121
|
+
method: "PUT",
|
|
122
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/backends/${validatePathParam("backendId", request.backendId)}/healthcheck`
|
|
123
|
+
}, unmarshalHealthCheck);
|
|
124
|
+
this.pageOfListFrontends = (request) => this.client.fetch({
|
|
125
|
+
method: "GET",
|
|
126
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/frontends`,
|
|
127
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
128
|
+
}, unmarshalListFrontendsResponse);
|
|
129
|
+
this.listFrontends = (request) => enrichForPagination("frontends", this.pageOfListFrontends, request);
|
|
130
|
+
this.createFrontend = (request) => this.client.fetch({
|
|
131
|
+
body: JSON.stringify(marshalZonedApiCreateFrontendRequest(request, this.client.settings)),
|
|
132
|
+
headers: jsonContentHeaders,
|
|
133
|
+
method: "POST",
|
|
134
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/frontends`
|
|
135
|
+
}, unmarshalFrontend);
|
|
136
|
+
this.getFrontend = (request) => this.client.fetch({
|
|
137
|
+
method: "GET",
|
|
138
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
139
|
+
}, unmarshalFrontend);
|
|
140
|
+
this.updateFrontend = (request) => this.client.fetch({
|
|
141
|
+
body: JSON.stringify(marshalZonedApiUpdateFrontendRequest(request, this.client.settings)),
|
|
142
|
+
headers: jsonContentHeaders,
|
|
143
|
+
method: "PUT",
|
|
144
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
145
|
+
}, unmarshalFrontend);
|
|
146
|
+
this.deleteFrontend = (request) => this.client.fetch({
|
|
147
|
+
method: "DELETE",
|
|
148
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
149
|
+
});
|
|
150
|
+
this.pageOfListRoutes = (request = {}) => this.client.fetch({
|
|
151
|
+
method: "GET",
|
|
152
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes`,
|
|
153
|
+
urlParams: urlParams(["frontend_id", request.frontendId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
154
|
+
}, unmarshalListRoutesResponse);
|
|
155
|
+
this.listRoutes = (request = {}) => enrichForPagination("routes", this.pageOfListRoutes, request);
|
|
156
|
+
this.createRoute = (request) => this.client.fetch({
|
|
157
|
+
body: JSON.stringify(marshalZonedApiCreateRouteRequest(request, this.client.settings)),
|
|
158
|
+
headers: jsonContentHeaders,
|
|
159
|
+
method: "POST",
|
|
160
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes`
|
|
161
|
+
}, unmarshalRoute);
|
|
162
|
+
this.getRoute = (request) => this.client.fetch({
|
|
163
|
+
method: "GET",
|
|
164
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
165
|
+
}, unmarshalRoute);
|
|
166
|
+
this.updateRoute = (request) => this.client.fetch({
|
|
167
|
+
body: JSON.stringify(marshalZonedApiUpdateRouteRequest(request, this.client.settings)),
|
|
168
|
+
headers: jsonContentHeaders,
|
|
169
|
+
method: "PUT",
|
|
170
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
171
|
+
}, unmarshalRoute);
|
|
172
|
+
this.deleteRoute = (request) => this.client.fetch({
|
|
173
|
+
method: "DELETE",
|
|
174
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
175
|
+
});
|
|
176
|
+
this.getLbStats = (request) => this.client.fetch({
|
|
177
|
+
method: "GET",
|
|
178
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/stats`,
|
|
179
|
+
urlParams: urlParams(["backend_id", request.backendId])
|
|
180
|
+
}, unmarshalLbStats);
|
|
181
|
+
this.pageOfListBackendStats = (request) => this.client.fetch({
|
|
182
|
+
method: "GET",
|
|
183
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/backend-stats`,
|
|
184
|
+
urlParams: urlParams(["backend_id", request.backendId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
185
|
+
}, unmarshalListBackendStatsResponse);
|
|
186
|
+
this.listBackendStats = (request) => enrichForPagination("backendServersStats", this.pageOfListBackendStats, request);
|
|
187
|
+
this.pageOfListAcls = (request) => this.client.fetch({
|
|
188
|
+
method: "GET",
|
|
189
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`,
|
|
190
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
191
|
+
}, unmarshalListAclResponse);
|
|
192
|
+
this.listAcls = (request) => enrichForPagination("acls", this.pageOfListAcls, request);
|
|
193
|
+
this.createAcl = (request) => this.client.fetch({
|
|
194
|
+
body: JSON.stringify(marshalZonedApiCreateAclRequest(request, this.client.settings)),
|
|
195
|
+
headers: jsonContentHeaders,
|
|
196
|
+
method: "POST",
|
|
197
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
198
|
+
}, unmarshalAcl);
|
|
199
|
+
this.getAcl = (request) => this.client.fetch({
|
|
200
|
+
method: "GET",
|
|
201
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
202
|
+
}, unmarshalAcl);
|
|
203
|
+
this.updateAcl = (request) => this.client.fetch({
|
|
204
|
+
body: JSON.stringify(marshalZonedApiUpdateAclRequest(request, this.client.settings)),
|
|
205
|
+
headers: jsonContentHeaders,
|
|
206
|
+
method: "PUT",
|
|
207
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
208
|
+
}, unmarshalAcl);
|
|
209
|
+
this.deleteAcl = (request) => this.client.fetch({
|
|
210
|
+
method: "DELETE",
|
|
211
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
212
|
+
});
|
|
213
|
+
this.setAcls = (request) => this.client.fetch({
|
|
214
|
+
body: JSON.stringify(marshalZonedApiSetAclsRequest(request, this.client.settings)),
|
|
215
|
+
headers: jsonContentHeaders,
|
|
216
|
+
method: "PUT",
|
|
217
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
218
|
+
}, unmarshalSetAclsResponse);
|
|
219
|
+
this.createCertificate = (request) => this.client.fetch({
|
|
220
|
+
body: JSON.stringify(marshalZonedApiCreateCertificateRequest(request, this.client.settings)),
|
|
221
|
+
headers: jsonContentHeaders,
|
|
222
|
+
method: "POST",
|
|
223
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`
|
|
224
|
+
}, unmarshalCertificate);
|
|
225
|
+
this.pageOfListCertificates = (request) => this.client.fetch({
|
|
226
|
+
method: "GET",
|
|
227
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`,
|
|
228
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
229
|
+
}, unmarshalListCertificatesResponse);
|
|
230
|
+
this.listCertificates = (request) => enrichForPagination("certificates", this.pageOfListCertificates, request);
|
|
231
|
+
this.getCertificate = (request) => this.client.fetch({
|
|
232
|
+
method: "GET",
|
|
233
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
234
|
+
}, unmarshalCertificate);
|
|
235
|
+
this.waitForCertificate = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
|
|
236
|
+
this.updateCertificate = (request) => this.client.fetch({
|
|
237
|
+
body: JSON.stringify(marshalZonedApiUpdateCertificateRequest(request, this.client.settings)),
|
|
238
|
+
headers: jsonContentHeaders,
|
|
239
|
+
method: "PUT",
|
|
240
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
241
|
+
}, unmarshalCertificate);
|
|
242
|
+
this.deleteCertificate = (request) => this.client.fetch({
|
|
243
|
+
method: "DELETE",
|
|
244
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
245
|
+
});
|
|
246
|
+
this.pageOfListLbTypes = (request = {}) => this.client.fetch({
|
|
247
|
+
method: "GET",
|
|
248
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb-types`,
|
|
249
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
250
|
+
}, unmarshalListLbTypesResponse);
|
|
251
|
+
this.listLbTypes = (request = {}) => enrichForPagination("lbTypes", this.pageOfListLbTypes, request);
|
|
252
|
+
this.createSubscriber = (request) => this.client.fetch({
|
|
253
|
+
body: JSON.stringify(marshalZonedApiCreateSubscriberRequest(request, this.client.settings)),
|
|
254
|
+
headers: jsonContentHeaders,
|
|
255
|
+
method: "POST",
|
|
256
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers`
|
|
257
|
+
}, unmarshalSubscriber);
|
|
258
|
+
this.getSubscriber = (request) => this.client.fetch({
|
|
259
|
+
method: "GET",
|
|
260
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
261
|
+
}, unmarshalSubscriber);
|
|
262
|
+
this.pageOfListSubscriber = (request = {}) => this.client.fetch({
|
|
263
|
+
method: "GET",
|
|
264
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers`,
|
|
265
|
+
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])
|
|
266
|
+
}, unmarshalListSubscriberResponse);
|
|
267
|
+
this.listSubscriber = (request = {}) => enrichForPagination("subscribers", this.pageOfListSubscriber, request);
|
|
268
|
+
this.updateSubscriber = (request) => this.client.fetch({
|
|
269
|
+
body: JSON.stringify(marshalZonedApiUpdateSubscriberRequest(request, this.client.settings)),
|
|
270
|
+
headers: jsonContentHeaders,
|
|
271
|
+
method: "PUT",
|
|
272
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
273
|
+
}, unmarshalSubscriber);
|
|
274
|
+
this.deleteSubscriber = (request) => this.client.fetch({
|
|
275
|
+
method: "DELETE",
|
|
276
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/subscription/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
277
|
+
});
|
|
278
|
+
this.subscribeToLb = (request) => this.client.fetch({
|
|
279
|
+
body: JSON.stringify(marshalZonedApiSubscribeToLbRequest(request, this.client.settings)),
|
|
280
|
+
headers: jsonContentHeaders,
|
|
281
|
+
method: "POST",
|
|
282
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/${validatePathParam("lbId", request.lbId)}/subscribe`
|
|
283
|
+
}, unmarshalLb);
|
|
284
|
+
this.unsubscribeFromLb = (request) => this.client.fetch({
|
|
285
|
+
method: "DELETE",
|
|
286
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lb/${validatePathParam("lbId", request.lbId)}/unsubscribe`
|
|
287
|
+
}, unmarshalLb);
|
|
288
|
+
this.pageOfListLbPrivateNetworks = (request) => this.client.fetch({
|
|
289
|
+
method: "GET",
|
|
290
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks`,
|
|
291
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
292
|
+
}, unmarshalListLbPrivateNetworksResponse);
|
|
293
|
+
this.listLbPrivateNetworks = (request) => enrichForPagination("privateNetwork", this.pageOfListLbPrivateNetworks, request);
|
|
294
|
+
this.attachPrivateNetwork = (request) => this.client.fetch({
|
|
295
|
+
body: JSON.stringify(marshalZonedApiAttachPrivateNetworkRequest(request, this.client.settings)),
|
|
296
|
+
headers: jsonContentHeaders,
|
|
297
|
+
method: "POST",
|
|
298
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/attach-private-network`
|
|
299
|
+
}, unmarshalPrivateNetwork);
|
|
300
|
+
this.detachPrivateNetwork = (request) => this.client.fetch({
|
|
301
|
+
body: JSON.stringify(marshalZonedApiDetachPrivateNetworkRequest(request, this.client.settings)),
|
|
302
|
+
headers: jsonContentHeaders,
|
|
303
|
+
method: "POST",
|
|
304
|
+
path: `/lb/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/lbs/${validatePathParam("lbId", request.lbId)}/detach-private-network`
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
static {
|
|
308
|
+
this.LOCALITY = toApiLocality({ zones: [
|
|
309
|
+
"fr-par-1",
|
|
310
|
+
"fr-par-2",
|
|
311
|
+
"nl-ams-1",
|
|
312
|
+
"nl-ams-2",
|
|
313
|
+
"nl-ams-3",
|
|
314
|
+
"pl-waw-1",
|
|
315
|
+
"pl-waw-2",
|
|
316
|
+
"pl-waw-3"
|
|
317
|
+
] });
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* Load balancer API.
|
|
322
|
+
|
|
323
|
+
This API allows you to manage your Load Balancers.
|
|
324
|
+
*/
|
|
325
|
+
var API = class extends API$1 {
|
|
326
|
+
constructor(..._args2) {
|
|
327
|
+
super(..._args2);
|
|
328
|
+
this.pageOfListLbs = (request = {}) => this.client.fetch({
|
|
329
|
+
method: "GET",
|
|
330
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs`,
|
|
331
|
+
urlParams: urlParams(["lb_ids", request.lbIds], ["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], ["tags", request.tags])
|
|
332
|
+
}, unmarshalListLbsResponse);
|
|
333
|
+
this.listLbs = (request = {}) => enrichForPagination("lbs", this.pageOfListLbs, request);
|
|
334
|
+
this.createLb = (request) => this.client.fetch({
|
|
335
|
+
body: JSON.stringify(marshalCreateLbRequest(request, this.client.settings)),
|
|
336
|
+
headers: jsonContentHeaders,
|
|
337
|
+
method: "POST",
|
|
338
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs`
|
|
339
|
+
}, unmarshalLb);
|
|
340
|
+
this.getLb = (request) => this.client.fetch({
|
|
341
|
+
method: "GET",
|
|
342
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}`
|
|
343
|
+
}, unmarshalLb);
|
|
344
|
+
this.waitForLb = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!LB_TRANSIENT_STATUSES.includes(res.status))), this.getLb, request, options);
|
|
345
|
+
this.updateLb = (request) => this.client.fetch({
|
|
346
|
+
body: JSON.stringify(marshalUpdateLbRequest(request, this.client.settings)),
|
|
347
|
+
headers: jsonContentHeaders,
|
|
348
|
+
method: "PUT",
|
|
349
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}`
|
|
350
|
+
}, unmarshalLb);
|
|
351
|
+
this.deleteLb = (request) => this.client.fetch({
|
|
352
|
+
method: "DELETE",
|
|
353
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}`,
|
|
354
|
+
urlParams: urlParams(["release_ip", request.releaseIp])
|
|
355
|
+
});
|
|
356
|
+
this.migrateLb = (request) => this.client.fetch({
|
|
357
|
+
body: JSON.stringify(marshalMigrateLbRequest(request, this.client.settings)),
|
|
358
|
+
headers: jsonContentHeaders,
|
|
359
|
+
method: "POST",
|
|
360
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/migrate`
|
|
361
|
+
}, unmarshalLb);
|
|
362
|
+
this.pageOfListIPs = (request = {}) => this.client.fetch({
|
|
363
|
+
method: "GET",
|
|
364
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips`,
|
|
365
|
+
urlParams: urlParams(["ip_address", request.ipAddress], ["ip_type", request.ipType], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
366
|
+
}, unmarshalListIpsResponse);
|
|
367
|
+
this.listIPs = (request = {}) => enrichForPagination("ips", this.pageOfListIPs, request);
|
|
368
|
+
this.createIp = (request) => this.client.fetch({
|
|
369
|
+
body: JSON.stringify(marshalCreateIpRequest(request, this.client.settings)),
|
|
370
|
+
headers: jsonContentHeaders,
|
|
371
|
+
method: "POST",
|
|
372
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips`
|
|
373
|
+
}, unmarshalIp);
|
|
374
|
+
this.getIp = (request) => this.client.fetch({
|
|
375
|
+
method: "GET",
|
|
376
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
377
|
+
}, unmarshalIp);
|
|
378
|
+
this.releaseIp = (request) => this.client.fetch({
|
|
379
|
+
method: "DELETE",
|
|
380
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
381
|
+
});
|
|
382
|
+
this.updateIp = (request) => this.client.fetch({
|
|
383
|
+
body: JSON.stringify(marshalUpdateIpRequest(request, this.client.settings)),
|
|
384
|
+
headers: jsonContentHeaders,
|
|
385
|
+
method: "PATCH",
|
|
386
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
387
|
+
}, unmarshalIp);
|
|
388
|
+
this.pageOfListBackends = (request) => this.client.fetch({
|
|
389
|
+
method: "GET",
|
|
390
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/backends`,
|
|
391
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
392
|
+
}, unmarshalListBackendsResponse);
|
|
393
|
+
this.listBackends = (request) => enrichForPagination("backends", this.pageOfListBackends, request);
|
|
394
|
+
this.createBackend = (request) => this.client.fetch({
|
|
395
|
+
body: JSON.stringify(marshalCreateBackendRequest(request, this.client.settings)),
|
|
396
|
+
headers: jsonContentHeaders,
|
|
397
|
+
method: "POST",
|
|
398
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/backends`
|
|
399
|
+
}, unmarshalBackend);
|
|
400
|
+
this.getBackend = (request) => this.client.fetch({
|
|
401
|
+
method: "GET",
|
|
402
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
403
|
+
}, unmarshalBackend);
|
|
404
|
+
this.updateBackend = (request) => this.client.fetch({
|
|
405
|
+
body: JSON.stringify(marshalUpdateBackendRequest(request, this.client.settings)),
|
|
406
|
+
headers: jsonContentHeaders,
|
|
407
|
+
method: "PUT",
|
|
408
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
409
|
+
}, unmarshalBackend);
|
|
410
|
+
this.deleteBackend = (request) => this.client.fetch({
|
|
411
|
+
method: "DELETE",
|
|
412
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}`
|
|
413
|
+
});
|
|
414
|
+
this.addBackendServers = (request) => this.client.fetch({
|
|
415
|
+
body: JSON.stringify(marshalAddBackendServersRequest(request, this.client.settings)),
|
|
416
|
+
headers: jsonContentHeaders,
|
|
417
|
+
method: "POST",
|
|
418
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
419
|
+
}, unmarshalBackend);
|
|
420
|
+
this.removeBackendServers = (request) => this.client.fetch({
|
|
421
|
+
body: JSON.stringify(marshalRemoveBackendServersRequest(request, this.client.settings)),
|
|
422
|
+
headers: jsonContentHeaders,
|
|
423
|
+
method: "DELETE",
|
|
424
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
425
|
+
}, unmarshalBackend);
|
|
426
|
+
this.setBackendServers = (request) => this.client.fetch({
|
|
427
|
+
body: JSON.stringify(marshalSetBackendServersRequest(request, this.client.settings)),
|
|
428
|
+
headers: jsonContentHeaders,
|
|
429
|
+
method: "PUT",
|
|
430
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}/servers`
|
|
431
|
+
}, unmarshalBackend);
|
|
432
|
+
this.updateHealthCheck = (request) => this.client.fetch({
|
|
433
|
+
body: JSON.stringify(marshalUpdateHealthCheckRequest(request, this.client.settings)),
|
|
434
|
+
headers: jsonContentHeaders,
|
|
435
|
+
method: "PUT",
|
|
436
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/backends/${validatePathParam("backendId", request.backendId)}/healthcheck`
|
|
437
|
+
}, unmarshalHealthCheck);
|
|
438
|
+
this.pageOfListFrontends = (request) => this.client.fetch({
|
|
439
|
+
method: "GET",
|
|
440
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/frontends`,
|
|
441
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
442
|
+
}, unmarshalListFrontendsResponse);
|
|
443
|
+
this.listFrontends = (request) => enrichForPagination("frontends", this.pageOfListFrontends, request);
|
|
444
|
+
this.createFrontend = (request) => this.client.fetch({
|
|
445
|
+
body: JSON.stringify(marshalCreateFrontendRequest(request, this.client.settings)),
|
|
446
|
+
headers: jsonContentHeaders,
|
|
447
|
+
method: "POST",
|
|
448
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/frontends`
|
|
449
|
+
}, unmarshalFrontend);
|
|
450
|
+
this.getFrontend = (request) => this.client.fetch({
|
|
451
|
+
method: "GET",
|
|
452
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
453
|
+
}, unmarshalFrontend);
|
|
454
|
+
this.updateFrontend = (request) => this.client.fetch({
|
|
455
|
+
body: JSON.stringify(marshalUpdateFrontendRequest(request, this.client.settings)),
|
|
456
|
+
headers: jsonContentHeaders,
|
|
457
|
+
method: "PUT",
|
|
458
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
459
|
+
}, unmarshalFrontend);
|
|
460
|
+
this.deleteFrontend = (request) => this.client.fetch({
|
|
461
|
+
method: "DELETE",
|
|
462
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}`
|
|
463
|
+
});
|
|
464
|
+
this.pageOfListRoutes = (request = {}) => this.client.fetch({
|
|
465
|
+
method: "GET",
|
|
466
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes`,
|
|
467
|
+
urlParams: urlParams(["frontend_id", request.frontendId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
468
|
+
}, unmarshalListRoutesResponse);
|
|
469
|
+
this.listRoutes = (request = {}) => enrichForPagination("routes", this.pageOfListRoutes, request);
|
|
470
|
+
this.createRoute = (request) => this.client.fetch({
|
|
471
|
+
body: JSON.stringify(marshalCreateRouteRequest(request, this.client.settings)),
|
|
472
|
+
headers: jsonContentHeaders,
|
|
473
|
+
method: "POST",
|
|
474
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes`
|
|
475
|
+
}, unmarshalRoute);
|
|
476
|
+
this.getRoute = (request) => this.client.fetch({
|
|
477
|
+
method: "GET",
|
|
478
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
479
|
+
}, unmarshalRoute);
|
|
480
|
+
this.updateRoute = (request) => this.client.fetch({
|
|
481
|
+
body: JSON.stringify(marshalUpdateRouteRequest(request, this.client.settings)),
|
|
482
|
+
headers: jsonContentHeaders,
|
|
483
|
+
method: "PUT",
|
|
484
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
485
|
+
}, unmarshalRoute);
|
|
486
|
+
this.deleteRoute = (request) => this.client.fetch({
|
|
487
|
+
method: "DELETE",
|
|
488
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
|
|
489
|
+
});
|
|
490
|
+
this.getLbStats = (request) => this.client.fetch({
|
|
491
|
+
method: "GET",
|
|
492
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/stats`,
|
|
493
|
+
urlParams: urlParams(["backend_id", request.backendId])
|
|
494
|
+
}, unmarshalLbStats);
|
|
495
|
+
this.pageOfListBackendStats = (request) => this.client.fetch({
|
|
496
|
+
method: "GET",
|
|
497
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/backend-stats`,
|
|
498
|
+
urlParams: urlParams(["backend_id", request.backendId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
499
|
+
}, unmarshalListBackendStatsResponse);
|
|
500
|
+
this.listBackendStats = (request) => enrichForPagination("backendServersStats", this.pageOfListBackendStats, request);
|
|
501
|
+
this.pageOfListAcls = (request) => this.client.fetch({
|
|
502
|
+
method: "GET",
|
|
503
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`,
|
|
504
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
505
|
+
}, unmarshalListAclResponse);
|
|
506
|
+
this.listAcls = (request) => enrichForPagination("acls", this.pageOfListAcls, request);
|
|
507
|
+
this.createAcl = (request) => this.client.fetch({
|
|
508
|
+
body: JSON.stringify(marshalCreateAclRequest(request, this.client.settings)),
|
|
509
|
+
headers: jsonContentHeaders,
|
|
510
|
+
method: "POST",
|
|
511
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/frontends/${validatePathParam("frontendId", request.frontendId)}/acls`
|
|
512
|
+
}, unmarshalAcl);
|
|
513
|
+
this.getAcl = (request) => this.client.fetch({
|
|
514
|
+
method: "GET",
|
|
515
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
516
|
+
}, unmarshalAcl);
|
|
517
|
+
this.updateAcl = (request) => this.client.fetch({
|
|
518
|
+
body: JSON.stringify(marshalUpdateAclRequest(request, this.client.settings)),
|
|
519
|
+
headers: jsonContentHeaders,
|
|
520
|
+
method: "PUT",
|
|
521
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
522
|
+
}, unmarshalAcl);
|
|
523
|
+
this.deleteAcl = (request) => this.client.fetch({
|
|
524
|
+
method: "DELETE",
|
|
525
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
526
|
+
});
|
|
527
|
+
this.createCertificate = (request) => this.client.fetch({
|
|
528
|
+
body: JSON.stringify(marshalCreateCertificateRequest(request, this.client.settings)),
|
|
529
|
+
headers: jsonContentHeaders,
|
|
530
|
+
method: "POST",
|
|
531
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`
|
|
532
|
+
}, unmarshalCertificate);
|
|
533
|
+
this.pageOfListCertificates = (request) => this.client.fetch({
|
|
534
|
+
method: "GET",
|
|
535
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/certificates`,
|
|
536
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
537
|
+
}, unmarshalListCertificatesResponse);
|
|
538
|
+
this.listCertificates = (request) => enrichForPagination("certificates", this.pageOfListCertificates, request);
|
|
539
|
+
this.getCertificate = (request) => this.client.fetch({
|
|
540
|
+
method: "GET",
|
|
541
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
542
|
+
}, unmarshalCertificate);
|
|
543
|
+
this.waitForCertificate = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getCertificate, request, options);
|
|
544
|
+
this.updateCertificate = (request) => this.client.fetch({
|
|
545
|
+
body: JSON.stringify(marshalUpdateCertificateRequest(request, this.client.settings)),
|
|
546
|
+
headers: jsonContentHeaders,
|
|
547
|
+
method: "PUT",
|
|
548
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
549
|
+
}, unmarshalCertificate);
|
|
550
|
+
this.deleteCertificate = (request) => this.client.fetch({
|
|
551
|
+
method: "DELETE",
|
|
552
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/certificates/${validatePathParam("certificateId", request.certificateId)}`
|
|
553
|
+
});
|
|
554
|
+
this.pageOfListLbTypes = (request = {}) => this.client.fetch({
|
|
555
|
+
method: "GET",
|
|
556
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb-types`,
|
|
557
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
558
|
+
}, unmarshalListLbTypesResponse);
|
|
559
|
+
this.listLbTypes = (request = {}) => enrichForPagination("lbTypes", this.pageOfListLbTypes, request);
|
|
560
|
+
this.createSubscriber = (request) => this.client.fetch({
|
|
561
|
+
body: JSON.stringify(marshalCreateSubscriberRequest(request, this.client.settings)),
|
|
562
|
+
headers: jsonContentHeaders,
|
|
563
|
+
method: "POST",
|
|
564
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers`
|
|
565
|
+
}, unmarshalSubscriber);
|
|
566
|
+
this.getSubscriber = (request) => this.client.fetch({
|
|
567
|
+
method: "GET",
|
|
568
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
569
|
+
}, unmarshalSubscriber);
|
|
570
|
+
this.pageOfListSubscriber = (request = {}) => this.client.fetch({
|
|
571
|
+
method: "GET",
|
|
572
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers`,
|
|
573
|
+
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])
|
|
574
|
+
}, unmarshalListSubscriberResponse);
|
|
575
|
+
this.listSubscriber = (request = {}) => enrichForPagination("subscribers", this.pageOfListSubscriber, request);
|
|
576
|
+
this.updateSubscriber = (request) => this.client.fetch({
|
|
577
|
+
body: JSON.stringify(marshalUpdateSubscriberRequest(request, this.client.settings)),
|
|
578
|
+
headers: jsonContentHeaders,
|
|
579
|
+
method: "PUT",
|
|
580
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subscribers/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
581
|
+
}, unmarshalSubscriber);
|
|
582
|
+
this.deleteSubscriber = (request) => this.client.fetch({
|
|
583
|
+
method: "DELETE",
|
|
584
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/subscriber/${validatePathParam("subscriberId", request.subscriberId)}`
|
|
585
|
+
});
|
|
586
|
+
this.subscribeToLb = (request) => this.client.fetch({
|
|
587
|
+
body: JSON.stringify(marshalSubscribeToLbRequest(request, this.client.settings)),
|
|
588
|
+
headers: jsonContentHeaders,
|
|
589
|
+
method: "POST",
|
|
590
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/${validatePathParam("lbId", request.lbId)}/subscribe`
|
|
591
|
+
}, unmarshalLb);
|
|
592
|
+
this.unsubscribeFromLb = (request) => this.client.fetch({
|
|
593
|
+
method: "DELETE",
|
|
594
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lb/${validatePathParam("lbId", request.lbId)}/unsubscribe`
|
|
595
|
+
}, unmarshalLb);
|
|
596
|
+
this.pageOfListLbPrivateNetworks = (request) => this.client.fetch({
|
|
597
|
+
method: "GET",
|
|
598
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks`,
|
|
599
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
600
|
+
}, unmarshalListLbPrivateNetworksResponse);
|
|
601
|
+
this.listLbPrivateNetworks = (request) => enrichForPagination("privateNetwork", this.pageOfListLbPrivateNetworks, request);
|
|
602
|
+
this.attachPrivateNetwork = (request) => this.client.fetch({
|
|
603
|
+
body: JSON.stringify(marshalAttachPrivateNetworkRequest(request, this.client.settings)),
|
|
604
|
+
headers: jsonContentHeaders,
|
|
605
|
+
method: "POST",
|
|
606
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/attach`
|
|
607
|
+
}, unmarshalPrivateNetwork);
|
|
608
|
+
this.detachPrivateNetwork = (request) => this.client.fetch({
|
|
609
|
+
body: "{}",
|
|
610
|
+
headers: jsonContentHeaders,
|
|
611
|
+
method: "POST",
|
|
612
|
+
path: `/lb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/lbs/${validatePathParam("lbId", request.lbId)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/detach`
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
static {
|
|
616
|
+
this.LOCALITY = toApiLocality({ regions: [
|
|
617
|
+
"fr-par",
|
|
618
|
+
"nl-ams",
|
|
619
|
+
"pl-waw"
|
|
620
|
+
] });
|
|
621
|
+
}
|
|
622
|
+
};
|
|
623
|
+
//#endregion
|
|
624
|
+
export { API, ZonedAPI };
|