levelfour 1.8.0 → 1.9.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/resources/accounts/client/Client.d.mts +34 -0
- package/dist/api/resources/accounts/client/Client.d.ts +34 -0
- package/dist/api/resources/accounts/client/Client.js +204 -0
- package/dist/api/resources/accounts/client/Client.mjs +204 -0
- package/dist/api/types/AzureSubscriptionItem.d.mts +2 -0
- package/dist/api/types/AzureSubscriptionItem.d.ts +2 -0
- package/dist/api/types/BlockerTotals.d.mts +12 -0
- package/dist/api/types/BlockerTotals.d.ts +12 -0
- package/dist/api/types/ConsolidationBlocker.d.mts +13 -0
- package/dist/api/types/ConsolidationBlocker.d.ts +13 -0
- package/dist/api/types/ConsolidationBlocker.js +4 -0
- package/dist/api/types/ConsolidationBlocker.mjs +4 -0
- package/dist/api/types/ContainerDetail.d.mts +2 -0
- package/dist/api/types/ContainerDetail.d.ts +2 -0
- package/dist/api/types/ContainerJvmDay.d.mts +20 -0
- package/dist/api/types/ContainerJvmDay.d.ts +20 -0
- package/dist/api/types/ContainerJvmDay.js +17 -0
- package/dist/api/types/ContainerJvmDay.mjs +1 -0
- package/dist/api/types/ContainerJvmMeasured.d.mts +50 -0
- package/dist/api/types/ContainerJvmMeasured.d.ts +50 -0
- package/dist/api/types/ContainerJvmMeasured.js +41 -0
- package/dist/api/types/ContainerJvmMeasured.mjs +17 -0
- package/dist/api/types/FleetNodePool.d.mts +2 -0
- package/dist/api/types/FleetNodePool.d.ts +2 -0
- package/dist/api/types/FleetWorkloadFacets.d.mts +5 -0
- package/dist/api/types/FleetWorkloadFacets.d.ts +5 -0
- package/dist/api/types/FleetWorkloadFacets.js +17 -0
- package/dist/api/types/FleetWorkloadFacets.mjs +1 -0
- package/dist/api/types/FleetWorkloadListData.d.mts +1 -0
- package/dist/api/types/FleetWorkloadListData.d.ts +1 -0
- package/dist/api/types/Indicator.d.mts +1 -0
- package/dist/api/types/Indicator.d.ts +1 -0
- package/dist/api/types/Indicator.js +1 -0
- package/dist/api/types/Indicator.mjs +1 -0
- package/dist/api/types/IndicatorCount.d.mts +1 -0
- package/dist/api/types/IndicatorCount.d.ts +1 -0
- package/dist/api/types/IndicatorCount.js +1 -0
- package/dist/api/types/IndicatorCount.mjs +1 -0
- package/dist/api/types/JvmFlags.d.mts +38 -0
- package/dist/api/types/JvmFlags.d.ts +38 -0
- package/dist/api/types/JvmFlags.js +41 -0
- package/dist/api/types/JvmFlags.mjs +17 -0
- package/dist/api/types/JvmMeasured.d.mts +52 -0
- package/dist/api/types/JvmMeasured.d.ts +52 -0
- package/dist/api/types/JvmMeasured.js +41 -0
- package/dist/api/types/JvmMeasured.mjs +17 -0
- package/dist/api/types/JvmReaderHealth.d.mts +8 -0
- package/dist/api/types/JvmReaderHealth.d.ts +8 -0
- package/dist/api/types/JvmReaderHealth.js +17 -0
- package/dist/api/types/JvmReaderHealth.mjs +1 -0
- package/dist/api/types/JvmReaderNodeHealth.d.mts +21 -0
- package/dist/api/types/JvmReaderNodeHealth.d.ts +21 -0
- package/dist/api/types/JvmReaderNodeHealth.js +37 -0
- package/dist/api/types/JvmReaderNodeHealth.mjs +13 -0
- package/dist/api/types/JvmReaderResponse.d.mts +6 -0
- package/dist/api/types/JvmReaderResponse.d.ts +6 -0
- package/dist/api/types/JvmReaderResponse.js +17 -0
- package/dist/api/types/JvmReaderResponse.mjs +1 -0
- package/dist/api/types/KarpenterPool.d.mts +2 -0
- package/dist/api/types/KarpenterPool.d.ts +2 -0
- package/dist/api/types/NodePoolUsage.d.mts +2 -0
- package/dist/api/types/NodePoolUsage.d.ts +2 -0
- package/dist/api/types/ReliabilityFacetCount.d.mts +17 -0
- package/dist/api/types/ReliabilityFacetCount.d.ts +17 -0
- package/dist/api/types/ReliabilityFacetCount.js +41 -0
- package/dist/api/types/ReliabilityFacetCount.mjs +17 -0
- package/dist/api/types/ReliabilityTotals.d.mts +2 -2
- package/dist/api/types/ReliabilityTotals.d.ts +2 -2
- package/dist/api/types/TerraformIntegrationData.d.mts +13 -0
- package/dist/api/types/TerraformIntegrationData.d.ts +13 -0
- package/dist/api/types/TerraformIntegrationData.js +17 -0
- package/dist/api/types/TerraformIntegrationData.mjs +1 -0
- package/dist/api/types/TerraformIntegrationResponse.d.mts +6 -0
- package/dist/api/types/TerraformIntegrationResponse.d.ts +6 -0
- package/dist/api/types/TerraformIntegrationResponse.js +17 -0
- package/dist/api/types/TerraformIntegrationResponse.mjs +1 -0
- package/dist/api/types/UnhealthyReason.d.mts +16 -0
- package/dist/api/types/UnhealthyReason.d.ts +16 -0
- package/dist/api/types/UnhealthyReason.js +35 -0
- package/dist/api/types/UnhealthyReason.mjs +11 -0
- package/dist/api/types/WorkloadJvm.d.mts +15 -0
- package/dist/api/types/WorkloadJvm.d.ts +15 -0
- package/dist/api/types/WorkloadJvm.js +17 -0
- package/dist/api/types/WorkloadJvm.mjs +1 -0
- package/dist/api/types/WorkloadListData.d.mts +1 -1
- package/dist/api/types/WorkloadListData.d.ts +1 -1
- package/dist/api/types/WorkloadListItem.d.mts +94 -0
- package/dist/api/types/WorkloadListItem.d.ts +94 -0
- package/dist/api/types/WorkloadListItem.js +42 -0
- package/dist/api/types/WorkloadListItem.mjs +18 -0
- package/dist/api/types/index.d.mts +14 -0
- package/dist/api/types/index.d.ts +14 -0
- package/dist/api/types/index.js +28 -0
- package/dist/api/types/index.mjs +14 -0
- package/dist/version.d.mts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -30,6 +30,40 @@ export declare class AccountsClient {
|
|
|
30
30
|
*/
|
|
31
31
|
createIntegration(request: LevelFour.CreateIntegrationRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise<LevelFour.CreateIntegrationResponse>;
|
|
32
32
|
private __createIntegration;
|
|
33
|
+
/**
|
|
34
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
|
+
*
|
|
36
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
37
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
38
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
39
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
40
|
+
* @throws {@link LevelFour.ConflictError}
|
|
41
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
42
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
43
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.accounts.ensureTerraformIntegration()
|
|
47
|
+
*/
|
|
48
|
+
ensureTerraformIntegration(requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise<LevelFour.TerraformIntegrationResponse>;
|
|
49
|
+
private __ensureTerraformIntegration;
|
|
50
|
+
/**
|
|
51
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
54
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
55
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
56
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
57
|
+
* @throws {@link LevelFour.ConflictError}
|
|
58
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
59
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
60
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.accounts.rotateTerraformIntegration()
|
|
64
|
+
*/
|
|
65
|
+
rotateTerraformIntegration(requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise<LevelFour.TerraformIntegrationResponse>;
|
|
66
|
+
private __rotateTerraformIntegration;
|
|
33
67
|
/**
|
|
34
68
|
* @param {LevelFour.GetIntegrationStatusApiV1AccountsIntegrationsIntegrationIdGetRequest} request
|
|
35
69
|
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -30,6 +30,40 @@ export declare class AccountsClient {
|
|
|
30
30
|
*/
|
|
31
31
|
createIntegration(request: LevelFour.CreateIntegrationRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise<LevelFour.CreateIntegrationResponse>;
|
|
32
32
|
private __createIntegration;
|
|
33
|
+
/**
|
|
34
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
|
+
*
|
|
36
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
37
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
38
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
39
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
40
|
+
* @throws {@link LevelFour.ConflictError}
|
|
41
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
42
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
43
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.accounts.ensureTerraformIntegration()
|
|
47
|
+
*/
|
|
48
|
+
ensureTerraformIntegration(requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise<LevelFour.TerraformIntegrationResponse>;
|
|
49
|
+
private __ensureTerraformIntegration;
|
|
50
|
+
/**
|
|
51
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
54
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
55
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
56
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
57
|
+
* @throws {@link LevelFour.ConflictError}
|
|
58
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
59
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
60
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.accounts.rotateTerraformIntegration()
|
|
64
|
+
*/
|
|
65
|
+
rotateTerraformIntegration(requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise<LevelFour.TerraformIntegrationResponse>;
|
|
66
|
+
private __rotateTerraformIntegration;
|
|
33
67
|
/**
|
|
34
68
|
* @param {LevelFour.GetIntegrationStatusApiV1AccountsIntegrationsIntegrationIdGetRequest} request
|
|
35
69
|
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -147,6 +147,210 @@ class AccountsClient {
|
|
|
147
147
|
"/api/v1/accounts/integrations"
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
|
+
*
|
|
153
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
154
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
155
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
156
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
157
|
+
* @throws {@link LevelFour.ConflictError}
|
|
158
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
159
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
160
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* await client.accounts.ensureTerraformIntegration()
|
|
164
|
+
*/
|
|
165
|
+
ensureTerraformIntegration(requestOptions) {
|
|
166
|
+
return core.HttpResponsePromise.fromPromise(this.__ensureTerraformIntegration(requestOptions));
|
|
167
|
+
}
|
|
168
|
+
async __ensureTerraformIntegration(requestOptions) {
|
|
169
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
170
|
+
const _headers = (0, import_headers.mergeHeaders)(
|
|
171
|
+
_authRequest.headers,
|
|
172
|
+
this._options?.headers,
|
|
173
|
+
requestOptions?.headers
|
|
174
|
+
);
|
|
175
|
+
const _response = await core.fetcher({
|
|
176
|
+
url: core.url.join(
|
|
177
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
178
|
+
"api/v1/accounts/integrations/terraform"
|
|
179
|
+
),
|
|
180
|
+
method: "POST",
|
|
181
|
+
headers: _headers,
|
|
182
|
+
queryParameters: requestOptions?.queryParams,
|
|
183
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
184
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
185
|
+
abortSignal: requestOptions?.abortSignal,
|
|
186
|
+
fetchFn: this._options?.fetch,
|
|
187
|
+
logging: this._options.logging
|
|
188
|
+
});
|
|
189
|
+
if (_response.ok) {
|
|
190
|
+
return {
|
|
191
|
+
data: _response.body,
|
|
192
|
+
rawResponse: _response.rawResponse
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
if (_response.error.reason === "status-code") {
|
|
196
|
+
switch (_response.error.statusCode) {
|
|
197
|
+
case 400:
|
|
198
|
+
throw new LevelFour.BadRequestError(
|
|
199
|
+
_response.error.body,
|
|
200
|
+
_response.rawResponse
|
|
201
|
+
);
|
|
202
|
+
case 401:
|
|
203
|
+
throw new LevelFour.UnauthorizedError(
|
|
204
|
+
_response.error.body,
|
|
205
|
+
_response.rawResponse
|
|
206
|
+
);
|
|
207
|
+
case 403:
|
|
208
|
+
throw new LevelFour.ForbiddenError(
|
|
209
|
+
_response.error.body,
|
|
210
|
+
_response.rawResponse
|
|
211
|
+
);
|
|
212
|
+
case 404:
|
|
213
|
+
throw new LevelFour.NotFoundError(
|
|
214
|
+
_response.error.body,
|
|
215
|
+
_response.rawResponse
|
|
216
|
+
);
|
|
217
|
+
case 409:
|
|
218
|
+
throw new LevelFour.ConflictError(
|
|
219
|
+
_response.error.body,
|
|
220
|
+
_response.rawResponse
|
|
221
|
+
);
|
|
222
|
+
case 422:
|
|
223
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
224
|
+
_response.error.body,
|
|
225
|
+
_response.rawResponse
|
|
226
|
+
);
|
|
227
|
+
case 429:
|
|
228
|
+
throw new LevelFour.TooManyRequestsError(
|
|
229
|
+
_response.error.body,
|
|
230
|
+
_response.rawResponse
|
|
231
|
+
);
|
|
232
|
+
case 500:
|
|
233
|
+
throw new LevelFour.InternalServerError(
|
|
234
|
+
_response.error.body,
|
|
235
|
+
_response.rawResponse
|
|
236
|
+
);
|
|
237
|
+
default:
|
|
238
|
+
throw new errors.LevelFourError({
|
|
239
|
+
statusCode: _response.error.statusCode,
|
|
240
|
+
body: _response.error.body,
|
|
241
|
+
rawResponse: _response.rawResponse
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return (0, import_handleNonStatusCodeError.handleNonStatusCodeError)(
|
|
246
|
+
_response.error,
|
|
247
|
+
_response.rawResponse,
|
|
248
|
+
"POST",
|
|
249
|
+
"/api/v1/accounts/integrations/terraform"
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
254
|
+
*
|
|
255
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
256
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
257
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
258
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
259
|
+
* @throws {@link LevelFour.ConflictError}
|
|
260
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
261
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
262
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* await client.accounts.rotateTerraformIntegration()
|
|
266
|
+
*/
|
|
267
|
+
rotateTerraformIntegration(requestOptions) {
|
|
268
|
+
return core.HttpResponsePromise.fromPromise(this.__rotateTerraformIntegration(requestOptions));
|
|
269
|
+
}
|
|
270
|
+
async __rotateTerraformIntegration(requestOptions) {
|
|
271
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
272
|
+
const _headers = (0, import_headers.mergeHeaders)(
|
|
273
|
+
_authRequest.headers,
|
|
274
|
+
this._options?.headers,
|
|
275
|
+
requestOptions?.headers
|
|
276
|
+
);
|
|
277
|
+
const _response = await core.fetcher({
|
|
278
|
+
url: core.url.join(
|
|
279
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
280
|
+
"api/v1/accounts/integrations/terraform/rotate"
|
|
281
|
+
),
|
|
282
|
+
method: "POST",
|
|
283
|
+
headers: _headers,
|
|
284
|
+
queryParameters: requestOptions?.queryParams,
|
|
285
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
286
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
287
|
+
abortSignal: requestOptions?.abortSignal,
|
|
288
|
+
fetchFn: this._options?.fetch,
|
|
289
|
+
logging: this._options.logging
|
|
290
|
+
});
|
|
291
|
+
if (_response.ok) {
|
|
292
|
+
return {
|
|
293
|
+
data: _response.body,
|
|
294
|
+
rawResponse: _response.rawResponse
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
if (_response.error.reason === "status-code") {
|
|
298
|
+
switch (_response.error.statusCode) {
|
|
299
|
+
case 400:
|
|
300
|
+
throw new LevelFour.BadRequestError(
|
|
301
|
+
_response.error.body,
|
|
302
|
+
_response.rawResponse
|
|
303
|
+
);
|
|
304
|
+
case 401:
|
|
305
|
+
throw new LevelFour.UnauthorizedError(
|
|
306
|
+
_response.error.body,
|
|
307
|
+
_response.rawResponse
|
|
308
|
+
);
|
|
309
|
+
case 403:
|
|
310
|
+
throw new LevelFour.ForbiddenError(
|
|
311
|
+
_response.error.body,
|
|
312
|
+
_response.rawResponse
|
|
313
|
+
);
|
|
314
|
+
case 404:
|
|
315
|
+
throw new LevelFour.NotFoundError(
|
|
316
|
+
_response.error.body,
|
|
317
|
+
_response.rawResponse
|
|
318
|
+
);
|
|
319
|
+
case 409:
|
|
320
|
+
throw new LevelFour.ConflictError(
|
|
321
|
+
_response.error.body,
|
|
322
|
+
_response.rawResponse
|
|
323
|
+
);
|
|
324
|
+
case 422:
|
|
325
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
326
|
+
_response.error.body,
|
|
327
|
+
_response.rawResponse
|
|
328
|
+
);
|
|
329
|
+
case 429:
|
|
330
|
+
throw new LevelFour.TooManyRequestsError(
|
|
331
|
+
_response.error.body,
|
|
332
|
+
_response.rawResponse
|
|
333
|
+
);
|
|
334
|
+
case 500:
|
|
335
|
+
throw new LevelFour.InternalServerError(
|
|
336
|
+
_response.error.body,
|
|
337
|
+
_response.rawResponse
|
|
338
|
+
);
|
|
339
|
+
default:
|
|
340
|
+
throw new errors.LevelFourError({
|
|
341
|
+
statusCode: _response.error.statusCode,
|
|
342
|
+
body: _response.error.body,
|
|
343
|
+
rawResponse: _response.rawResponse
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
return (0, import_handleNonStatusCodeError.handleNonStatusCodeError)(
|
|
348
|
+
_response.error,
|
|
349
|
+
_response.rawResponse,
|
|
350
|
+
"POST",
|
|
351
|
+
"/api/v1/accounts/integrations/terraform/rotate"
|
|
352
|
+
);
|
|
353
|
+
}
|
|
150
354
|
/**
|
|
151
355
|
* @param {LevelFour.GetIntegrationStatusApiV1AccountsIntegrationsIntegrationIdGetRequest} request
|
|
152
356
|
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -114,6 +114,210 @@ class AccountsClient {
|
|
|
114
114
|
"/api/v1/accounts/integrations"
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
121
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
122
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
123
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
124
|
+
* @throws {@link LevelFour.ConflictError}
|
|
125
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
126
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
127
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* await client.accounts.ensureTerraformIntegration()
|
|
131
|
+
*/
|
|
132
|
+
ensureTerraformIntegration(requestOptions) {
|
|
133
|
+
return core.HttpResponsePromise.fromPromise(this.__ensureTerraformIntegration(requestOptions));
|
|
134
|
+
}
|
|
135
|
+
async __ensureTerraformIntegration(requestOptions) {
|
|
136
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
137
|
+
const _headers = mergeHeaders(
|
|
138
|
+
_authRequest.headers,
|
|
139
|
+
this._options?.headers,
|
|
140
|
+
requestOptions?.headers
|
|
141
|
+
);
|
|
142
|
+
const _response = await core.fetcher({
|
|
143
|
+
url: core.url.join(
|
|
144
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
145
|
+
"api/v1/accounts/integrations/terraform"
|
|
146
|
+
),
|
|
147
|
+
method: "POST",
|
|
148
|
+
headers: _headers,
|
|
149
|
+
queryParameters: requestOptions?.queryParams,
|
|
150
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
151
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
152
|
+
abortSignal: requestOptions?.abortSignal,
|
|
153
|
+
fetchFn: this._options?.fetch,
|
|
154
|
+
logging: this._options.logging
|
|
155
|
+
});
|
|
156
|
+
if (_response.ok) {
|
|
157
|
+
return {
|
|
158
|
+
data: _response.body,
|
|
159
|
+
rawResponse: _response.rawResponse
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
if (_response.error.reason === "status-code") {
|
|
163
|
+
switch (_response.error.statusCode) {
|
|
164
|
+
case 400:
|
|
165
|
+
throw new LevelFour.BadRequestError(
|
|
166
|
+
_response.error.body,
|
|
167
|
+
_response.rawResponse
|
|
168
|
+
);
|
|
169
|
+
case 401:
|
|
170
|
+
throw new LevelFour.UnauthorizedError(
|
|
171
|
+
_response.error.body,
|
|
172
|
+
_response.rawResponse
|
|
173
|
+
);
|
|
174
|
+
case 403:
|
|
175
|
+
throw new LevelFour.ForbiddenError(
|
|
176
|
+
_response.error.body,
|
|
177
|
+
_response.rawResponse
|
|
178
|
+
);
|
|
179
|
+
case 404:
|
|
180
|
+
throw new LevelFour.NotFoundError(
|
|
181
|
+
_response.error.body,
|
|
182
|
+
_response.rawResponse
|
|
183
|
+
);
|
|
184
|
+
case 409:
|
|
185
|
+
throw new LevelFour.ConflictError(
|
|
186
|
+
_response.error.body,
|
|
187
|
+
_response.rawResponse
|
|
188
|
+
);
|
|
189
|
+
case 422:
|
|
190
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
191
|
+
_response.error.body,
|
|
192
|
+
_response.rawResponse
|
|
193
|
+
);
|
|
194
|
+
case 429:
|
|
195
|
+
throw new LevelFour.TooManyRequestsError(
|
|
196
|
+
_response.error.body,
|
|
197
|
+
_response.rawResponse
|
|
198
|
+
);
|
|
199
|
+
case 500:
|
|
200
|
+
throw new LevelFour.InternalServerError(
|
|
201
|
+
_response.error.body,
|
|
202
|
+
_response.rawResponse
|
|
203
|
+
);
|
|
204
|
+
default:
|
|
205
|
+
throw new errors.LevelFourError({
|
|
206
|
+
statusCode: _response.error.statusCode,
|
|
207
|
+
body: _response.error.body,
|
|
208
|
+
rawResponse: _response.rawResponse
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return handleNonStatusCodeError(
|
|
213
|
+
_response.error,
|
|
214
|
+
_response.rawResponse,
|
|
215
|
+
"POST",
|
|
216
|
+
"/api/v1/accounts/integrations/terraform"
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
221
|
+
*
|
|
222
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
223
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
224
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
225
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
226
|
+
* @throws {@link LevelFour.ConflictError}
|
|
227
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
228
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
229
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* await client.accounts.rotateTerraformIntegration()
|
|
233
|
+
*/
|
|
234
|
+
rotateTerraformIntegration(requestOptions) {
|
|
235
|
+
return core.HttpResponsePromise.fromPromise(this.__rotateTerraformIntegration(requestOptions));
|
|
236
|
+
}
|
|
237
|
+
async __rotateTerraformIntegration(requestOptions) {
|
|
238
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
239
|
+
const _headers = mergeHeaders(
|
|
240
|
+
_authRequest.headers,
|
|
241
|
+
this._options?.headers,
|
|
242
|
+
requestOptions?.headers
|
|
243
|
+
);
|
|
244
|
+
const _response = await core.fetcher({
|
|
245
|
+
url: core.url.join(
|
|
246
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
247
|
+
"api/v1/accounts/integrations/terraform/rotate"
|
|
248
|
+
),
|
|
249
|
+
method: "POST",
|
|
250
|
+
headers: _headers,
|
|
251
|
+
queryParameters: requestOptions?.queryParams,
|
|
252
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
253
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
254
|
+
abortSignal: requestOptions?.abortSignal,
|
|
255
|
+
fetchFn: this._options?.fetch,
|
|
256
|
+
logging: this._options.logging
|
|
257
|
+
});
|
|
258
|
+
if (_response.ok) {
|
|
259
|
+
return {
|
|
260
|
+
data: _response.body,
|
|
261
|
+
rawResponse: _response.rawResponse
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
if (_response.error.reason === "status-code") {
|
|
265
|
+
switch (_response.error.statusCode) {
|
|
266
|
+
case 400:
|
|
267
|
+
throw new LevelFour.BadRequestError(
|
|
268
|
+
_response.error.body,
|
|
269
|
+
_response.rawResponse
|
|
270
|
+
);
|
|
271
|
+
case 401:
|
|
272
|
+
throw new LevelFour.UnauthorizedError(
|
|
273
|
+
_response.error.body,
|
|
274
|
+
_response.rawResponse
|
|
275
|
+
);
|
|
276
|
+
case 403:
|
|
277
|
+
throw new LevelFour.ForbiddenError(
|
|
278
|
+
_response.error.body,
|
|
279
|
+
_response.rawResponse
|
|
280
|
+
);
|
|
281
|
+
case 404:
|
|
282
|
+
throw new LevelFour.NotFoundError(
|
|
283
|
+
_response.error.body,
|
|
284
|
+
_response.rawResponse
|
|
285
|
+
);
|
|
286
|
+
case 409:
|
|
287
|
+
throw new LevelFour.ConflictError(
|
|
288
|
+
_response.error.body,
|
|
289
|
+
_response.rawResponse
|
|
290
|
+
);
|
|
291
|
+
case 422:
|
|
292
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
293
|
+
_response.error.body,
|
|
294
|
+
_response.rawResponse
|
|
295
|
+
);
|
|
296
|
+
case 429:
|
|
297
|
+
throw new LevelFour.TooManyRequestsError(
|
|
298
|
+
_response.error.body,
|
|
299
|
+
_response.rawResponse
|
|
300
|
+
);
|
|
301
|
+
case 500:
|
|
302
|
+
throw new LevelFour.InternalServerError(
|
|
303
|
+
_response.error.body,
|
|
304
|
+
_response.rawResponse
|
|
305
|
+
);
|
|
306
|
+
default:
|
|
307
|
+
throw new errors.LevelFourError({
|
|
308
|
+
statusCode: _response.error.statusCode,
|
|
309
|
+
body: _response.error.body,
|
|
310
|
+
rawResponse: _response.rawResponse
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return handleNonStatusCodeError(
|
|
315
|
+
_response.error,
|
|
316
|
+
_response.rawResponse,
|
|
317
|
+
"POST",
|
|
318
|
+
"/api/v1/accounts/integrations/terraform/rotate"
|
|
319
|
+
);
|
|
320
|
+
}
|
|
117
321
|
/**
|
|
118
322
|
* @param {LevelFour.GetIntegrationStatusApiV1AccountsIntegrationsIntegrationIdGetRequest} request
|
|
119
323
|
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -8,6 +8,8 @@ export interface AzureSubscriptionItem {
|
|
|
8
8
|
reader: LevelFour.AzureRoleStatus | null;
|
|
9
9
|
/** Whether the service principal holds Cost Management Reader, null if unchecked */
|
|
10
10
|
cost_management_reader: LevelFour.AzureRoleStatus | null;
|
|
11
|
+
/** Whether Azure shows this subscription's cost. False when the Microsoft CSP partner that sells it keeps cost visibility off, so LevelFour holds no bill for it. Null if unchecked: only a subscription bought through a CSP partner is checked */
|
|
12
|
+
cost_visible: LevelFour.AzureRoleStatus | null;
|
|
11
13
|
/** Actual cost this month so far, from the bill LevelFour holds */
|
|
12
14
|
month_to_date_cost: number;
|
|
13
15
|
/** Actual cost last month, from the bill LevelFour holds */
|
|
@@ -8,6 +8,8 @@ export interface AzureSubscriptionItem {
|
|
|
8
8
|
reader: LevelFour.AzureRoleStatus | null;
|
|
9
9
|
/** Whether the service principal holds Cost Management Reader, null if unchecked */
|
|
10
10
|
cost_management_reader: LevelFour.AzureRoleStatus | null;
|
|
11
|
+
/** Whether Azure shows this subscription's cost. False when the Microsoft CSP partner that sells it keeps cost visibility off, so LevelFour holds no bill for it. Null if unchecked: only a subscription bought through a CSP partner is checked */
|
|
12
|
+
cost_visible: LevelFour.AzureRoleStatus | null;
|
|
11
13
|
/** Actual cost this month so far, from the bill LevelFour holds */
|
|
12
14
|
month_to_date_cost: number;
|
|
13
15
|
/** Actual cost last month, from the bill LevelFour holds */
|
|
@@ -3,4 +3,16 @@ export interface BlockerTotals {
|
|
|
3
3
|
nodes_held: number;
|
|
4
4
|
/** Pods that hold their node; static pods do not */
|
|
5
5
|
pods_held: number;
|
|
6
|
+
/** Held nodes neither their own bill nor a bill rate prices */
|
|
7
|
+
nodes_held_unpriced?: number | undefined;
|
|
8
|
+
/** What the held nodes cost a month, the priced ones; null when none is priced */
|
|
9
|
+
monthly_cost?: (number | null) | undefined;
|
|
10
|
+
/** The same after the enterprise discount and the commitments; a day rolled up before the net basis counts at its amortized cost */
|
|
11
|
+
monthly_cost_net?: (number | null) | undefined;
|
|
12
|
+
/** Held nodes that only pods with an unhealthy reason hold, each pod freed by its fix alone: its workload has no ready replica, or PodDisruptionBudgets without a healthy pod are all that hold it */
|
|
13
|
+
nodes_held_unhealthy?: number | undefined;
|
|
14
|
+
/** What those nodes cost a month, the priced ones; null when none is priced */
|
|
15
|
+
unhealthy_monthly_cost?: (number | null) | undefined;
|
|
16
|
+
/** The same after the enterprise discount and the commitments; a day rolled up before the net basis counts at its amortized cost */
|
|
17
|
+
unhealthy_monthly_cost_net?: (number | null) | undefined;
|
|
6
18
|
}
|
|
@@ -3,4 +3,16 @@ export interface BlockerTotals {
|
|
|
3
3
|
nodes_held: number;
|
|
4
4
|
/** Pods that hold their node; static pods do not */
|
|
5
5
|
pods_held: number;
|
|
6
|
+
/** Held nodes neither their own bill nor a bill rate prices */
|
|
7
|
+
nodes_held_unpriced?: number | undefined;
|
|
8
|
+
/** What the held nodes cost a month, the priced ones; null when none is priced */
|
|
9
|
+
monthly_cost?: (number | null) | undefined;
|
|
10
|
+
/** The same after the enterprise discount and the commitments; a day rolled up before the net basis counts at its amortized cost */
|
|
11
|
+
monthly_cost_net?: (number | null) | undefined;
|
|
12
|
+
/** Held nodes that only pods with an unhealthy reason hold, each pod freed by its fix alone: its workload has no ready replica, or PodDisruptionBudgets without a healthy pod are all that hold it */
|
|
13
|
+
nodes_held_unhealthy?: number | undefined;
|
|
14
|
+
/** What those nodes cost a month, the priced ones; null when none is priced */
|
|
15
|
+
unhealthy_monthly_cost?: (number | null) | undefined;
|
|
16
|
+
/** The same after the enterprise discount and the commitments; a day rolled up before the net basis counts at its amortized cost */
|
|
17
|
+
unhealthy_monthly_cost_net?: (number | null) | undefined;
|
|
6
18
|
}
|
|
@@ -15,8 +15,16 @@ export interface ConsolidationBlocker {
|
|
|
15
15
|
workload_name: string;
|
|
16
16
|
/** static_pod alone for a static pod, which goes with its node */
|
|
17
17
|
reasons: LevelFour.BlockingReason[];
|
|
18
|
+
/** Why moving the pod carries no risk: its app has no healthy pod, or its workload has no ready replica. Empty for a pod of a healthy app */
|
|
19
|
+
unhealthy_reasons?: LevelFour.UnhealthyReason[] | undefined;
|
|
18
20
|
/** Its node's latest Unconsolidatable and DisruptionBlocked events in the last 24 hours, newest first, at most 5 */
|
|
19
21
|
karpenter_says: LevelFour.KarpenterMessage[];
|
|
22
|
+
/** What its node costs a month on the bill, at the hourly cost of its own bill over the last 7 days, else at the hourly rate the bill charged in those days for its instance type and purchase option in the cluster's region, plus the EKS Auto Mode fee on an Auto Mode node. Never a list price: null when neither prices it */
|
|
23
|
+
node_monthly_cost?: (number | null) | undefined;
|
|
24
|
+
/** The same after the enterprise discount and the commitments; a day rolled up before the net basis counts at its amortized cost */
|
|
25
|
+
node_monthly_cost_net?: (number | null) | undefined;
|
|
26
|
+
/** node_bill: the node's own bill. bill_rate: the bill's rate for its instance type */
|
|
27
|
+
node_priced_by?: (ConsolidationBlocker.NodePricedBy | null) | undefined;
|
|
20
28
|
}
|
|
21
29
|
export declare namespace ConsolidationBlocker {
|
|
22
30
|
/** karpenter when the node belongs to a NodePool */
|
|
@@ -25,4 +33,9 @@ export declare namespace ConsolidationBlocker {
|
|
|
25
33
|
readonly ClusterAutoscaler: "cluster_autoscaler";
|
|
26
34
|
};
|
|
27
35
|
type Autoscaler = (typeof Autoscaler)[keyof typeof Autoscaler];
|
|
36
|
+
const NodePricedBy: {
|
|
37
|
+
readonly NodeBill: "node_bill";
|
|
38
|
+
readonly BillRate: "bill_rate";
|
|
39
|
+
};
|
|
40
|
+
type NodePricedBy = (typeof NodePricedBy)[keyof typeof NodePricedBy];
|
|
28
41
|
}
|
|
@@ -15,8 +15,16 @@ export interface ConsolidationBlocker {
|
|
|
15
15
|
workload_name: string;
|
|
16
16
|
/** static_pod alone for a static pod, which goes with its node */
|
|
17
17
|
reasons: LevelFour.BlockingReason[];
|
|
18
|
+
/** Why moving the pod carries no risk: its app has no healthy pod, or its workload has no ready replica. Empty for a pod of a healthy app */
|
|
19
|
+
unhealthy_reasons?: LevelFour.UnhealthyReason[] | undefined;
|
|
18
20
|
/** Its node's latest Unconsolidatable and DisruptionBlocked events in the last 24 hours, newest first, at most 5 */
|
|
19
21
|
karpenter_says: LevelFour.KarpenterMessage[];
|
|
22
|
+
/** What its node costs a month on the bill, at the hourly cost of its own bill over the last 7 days, else at the hourly rate the bill charged in those days for its instance type and purchase option in the cluster's region, plus the EKS Auto Mode fee on an Auto Mode node. Never a list price: null when neither prices it */
|
|
23
|
+
node_monthly_cost?: (number | null) | undefined;
|
|
24
|
+
/** The same after the enterprise discount and the commitments; a day rolled up before the net basis counts at its amortized cost */
|
|
25
|
+
node_monthly_cost_net?: (number | null) | undefined;
|
|
26
|
+
/** node_bill: the node's own bill. bill_rate: the bill's rate for its instance type */
|
|
27
|
+
node_priced_by?: (ConsolidationBlocker.NodePricedBy | null) | undefined;
|
|
20
28
|
}
|
|
21
29
|
export declare namespace ConsolidationBlocker {
|
|
22
30
|
/** karpenter when the node belongs to a NodePool */
|
|
@@ -25,4 +33,9 @@ export declare namespace ConsolidationBlocker {
|
|
|
25
33
|
readonly ClusterAutoscaler: "cluster_autoscaler";
|
|
26
34
|
};
|
|
27
35
|
type Autoscaler = (typeof Autoscaler)[keyof typeof Autoscaler];
|
|
36
|
+
const NodePricedBy: {
|
|
37
|
+
readonly NodeBill: "node_bill";
|
|
38
|
+
readonly BillRate: "bill_rate";
|
|
39
|
+
};
|
|
40
|
+
type NodePricedBy = (typeof NodePricedBy)[keyof typeof NodePricedBy];
|
|
28
41
|
}
|
|
@@ -27,6 +27,10 @@ var ConsolidationBlocker;
|
|
|
27
27
|
Karpenter: "karpenter",
|
|
28
28
|
ClusterAutoscaler: "cluster_autoscaler"
|
|
29
29
|
};
|
|
30
|
+
ConsolidationBlocker2.NodePricedBy = {
|
|
31
|
+
NodeBill: "node_bill",
|
|
32
|
+
BillRate: "bill_rate"
|
|
33
|
+
};
|
|
30
34
|
})(ConsolidationBlocker || (ConsolidationBlocker = {}));
|
|
31
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
36
|
0 && (module.exports = {
|
|
@@ -4,6 +4,10 @@ var ConsolidationBlocker;
|
|
|
4
4
|
Karpenter: "karpenter",
|
|
5
5
|
ClusterAutoscaler: "cluster_autoscaler"
|
|
6
6
|
};
|
|
7
|
+
ConsolidationBlocker2.NodePricedBy = {
|
|
8
|
+
NodeBill: "node_bill",
|
|
9
|
+
BillRate: "bill_rate"
|
|
10
|
+
};
|
|
7
11
|
})(ConsolidationBlocker || (ConsolidationBlocker = {}));
|
|
8
12
|
export {
|
|
9
13
|
ConsolidationBlocker
|
|
@@ -13,6 +13,8 @@ export interface ContainerDetail {
|
|
|
13
13
|
probes: LevelFour.ContainerProbes;
|
|
14
14
|
/** Null when the agent reported no JVM heap setting */
|
|
15
15
|
jvm_heap?: (LevelFour.ContainerJvmHeap | null) | undefined;
|
|
16
|
+
/** Null when the opt-in JVM reader measured nothing in the container over the window */
|
|
17
|
+
jvm_measured?: (LevelFour.ContainerJvmMeasured | null) | undefined;
|
|
16
18
|
usage: LevelFour.UsageSummary;
|
|
17
19
|
/** Usage in containers' first 15 minutes, against the steady state */
|
|
18
20
|
startup: LevelFour.StartupUsage;
|
|
@@ -13,6 +13,8 @@ export interface ContainerDetail {
|
|
|
13
13
|
probes: LevelFour.ContainerProbes;
|
|
14
14
|
/** Null when the agent reported no JVM heap setting */
|
|
15
15
|
jvm_heap?: (LevelFour.ContainerJvmHeap | null) | undefined;
|
|
16
|
+
/** Null when the opt-in JVM reader measured nothing in the container over the window */
|
|
17
|
+
jvm_measured?: (LevelFour.ContainerJvmMeasured | null) | undefined;
|
|
16
18
|
usage: LevelFour.UsageSummary;
|
|
17
19
|
/** Usage in containers' first 15 minutes, against the steady state */
|
|
18
20
|
startup: LevelFour.StartupUsage;
|