@scaleway/sdk 1.14.0 → 1.16.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/api/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +803 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/content.gen.js +4 -1
- package/dist/api/instance/v1/index.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +27 -4
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/redis/v1/marshalling.gen.js +1 -0
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +295 -246
- package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
- package/dist/api/tem/v1alpha1/api.gen.js +182 -147
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/api/webhosting/v1alpha1/content.gen.js +1 -1
- package/dist/index.cjs +924 -453
- package/dist/index.d.ts +2152 -1558
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +2 -2
- package/package.json +2 -2
|
@@ -19,17 +19,15 @@ const jsonContentHeaders = {
|
|
|
19
19
|
* Grafana for dashboarding to visualize them.
|
|
20
20
|
*/
|
|
21
21
|
class API extends API$1 {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
this.activateCockpit = function (request) {
|
|
22
|
+
/**
|
|
23
|
+
* Activate a Cockpit. Activate the Cockpit of the specified Project ID.
|
|
24
|
+
*
|
|
25
|
+
* @param request - The request {@link ActivateCockpitRequest}
|
|
26
|
+
* @returns A Promise of Cockpit
|
|
27
|
+
*/
|
|
28
|
+
activateCockpit = (() => {
|
|
29
|
+
var _this = this;
|
|
30
|
+
return function (request) {
|
|
33
31
|
if (request === void 0) {
|
|
34
32
|
request = {};
|
|
35
33
|
}
|
|
@@ -40,353 +38,431 @@ class API extends API$1 {
|
|
|
40
38
|
path: `/cockpit/v1beta1/activate`
|
|
41
39
|
}, unmarshalCockpit);
|
|
42
40
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
})();
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get a Cockpit. Retrieve the Cockpit of the specified Project ID.
|
|
45
|
+
*
|
|
46
|
+
* @param request - The request {@link GetCockpitRequest}
|
|
47
|
+
* @returns A Promise of Cockpit
|
|
48
|
+
*/
|
|
49
|
+
getCockpit = (() => {
|
|
50
|
+
var _this2 = this;
|
|
51
|
+
return function (request) {
|
|
50
52
|
if (request === void 0) {
|
|
51
53
|
request = {};
|
|
52
54
|
}
|
|
53
|
-
return
|
|
55
|
+
return _this2.client.fetch({
|
|
54
56
|
method: 'GET',
|
|
55
57
|
path: `/cockpit/v1beta1/cockpit`,
|
|
56
|
-
urlParams: urlParams(['project_id', request.projectId ??
|
|
58
|
+
urlParams: urlParams(['project_id', request.projectId ?? _this2.client.settings.defaultProjectId])
|
|
57
59
|
}, unmarshalCockpit);
|
|
58
60
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
})();
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Waits for {@link Cockpit} to be in a final state.
|
|
65
|
+
*
|
|
66
|
+
* @param request - The request {@link GetCockpitRequest}
|
|
67
|
+
* @param options - The waiting options
|
|
68
|
+
* @returns A Promise of Cockpit
|
|
69
|
+
*/
|
|
70
|
+
waitForCockpit = (() => {
|
|
71
|
+
var _this3 = this;
|
|
72
|
+
return function (request, options) {
|
|
67
73
|
if (request === void 0) {
|
|
68
74
|
request = {};
|
|
69
75
|
}
|
|
70
|
-
return waitForResource(options?.stop ?? (res => Promise.resolve(!COCKPIT_TRANSIENT_STATUSES.includes(res.status))),
|
|
76
|
+
return waitForResource(options?.stop ?? (res => Promise.resolve(!COCKPIT_TRANSIENT_STATUSES.includes(res.status))), _this3.getCockpit, request, options);
|
|
71
77
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
})();
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get Cockpit metrics. Get metrics from your Cockpit with the specified
|
|
82
|
+
* Project ID.
|
|
83
|
+
*
|
|
84
|
+
* @param request - The request {@link GetCockpitMetricsRequest}
|
|
85
|
+
* @returns A Promise of CockpitMetrics
|
|
86
|
+
*/
|
|
87
|
+
getCockpitMetrics = (() => {
|
|
88
|
+
var _this4 = this;
|
|
89
|
+
return function (request) {
|
|
80
90
|
if (request === void 0) {
|
|
81
91
|
request = {};
|
|
82
92
|
}
|
|
83
|
-
return
|
|
93
|
+
return _this4.client.fetch({
|
|
84
94
|
method: 'GET',
|
|
85
95
|
path: `/cockpit/v1beta1/cockpit/metrics`,
|
|
86
|
-
urlParams: urlParams(['end_date', request.endDate], ['metric_name', request.metricName], ['project_id', request.projectId ??
|
|
96
|
+
urlParams: urlParams(['end_date', request.endDate], ['metric_name', request.metricName], ['project_id', request.projectId ?? _this4.client.settings.defaultProjectId], ['start_date', request.startDate])
|
|
87
97
|
}, unmarshalCockpitMetrics);
|
|
88
98
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
})();
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Deactivate a Cockpit. Deactivate the Cockpit of the specified Project ID.
|
|
103
|
+
*
|
|
104
|
+
* @param request - The request {@link DeactivateCockpitRequest}
|
|
105
|
+
* @returns A Promise of Cockpit
|
|
106
|
+
*/
|
|
107
|
+
deactivateCockpit = (() => {
|
|
108
|
+
var _this5 = this;
|
|
109
|
+
return function (request) {
|
|
96
110
|
if (request === void 0) {
|
|
97
111
|
request = {};
|
|
98
112
|
}
|
|
99
|
-
return
|
|
100
|
-
body: JSON.stringify(marshalDeactivateCockpitRequest(request,
|
|
113
|
+
return _this5.client.fetch({
|
|
114
|
+
body: JSON.stringify(marshalDeactivateCockpitRequest(request, _this5.client.settings)),
|
|
101
115
|
headers: jsonContentHeaders,
|
|
102
116
|
method: 'POST',
|
|
103
117
|
path: `/cockpit/v1beta1/deactivate`
|
|
104
118
|
}, unmarshalCockpit);
|
|
105
119
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
})();
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Reset a Grafana. Reset your Cockpit's Grafana associated with the specified
|
|
124
|
+
* Project ID.
|
|
125
|
+
*
|
|
126
|
+
* @param request - The request {@link ResetCockpitGrafanaRequest}
|
|
127
|
+
* @returns A Promise of Cockpit
|
|
128
|
+
*/
|
|
129
|
+
resetCockpitGrafana = (() => {
|
|
130
|
+
var _this6 = this;
|
|
131
|
+
return function (request) {
|
|
114
132
|
if (request === void 0) {
|
|
115
133
|
request = {};
|
|
116
134
|
}
|
|
117
|
-
return
|
|
118
|
-
body: JSON.stringify(marshalResetCockpitGrafanaRequest(request,
|
|
135
|
+
return _this6.client.fetch({
|
|
136
|
+
body: JSON.stringify(marshalResetCockpitGrafanaRequest(request, _this6.client.settings)),
|
|
119
137
|
headers: jsonContentHeaders,
|
|
120
138
|
method: 'POST',
|
|
121
139
|
path: `/cockpit/v1beta1/reset-grafana`
|
|
122
140
|
}, unmarshalCockpit);
|
|
123
141
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
142
|
+
})();
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Create a token. Create a token associated with the specified Project ID.
|
|
146
|
+
*
|
|
147
|
+
* @param request - The request {@link CreateTokenRequest}
|
|
148
|
+
* @returns A Promise of Token
|
|
149
|
+
*/
|
|
150
|
+
createToken = (() => {
|
|
151
|
+
var _this7 = this;
|
|
152
|
+
return function (request) {
|
|
131
153
|
if (request === void 0) {
|
|
132
154
|
request = {};
|
|
133
155
|
}
|
|
134
|
-
return
|
|
135
|
-
body: JSON.stringify(marshalCreateTokenRequest(request,
|
|
156
|
+
return _this7.client.fetch({
|
|
157
|
+
body: JSON.stringify(marshalCreateTokenRequest(request, _this7.client.settings)),
|
|
136
158
|
headers: jsonContentHeaders,
|
|
137
159
|
method: 'POST',
|
|
138
160
|
path: `/cockpit/v1beta1/tokens`
|
|
139
161
|
}, unmarshalToken);
|
|
140
162
|
};
|
|
141
|
-
|
|
163
|
+
})();
|
|
164
|
+
pageOfListTokens = (() => {
|
|
165
|
+
var _this8 = this;
|
|
166
|
+
return function (request) {
|
|
142
167
|
if (request === void 0) {
|
|
143
168
|
request = {};
|
|
144
169
|
}
|
|
145
|
-
return
|
|
170
|
+
return _this8.client.fetch({
|
|
146
171
|
method: 'GET',
|
|
147
172
|
path: `/cockpit/v1beta1/tokens`,
|
|
148
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ??
|
|
173
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this8.client.settings.defaultProjectId])
|
|
149
174
|
}, unmarshalListTokensResponse);
|
|
150
175
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
176
|
+
})();
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* List tokens. Get a list of tokens associated with the specified Project ID.
|
|
180
|
+
*
|
|
181
|
+
* @param request - The request {@link ListTokensRequest}
|
|
182
|
+
* @returns A Promise of ListTokensResponse
|
|
183
|
+
*/
|
|
184
|
+
listTokens = (() => {
|
|
185
|
+
var _this9 = this;
|
|
186
|
+
return function (request) {
|
|
158
187
|
if (request === void 0) {
|
|
159
188
|
request = {};
|
|
160
189
|
}
|
|
161
|
-
return enrichForPagination('tokens',
|
|
190
|
+
return enrichForPagination('tokens', _this9.pageOfListTokens, request);
|
|
162
191
|
};
|
|
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
|
-
|
|
192
|
+
})();
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Get a token. Retrieve the token associated with the specified token ID.
|
|
196
|
+
*
|
|
197
|
+
* @param request - The request {@link GetTokenRequest}
|
|
198
|
+
* @returns A Promise of Token
|
|
199
|
+
*/
|
|
200
|
+
getToken = request => this.client.fetch({
|
|
201
|
+
method: 'GET',
|
|
202
|
+
path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
203
|
+
}, unmarshalToken);
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Delete a token. Delete the token associated with the specified token ID.
|
|
207
|
+
*
|
|
208
|
+
* @param request - The request {@link DeleteTokenRequest}
|
|
209
|
+
*/
|
|
210
|
+
deleteToken = request => this.client.fetch({
|
|
211
|
+
method: 'DELETE',
|
|
212
|
+
path: `/cockpit/v1beta1/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Create a contact point. Create a contact point to receive alerts for the
|
|
217
|
+
* default receiver.
|
|
218
|
+
*
|
|
219
|
+
* @param request - The request {@link CreateContactPointRequest}
|
|
220
|
+
* @returns A Promise of ContactPoint
|
|
221
|
+
*/
|
|
222
|
+
createContactPoint = (() => {
|
|
223
|
+
var _this10 = this;
|
|
224
|
+
return function (request) {
|
|
190
225
|
if (request === void 0) {
|
|
191
226
|
request = {};
|
|
192
227
|
}
|
|
193
|
-
return
|
|
194
|
-
body: JSON.stringify(marshalCreateContactPointRequest(request,
|
|
228
|
+
return _this10.client.fetch({
|
|
229
|
+
body: JSON.stringify(marshalCreateContactPointRequest(request, _this10.client.settings)),
|
|
195
230
|
headers: jsonContentHeaders,
|
|
196
231
|
method: 'POST',
|
|
197
232
|
path: `/cockpit/v1beta1/contact-points`
|
|
198
233
|
}, unmarshalContactPoint);
|
|
199
234
|
};
|
|
200
|
-
|
|
235
|
+
})();
|
|
236
|
+
pageOfListContactPoints = (() => {
|
|
237
|
+
var _this11 = this;
|
|
238
|
+
return function (request) {
|
|
201
239
|
if (request === void 0) {
|
|
202
240
|
request = {};
|
|
203
241
|
}
|
|
204
|
-
return
|
|
242
|
+
return _this11.client.fetch({
|
|
205
243
|
method: 'GET',
|
|
206
244
|
path: `/cockpit/v1beta1/contact-points`,
|
|
207
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ??
|
|
245
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this11.client.settings.defaultProjectId])
|
|
208
246
|
}, unmarshalListContactPointsResponse);
|
|
209
247
|
};
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
248
|
+
})();
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* List contact points. Get a list of contact points for the Cockpit
|
|
252
|
+
* associated with the specified Project ID.
|
|
253
|
+
*
|
|
254
|
+
* @param request - The request {@link ListContactPointsRequest}
|
|
255
|
+
* @returns A Promise of ListContactPointsResponse
|
|
256
|
+
*/
|
|
257
|
+
listContactPoints = (() => {
|
|
258
|
+
var _this12 = this;
|
|
259
|
+
return function (request) {
|
|
218
260
|
if (request === void 0) {
|
|
219
261
|
request = {};
|
|
220
262
|
}
|
|
221
|
-
return enrichForPagination('contactPoints',
|
|
263
|
+
return enrichForPagination('contactPoints', _this12.pageOfListContactPoints, request);
|
|
222
264
|
};
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
265
|
+
})();
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Delete an alert contact point. Delete a contact point for the default
|
|
269
|
+
* receiver.
|
|
270
|
+
*
|
|
271
|
+
* @param request - The request {@link DeleteContactPointRequest}
|
|
272
|
+
*/
|
|
273
|
+
deleteContactPoint = (() => {
|
|
274
|
+
var _this13 = this;
|
|
275
|
+
return function (request) {
|
|
230
276
|
if (request === void 0) {
|
|
231
277
|
request = {};
|
|
232
278
|
}
|
|
233
|
-
return
|
|
234
|
-
body: JSON.stringify(marshalDeleteContactPointRequest(request,
|
|
279
|
+
return _this13.client.fetch({
|
|
280
|
+
body: JSON.stringify(marshalDeleteContactPointRequest(request, _this13.client.settings)),
|
|
235
281
|
headers: jsonContentHeaders,
|
|
236
282
|
method: 'POST',
|
|
237
283
|
path: `/cockpit/v1beta1/delete-contact-point`
|
|
238
284
|
});
|
|
239
285
|
};
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
286
|
+
})();
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Enable managed alerts. Enable the sending of managed alerts for the
|
|
290
|
+
* specified Project's Cockpit.
|
|
291
|
+
*
|
|
292
|
+
* @param request - The request {@link EnableManagedAlertsRequest}
|
|
293
|
+
*/
|
|
294
|
+
enableManagedAlerts = (() => {
|
|
295
|
+
var _this14 = this;
|
|
296
|
+
return function (request) {
|
|
247
297
|
if (request === void 0) {
|
|
248
298
|
request = {};
|
|
249
299
|
}
|
|
250
|
-
return
|
|
251
|
-
body: JSON.stringify(marshalEnableManagedAlertsRequest(request,
|
|
300
|
+
return _this14.client.fetch({
|
|
301
|
+
body: JSON.stringify(marshalEnableManagedAlertsRequest(request, _this14.client.settings)),
|
|
252
302
|
headers: jsonContentHeaders,
|
|
253
303
|
method: 'POST',
|
|
254
304
|
path: `/cockpit/v1beta1/enable-managed-alerts`
|
|
255
305
|
});
|
|
256
306
|
};
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
307
|
+
})();
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Disable managed alerts. Disable the sending of managed alerts for the
|
|
311
|
+
* specified Project's Cockpit.
|
|
312
|
+
*
|
|
313
|
+
* @param request - The request {@link DisableManagedAlertsRequest}
|
|
314
|
+
*/
|
|
315
|
+
disableManagedAlerts = (() => {
|
|
316
|
+
var _this15 = this;
|
|
317
|
+
return function (request) {
|
|
264
318
|
if (request === void 0) {
|
|
265
319
|
request = {};
|
|
266
320
|
}
|
|
267
|
-
return
|
|
268
|
-
body: JSON.stringify(marshalDisableManagedAlertsRequest(request,
|
|
321
|
+
return _this15.client.fetch({
|
|
322
|
+
body: JSON.stringify(marshalDisableManagedAlertsRequest(request, _this15.client.settings)),
|
|
269
323
|
headers: jsonContentHeaders,
|
|
270
324
|
method: 'POST',
|
|
271
325
|
path: `/cockpit/v1beta1/disable-managed-alerts`
|
|
272
326
|
});
|
|
273
327
|
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
328
|
+
})();
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Trigger a test alert. Trigger a test alert to all of the Cockpit's
|
|
332
|
+
* receivers.
|
|
333
|
+
*
|
|
334
|
+
* @param request - The request {@link TriggerTestAlertRequest}
|
|
335
|
+
*/
|
|
336
|
+
triggerTestAlert = (() => {
|
|
337
|
+
var _this16 = this;
|
|
338
|
+
return function (request) {
|
|
281
339
|
if (request === void 0) {
|
|
282
340
|
request = {};
|
|
283
341
|
}
|
|
284
|
-
return
|
|
285
|
-
body: JSON.stringify(marshalTriggerTestAlertRequest(request,
|
|
342
|
+
return _this16.client.fetch({
|
|
343
|
+
body: JSON.stringify(marshalTriggerTestAlertRequest(request, _this16.client.settings)),
|
|
286
344
|
headers: jsonContentHeaders,
|
|
287
345
|
method: 'POST',
|
|
288
346
|
path: `/cockpit/v1beta1/trigger-test-alert`
|
|
289
347
|
});
|
|
290
348
|
};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
349
|
+
})();
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Create a Grafana user. Create a Grafana user for your Cockpit's Grafana
|
|
353
|
+
* instance. Make sure you save the automatically-generated password and the
|
|
354
|
+
* Grafana user ID.
|
|
355
|
+
*
|
|
356
|
+
* @param request - The request {@link CreateGrafanaUserRequest}
|
|
357
|
+
* @returns A Promise of GrafanaUser
|
|
358
|
+
*/
|
|
359
|
+
createGrafanaUser = request => this.client.fetch({
|
|
360
|
+
body: JSON.stringify(marshalCreateGrafanaUserRequest(request, this.client.settings)),
|
|
361
|
+
headers: jsonContentHeaders,
|
|
362
|
+
method: 'POST',
|
|
363
|
+
path: `/cockpit/v1beta1/grafana-users`
|
|
364
|
+
}, unmarshalGrafanaUser);
|
|
365
|
+
pageOfListGrafanaUsers = (() => {
|
|
366
|
+
var _this17 = this;
|
|
367
|
+
return function (request) {
|
|
306
368
|
if (request === void 0) {
|
|
307
369
|
request = {};
|
|
308
370
|
}
|
|
309
|
-
return
|
|
371
|
+
return _this17.client.fetch({
|
|
310
372
|
method: 'GET',
|
|
311
373
|
path: `/cockpit/v1beta1/grafana-users`,
|
|
312
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'login_asc'], ['page', request.page], ['page_size', request.pageSize ??
|
|
374
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'login_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this17.client.settings.defaultProjectId])
|
|
313
375
|
}, unmarshalListGrafanaUsersResponse);
|
|
314
376
|
};
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
377
|
+
})();
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* List Grafana users. Get a list of Grafana users who are able to connect to
|
|
381
|
+
* the Cockpit's Grafana instance.
|
|
382
|
+
*
|
|
383
|
+
* @param request - The request {@link ListGrafanaUsersRequest}
|
|
384
|
+
* @returns A Promise of ListGrafanaUsersResponse
|
|
385
|
+
*/
|
|
386
|
+
listGrafanaUsers = (() => {
|
|
387
|
+
var _this18 = this;
|
|
388
|
+
return function (request) {
|
|
323
389
|
if (request === void 0) {
|
|
324
390
|
request = {};
|
|
325
391
|
}
|
|
326
|
-
return enrichForPagination('grafanaUsers',
|
|
392
|
+
return enrichForPagination('grafanaUsers', _this18.pageOfListGrafanaUsers, request);
|
|
327
393
|
};
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
394
|
+
})();
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Delete a Grafana user. Delete a Grafana user from a Grafana instance,
|
|
398
|
+
* specified by the Cockpit's Project ID and the Grafana user ID.
|
|
399
|
+
*
|
|
400
|
+
* @param request - The request {@link DeleteGrafanaUserRequest}
|
|
401
|
+
*/
|
|
402
|
+
deleteGrafanaUser = request => this.client.fetch({
|
|
403
|
+
body: JSON.stringify(marshalDeleteGrafanaUserRequest(request, this.client.settings)),
|
|
404
|
+
headers: jsonContentHeaders,
|
|
405
|
+
method: 'POST',
|
|
406
|
+
path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/delete`
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Reset a Grafana user's password. Reset a Grafana user's password specified
|
|
411
|
+
* by the Cockpit's Project ID and the Grafana user ID.
|
|
412
|
+
*
|
|
413
|
+
* @param request - The request {@link ResetGrafanaUserPasswordRequest}
|
|
414
|
+
* @returns A Promise of GrafanaUser
|
|
415
|
+
*/
|
|
416
|
+
resetGrafanaUserPassword = request => this.client.fetch({
|
|
417
|
+
body: JSON.stringify(marshalResetGrafanaUserPasswordRequest(request, this.client.settings)),
|
|
418
|
+
headers: jsonContentHeaders,
|
|
419
|
+
method: 'POST',
|
|
420
|
+
path: `/cockpit/v1beta1/grafana-users/${validatePathParam('grafanaUserId', request.grafanaUserId)}/reset-password`
|
|
421
|
+
}, unmarshalGrafanaUser);
|
|
422
|
+
pageOfListPlans = (() => {
|
|
423
|
+
var _this19 = this;
|
|
424
|
+
return function (request) {
|
|
354
425
|
if (request === void 0) {
|
|
355
426
|
request = {};
|
|
356
427
|
}
|
|
357
|
-
return
|
|
428
|
+
return _this19.client.fetch({
|
|
358
429
|
method: 'GET',
|
|
359
430
|
path: `/cockpit/v1beta1/plans`,
|
|
360
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ??
|
|
431
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize])
|
|
361
432
|
}, unmarshalListPlansResponse);
|
|
362
433
|
};
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
434
|
+
})();
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* List pricing plans. Get a list of all pricing plans available.
|
|
438
|
+
*
|
|
439
|
+
* @param request - The request {@link ListPlansRequest}
|
|
440
|
+
* @returns A Promise of ListPlansResponse
|
|
441
|
+
*/
|
|
442
|
+
listPlans = (() => {
|
|
443
|
+
var _this20 = this;
|
|
444
|
+
return function (request) {
|
|
370
445
|
if (request === void 0) {
|
|
371
446
|
request = {};
|
|
372
447
|
}
|
|
373
|
-
return enrichForPagination('plans',
|
|
448
|
+
return enrichForPagination('plans', _this20.pageOfListPlans, request);
|
|
374
449
|
};
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
450
|
+
})();
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Select pricing plan. Select your chosen pricing plan for your Cockpit,
|
|
454
|
+
* specifying the Cockpit's Project ID and the pricing plan's ID in the
|
|
455
|
+
* request.
|
|
456
|
+
*
|
|
457
|
+
* @param request - The request {@link SelectPlanRequest}
|
|
458
|
+
* @returns A Promise of SelectPlanResponse
|
|
459
|
+
*/
|
|
460
|
+
selectPlan = request => this.client.fetch({
|
|
461
|
+
body: JSON.stringify(marshalSelectPlanRequest(request, this.client.settings)),
|
|
462
|
+
headers: jsonContentHeaders,
|
|
463
|
+
method: 'POST',
|
|
464
|
+
path: `/cockpit/v1beta1/select-plan`
|
|
465
|
+
}, unmarshalSelectPlanResponse);
|
|
390
466
|
}
|
|
391
467
|
|
|
392
468
|
export { API };
|