@scaleway/sdk-datawarehouse 2.3.1 → 2.5.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/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1beta1/api.gen.js +240 -340
- package/dist/v1beta1/content.gen.js +10 -11
- package/dist/v1beta1/index.gen.js +24 -22
- package/dist/v1beta1/marshalling.gen.js +126 -206
- package/dist/v1beta1/types.gen.d.ts +12 -0
- package/dist/v1beta1/validation-rules.gen.d.ts +4 -0
- package/dist/v1beta1/validation-rules.gen.js +151 -163
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -83,6 +83,7 @@ const api = new Datawarehouse.v1.API(client)
|
|
|
83
83
|
## Support
|
|
84
84
|
|
|
85
85
|
We love feedback! Feel free to reach us on:
|
|
86
|
+
|
|
86
87
|
- [Scaleway Slack community](https://slack.scaleway.com/) - Join us on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource)
|
|
87
88
|
- [GitHub Issues](https://github.com/scaleway/scaleway-sdk-js/issues)
|
|
88
89
|
|
|
@@ -93,4 +94,3 @@ This repository is at its early stage and is still in active development. If you
|
|
|
93
94
|
## License
|
|
94
95
|
|
|
95
96
|
This project is Apache 2.0 licensed. See the [LICENSE](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE) file for details.
|
|
96
|
-
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __exportAll = (all, no_symbols) => {
|
|
3
|
+
let target = {};
|
|
4
|
+
for (var name in all) __defProp(target, name, {
|
|
5
|
+
get: all[name],
|
|
6
|
+
enumerable: true
|
|
7
|
+
});
|
|
8
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
|
+
return target;
|
|
10
|
+
};
|
|
11
|
+
export { __exportAll };
|
package/dist/index.gen.js
CHANGED
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -1,342 +1,242 @@
|
|
|
1
|
-
import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
|
|
2
1
|
import { DEPLOYMENT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
marshalUpdateUserRequest(request, this.client.settings)
|
|
243
|
-
),
|
|
244
|
-
headers: jsonContentHeaders,
|
|
245
|
-
method: "PATCH",
|
|
246
|
-
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("name", request.name)}`
|
|
247
|
-
},
|
|
248
|
-
unmarshalUser
|
|
249
|
-
);
|
|
250
|
-
/**
|
|
251
|
-
* Delete a user from a deployment.
|
|
252
|
-
*
|
|
253
|
-
* @param request - The request {@link DeleteUserRequest}
|
|
254
|
-
*/
|
|
255
|
-
deleteUser = (request) => this.client.fetch(
|
|
256
|
-
{
|
|
257
|
-
body: "{}",
|
|
258
|
-
headers: jsonContentHeaders,
|
|
259
|
-
method: "DELETE",
|
|
260
|
-
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("name", request.name)}`
|
|
261
|
-
}
|
|
262
|
-
);
|
|
263
|
-
/**
|
|
264
|
-
* Delete an endpoint from a deployment.
|
|
265
|
-
*
|
|
266
|
-
* @param request - The request {@link DeleteEndpointRequest}
|
|
267
|
-
*/
|
|
268
|
-
deleteEndpoint = (request) => this.client.fetch(
|
|
269
|
-
{
|
|
270
|
-
method: "DELETE",
|
|
271
|
-
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
272
|
-
}
|
|
273
|
-
);
|
|
274
|
-
/**
|
|
275
|
-
* Create a new endpoint for a deployment.
|
|
276
|
-
*
|
|
277
|
-
* @param request - The request {@link CreateEndpointRequest}
|
|
278
|
-
* @returns A Promise of Endpoint
|
|
279
|
-
*/
|
|
280
|
-
createEndpoint = (request) => this.client.fetch(
|
|
281
|
-
{
|
|
282
|
-
body: JSON.stringify(
|
|
283
|
-
marshalCreateEndpointRequest(request, this.client.settings)
|
|
284
|
-
),
|
|
285
|
-
headers: jsonContentHeaders,
|
|
286
|
-
method: "POST",
|
|
287
|
-
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints`
|
|
288
|
-
},
|
|
289
|
-
unmarshalEndpoint
|
|
290
|
-
);
|
|
291
|
-
pageOfListDatabases = (request) => this.client.fetch(
|
|
292
|
-
{
|
|
293
|
-
method: "GET",
|
|
294
|
-
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/databases`,
|
|
295
|
-
urlParams: urlParams(
|
|
296
|
-
["name", request.name],
|
|
297
|
-
["order_by", request.orderBy],
|
|
298
|
-
["page", request.page],
|
|
299
|
-
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
300
|
-
)
|
|
301
|
-
},
|
|
302
|
-
unmarshalListDatabasesResponse
|
|
303
|
-
);
|
|
304
|
-
/**
|
|
305
|
-
* List databases within a deployment.
|
|
306
|
-
*
|
|
307
|
-
* @param request - The request {@link ListDatabasesRequest}
|
|
308
|
-
* @returns A Promise of ListDatabasesResponse
|
|
309
|
-
*/
|
|
310
|
-
listDatabases = (request) => enrichForPagination("databases", this.pageOfListDatabases, request);
|
|
311
|
-
/**
|
|
312
|
-
* Create a new database within a deployment.
|
|
313
|
-
*
|
|
314
|
-
* @param request - The request {@link CreateDatabaseRequest}
|
|
315
|
-
* @returns A Promise of Database
|
|
316
|
-
*/
|
|
317
|
-
createDatabase = (request) => this.client.fetch(
|
|
318
|
-
{
|
|
319
|
-
body: JSON.stringify(
|
|
320
|
-
marshalCreateDatabaseRequest(request, this.client.settings)
|
|
321
|
-
),
|
|
322
|
-
headers: jsonContentHeaders,
|
|
323
|
-
method: "POST",
|
|
324
|
-
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/databases`
|
|
325
|
-
},
|
|
326
|
-
unmarshalDatabase
|
|
327
|
-
);
|
|
328
|
-
/**
|
|
329
|
-
* Delete a database from a deployment.
|
|
330
|
-
*
|
|
331
|
-
* @param request - The request {@link DeleteDatabaseRequest}
|
|
332
|
-
*/
|
|
333
|
-
deleteDatabase = (request) => this.client.fetch(
|
|
334
|
-
{
|
|
335
|
-
method: "DELETE",
|
|
336
|
-
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/databases/${validatePathParam("name", request.name)}`
|
|
337
|
-
}
|
|
338
|
-
);
|
|
339
|
-
}
|
|
340
|
-
export {
|
|
341
|
-
API
|
|
2
|
+
import { marshalCreateDatabaseRequest, marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateUserRequest, marshalUpdateDeploymentRequest, marshalUpdateUserRequest, unmarshalDatabase, unmarshalDeployment, unmarshalEndpoint, unmarshalListDatabasesResponse, unmarshalListDeploymentsResponse, unmarshalListPresetsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalUser } from "./marshalling.gen.js";
|
|
3
|
+
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
|
+
/**
|
|
6
|
+
* Data Warehouse API.
|
|
7
|
+
|
|
8
|
+
This API allows you to manage your Data Warehouse.
|
|
9
|
+
*/
|
|
10
|
+
var API$1 = class extends API {
|
|
11
|
+
/**
|
|
12
|
+
* Locality of this API.
|
|
13
|
+
* type ∈ {'zone','region','global','unspecified'}
|
|
14
|
+
*/
|
|
15
|
+
static LOCALITY = toApiLocality({ regions: ["fr-par"] });
|
|
16
|
+
pageOfListPresets = (request = {}) => this.client.fetch({
|
|
17
|
+
method: "GET",
|
|
18
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/presets`,
|
|
19
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
20
|
+
}, unmarshalListPresetsResponse);
|
|
21
|
+
/**
|
|
22
|
+
* List available presets.
|
|
23
|
+
*
|
|
24
|
+
* @param request - The request {@link ListPresetsRequest}
|
|
25
|
+
* @returns A Promise of ListPresetsResponse
|
|
26
|
+
*/
|
|
27
|
+
listPresets = (request = {}) => enrichForPagination("presets", this.pageOfListPresets, request);
|
|
28
|
+
pageOfListVersions = (request = {}) => this.client.fetch({
|
|
29
|
+
method: "GET",
|
|
30
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/versions`,
|
|
31
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["version", request.version])
|
|
32
|
+
}, unmarshalListVersionsResponse);
|
|
33
|
+
/**
|
|
34
|
+
* List available ClickHouse® versions.
|
|
35
|
+
*
|
|
36
|
+
* @param request - The request {@link ListVersionsRequest}
|
|
37
|
+
* @returns A Promise of ListVersionsResponse
|
|
38
|
+
*/
|
|
39
|
+
listVersions = (request = {}) => enrichForPagination("versions", this.pageOfListVersions, request);
|
|
40
|
+
pageOfListDeployments = (request = {}) => this.client.fetch({
|
|
41
|
+
method: "GET",
|
|
42
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments`,
|
|
43
|
+
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], ["tags", request.tags])
|
|
44
|
+
}, unmarshalListDeploymentsResponse);
|
|
45
|
+
/**
|
|
46
|
+
* List deployments. List all deployments in the specified region, for a given Scaleway Project. By default, the deployments returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags` and `name`. For the `name` parameter, the value you provide will be checked against the whole name string to see if it includes the string you put in the parameter.
|
|
47
|
+
*
|
|
48
|
+
* @param request - The request {@link ListDeploymentsRequest}
|
|
49
|
+
* @returns A Promise of ListDeploymentsResponse
|
|
50
|
+
*/
|
|
51
|
+
listDeployments = (request = {}) => enrichForPagination("deployments", this.pageOfListDeployments, request);
|
|
52
|
+
/**
|
|
53
|
+
* Get a deployment. Retrieve information about a given deployment, specified by the `region` and `deployment_id` parameters. Its full details, including name, status are returned in the response object.
|
|
54
|
+
*
|
|
55
|
+
* @param request - The request {@link GetDeploymentRequest}
|
|
56
|
+
* @returns A Promise of Deployment
|
|
57
|
+
*/
|
|
58
|
+
getDeployment = (request) => this.client.fetch({
|
|
59
|
+
method: "GET",
|
|
60
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
|
|
61
|
+
}, unmarshalDeployment);
|
|
62
|
+
/**
|
|
63
|
+
* Waits for {@link Deployment} to be in a final state.
|
|
64
|
+
*
|
|
65
|
+
* @param request - The request {@link GetDeploymentRequest}
|
|
66
|
+
* @param options - The waiting options
|
|
67
|
+
* @returns A Promise of Deployment
|
|
68
|
+
*/
|
|
69
|
+
waitForDeployment = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DEPLOYMENT_TRANSIENT_STATUSES.includes(res.status))), this.getDeployment, request, options);
|
|
70
|
+
/**
|
|
71
|
+
* Create a deployment. Create a new deployment.
|
|
72
|
+
*
|
|
73
|
+
* @param request - The request {@link CreateDeploymentRequest}
|
|
74
|
+
* @returns A Promise of Deployment
|
|
75
|
+
*/
|
|
76
|
+
createDeployment = (request) => this.client.fetch({
|
|
77
|
+
body: JSON.stringify(marshalCreateDeploymentRequest(request, this.client.settings)),
|
|
78
|
+
headers: jsonContentHeaders,
|
|
79
|
+
method: "POST",
|
|
80
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments`
|
|
81
|
+
}, unmarshalDeployment);
|
|
82
|
+
/**
|
|
83
|
+
* Update a deployment. Update the parameters of a deployment.
|
|
84
|
+
*
|
|
85
|
+
* @param request - The request {@link UpdateDeploymentRequest}
|
|
86
|
+
* @returns A Promise of Deployment
|
|
87
|
+
*/
|
|
88
|
+
updateDeployment = (request) => this.client.fetch({
|
|
89
|
+
body: JSON.stringify(marshalUpdateDeploymentRequest(request, this.client.settings)),
|
|
90
|
+
headers: jsonContentHeaders,
|
|
91
|
+
method: "PATCH",
|
|
92
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
|
|
93
|
+
}, unmarshalDeployment);
|
|
94
|
+
/**
|
|
95
|
+
* Delete a deployment. Delete a given deployment, specified by the `region` and `deployment_id` parameters. Deleting a deployment is permanent, and cannot be undone. Upon deletion, all your data will be lost.
|
|
96
|
+
*
|
|
97
|
+
* @param request - The request {@link DeleteDeploymentRequest}
|
|
98
|
+
* @returns A Promise of Deployment
|
|
99
|
+
*/
|
|
100
|
+
deleteDeployment = (request) => this.client.fetch({
|
|
101
|
+
method: "DELETE",
|
|
102
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
|
|
103
|
+
}, unmarshalDeployment);
|
|
104
|
+
/**
|
|
105
|
+
* Get deployment TLS certificate. Retrieve the TLS certificate associated with a deployment.
|
|
106
|
+
*
|
|
107
|
+
* @param request - The request {@link GetDeploymentCertificateRequest}
|
|
108
|
+
* @returns A Promise of Blob
|
|
109
|
+
*/
|
|
110
|
+
getDeploymentCertificate = (request) => this.client.fetch({
|
|
111
|
+
method: "GET",
|
|
112
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/certificate`,
|
|
113
|
+
urlParams: urlParams(["dl", 1]),
|
|
114
|
+
responseType: "blob"
|
|
115
|
+
});
|
|
116
|
+
/**
|
|
117
|
+
* Start a deployment. Start a stopped deployment.
|
|
118
|
+
*
|
|
119
|
+
* @param request - The request {@link StartDeploymentRequest}
|
|
120
|
+
* @returns A Promise of Deployment
|
|
121
|
+
*/
|
|
122
|
+
startDeployment = (request) => this.client.fetch({
|
|
123
|
+
body: "{}",
|
|
124
|
+
headers: jsonContentHeaders,
|
|
125
|
+
method: "POST",
|
|
126
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/start`
|
|
127
|
+
}, unmarshalDeployment);
|
|
128
|
+
/**
|
|
129
|
+
* Stop a deployment. Stop a running deployment.
|
|
130
|
+
*
|
|
131
|
+
* @param request - The request {@link StopDeploymentRequest}
|
|
132
|
+
* @returns A Promise of Deployment
|
|
133
|
+
*/
|
|
134
|
+
stopDeployment = (request) => this.client.fetch({
|
|
135
|
+
body: "{}",
|
|
136
|
+
headers: jsonContentHeaders,
|
|
137
|
+
method: "POST",
|
|
138
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/stop`
|
|
139
|
+
}, unmarshalDeployment);
|
|
140
|
+
pageOfListUsers = (request) => this.client.fetch({
|
|
141
|
+
method: "GET",
|
|
142
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users`,
|
|
143
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
144
|
+
}, unmarshalListUsersResponse);
|
|
145
|
+
/**
|
|
146
|
+
* List users associated with a deployment.
|
|
147
|
+
*
|
|
148
|
+
* @param request - The request {@link ListUsersRequest}
|
|
149
|
+
* @returns A Promise of ListUsersResponse
|
|
150
|
+
*/
|
|
151
|
+
listUsers = (request) => enrichForPagination("users", this.pageOfListUsers, request);
|
|
152
|
+
/**
|
|
153
|
+
* Create a new user for a deployment.
|
|
154
|
+
*
|
|
155
|
+
* @param request - The request {@link CreateUserRequest}
|
|
156
|
+
* @returns A Promise of User
|
|
157
|
+
*/
|
|
158
|
+
createUser = (request) => this.client.fetch({
|
|
159
|
+
body: JSON.stringify(marshalCreateUserRequest(request, this.client.settings)),
|
|
160
|
+
headers: jsonContentHeaders,
|
|
161
|
+
method: "POST",
|
|
162
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users`
|
|
163
|
+
}, unmarshalUser);
|
|
164
|
+
/**
|
|
165
|
+
* Update an existing user for a deployment.
|
|
166
|
+
*
|
|
167
|
+
* @param request - The request {@link UpdateUserRequest}
|
|
168
|
+
* @returns A Promise of User
|
|
169
|
+
*/
|
|
170
|
+
updateUser = (request) => this.client.fetch({
|
|
171
|
+
body: JSON.stringify(marshalUpdateUserRequest(request, this.client.settings)),
|
|
172
|
+
headers: jsonContentHeaders,
|
|
173
|
+
method: "PATCH",
|
|
174
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("name", request.name)}`
|
|
175
|
+
}, unmarshalUser);
|
|
176
|
+
/**
|
|
177
|
+
* Delete a user from a deployment.
|
|
178
|
+
*
|
|
179
|
+
* @param request - The request {@link DeleteUserRequest}
|
|
180
|
+
*/
|
|
181
|
+
deleteUser = (request) => this.client.fetch({
|
|
182
|
+
body: "{}",
|
|
183
|
+
headers: jsonContentHeaders,
|
|
184
|
+
method: "DELETE",
|
|
185
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/users/${validatePathParam("name", request.name)}`
|
|
186
|
+
});
|
|
187
|
+
/**
|
|
188
|
+
* Delete an endpoint from a deployment.
|
|
189
|
+
*
|
|
190
|
+
* @param request - The request {@link DeleteEndpointRequest}
|
|
191
|
+
*/
|
|
192
|
+
deleteEndpoint = (request) => this.client.fetch({
|
|
193
|
+
method: "DELETE",
|
|
194
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
195
|
+
});
|
|
196
|
+
/**
|
|
197
|
+
* Create a new endpoint for a deployment.
|
|
198
|
+
*
|
|
199
|
+
* @param request - The request {@link CreateEndpointRequest}
|
|
200
|
+
* @returns A Promise of Endpoint
|
|
201
|
+
*/
|
|
202
|
+
createEndpoint = (request) => this.client.fetch({
|
|
203
|
+
body: JSON.stringify(marshalCreateEndpointRequest(request, this.client.settings)),
|
|
204
|
+
headers: jsonContentHeaders,
|
|
205
|
+
method: "POST",
|
|
206
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints`
|
|
207
|
+
}, unmarshalEndpoint);
|
|
208
|
+
pageOfListDatabases = (request) => this.client.fetch({
|
|
209
|
+
method: "GET",
|
|
210
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/databases`,
|
|
211
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
212
|
+
}, unmarshalListDatabasesResponse);
|
|
213
|
+
/**
|
|
214
|
+
* List databases within a deployment.
|
|
215
|
+
*
|
|
216
|
+
* @param request - The request {@link ListDatabasesRequest}
|
|
217
|
+
* @returns A Promise of ListDatabasesResponse
|
|
218
|
+
*/
|
|
219
|
+
listDatabases = (request) => enrichForPagination("databases", this.pageOfListDatabases, request);
|
|
220
|
+
/**
|
|
221
|
+
* Create a new database within a deployment.
|
|
222
|
+
*
|
|
223
|
+
* @param request - The request {@link CreateDatabaseRequest}
|
|
224
|
+
* @returns A Promise of Database
|
|
225
|
+
*/
|
|
226
|
+
createDatabase = (request) => this.client.fetch({
|
|
227
|
+
body: JSON.stringify(marshalCreateDatabaseRequest(request, this.client.settings)),
|
|
228
|
+
headers: jsonContentHeaders,
|
|
229
|
+
method: "POST",
|
|
230
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/databases`
|
|
231
|
+
}, unmarshalDatabase);
|
|
232
|
+
/**
|
|
233
|
+
* Delete a database from a deployment.
|
|
234
|
+
*
|
|
235
|
+
* @param request - The request {@link DeleteDatabaseRequest}
|
|
236
|
+
*/
|
|
237
|
+
deleteDatabase = (request) => this.client.fetch({
|
|
238
|
+
method: "DELETE",
|
|
239
|
+
path: `/datawarehouse/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/databases/${validatePathParam("name", request.name)}`
|
|
240
|
+
});
|
|
342
241
|
};
|
|
242
|
+
export { API$1 as API };
|