@dynatrace-sdk/client-classic-environment-v2 5.1.0 → 5.2.2
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/CHANGELOG.md +19 -0
- package/README.md +647 -212
- package/cjs/index.js +729 -80
- package/dynatrace-metadata.json +2 -2
- package/esm/index.js +729 -80
- package/package.json +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/apis/credential-vault-api.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/extensions-2-0-api.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/logs-api.d.ts +2 -0
- package/types/packages/client/classic-environment-v2/src/lib/apis/metrics-api.d.ts +30 -0
- package/types/packages/client/classic-environment-v2/src/lib/apis/monitored-entities-api.d.ts +11 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/settings-objects-api.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/settings-schemas-api.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/synthetic-locations-nodes-and-configuration-api.d.ts +81 -11
- package/types/packages/client/classic-environment-v2/src/lib/apis/synthetic-network-availability-monitors-api.d.ts +7 -7
- package/types/packages/client/classic-environment-v2/src/lib/models/active-gate-module-attributes.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/aggregated-log-aggregation-result.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/availability-evidence.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/aws-key-based-credentials-dto.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/aws-role-based-credentials.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/certificate-credentials.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/chromium-startup-flags-dto-disable-features.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/cookie-step-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/custom-device-creation-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/cyber-ark-allowed-location-dto.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/cyber-ark-username-password.d.ts +4 -4
- package/types/packages/client/classic-environment-v2/src/lib/models/enablement-dto-origin.d.ts +11 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/enablement-dto-performance-metric.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/enablement-dto.d.ts +17 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/entity-from-relationships.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/entity-to-relationships.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/event-evidence.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/event-ingest-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/execute-actions-dto-actions.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/extension-feature-sets-details.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/extension-upload-response-dto-feature-sets-details.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/hashicorp-approle.d.ts +4 -4
- package/types/packages/client/classic-environment-v2/src/lib/models/index.d.ts +8 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/interaction-step-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/item-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/java-script-step-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/key-strokes-step-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/log-message-json.d.ts +5 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/log-record-additional-columns.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/maintenance-window-evidence.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/metric-evidence.d.ts +5 -5
- package/types/packages/client/classic-environment-v2/src/lib/models/metric-series-dimension-map.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/monitored-entity-state-param.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/monitored-states.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/navigate-step-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/network-zone.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/node-collection-element.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/node.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/plain-authentication-dto.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/plain-keystrokes-input-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/private-synthetic-location-node-names.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/property-definition-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/public-certificate-credentials.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/public-synthetic-location.d.ts +5 -5
- package/types/packages/client/classic-environment-v2/src/lib/models/remediation-items-bulk-update-delete-dto-updates.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/revision-diff.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-enums.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-maturity.d.ts +16 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-table-columns.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-types.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto.d.ts +10 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-stub-maturity.d.ts +16 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-stub.d.ts +10 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-type-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/secure-authentication-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/secure-keystrokes-input-dto.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/security-problem-event-reason.d.ts +3 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/security-problem-event.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/select-option-step-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/service-impact.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/snmpv3-credentials.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/store-log-query-structure.d.ts +7 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-configuration-dto.d.ts +5 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-request.d.ts +5 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-response.d.ts +5 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-constraint-dto-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-outage-handling-settings-dto-origin.d.ts +11 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-outage-handling-settings-dto.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-performance-threshold-dto-type.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-performance-threshold-dto.d.ts +6 -6
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-primary-grail-tag-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-multi-protocol-monitor-request.d.ts +5 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-multi-protocol-monitor-response.d.ts +5 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-multi-protocol-monitor-step-dto-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-on-demand-batch-status-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-on-demand-execution-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-on-demand-execution-request-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-private-location-update.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-public-location-update.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/time-wait-condition-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/transactional-evidence.d.ts +4 -4
- package/types/packages/client/classic-environment-v2/src/lib/models/validation-wait-condition-dto.d.ts +2 -2
- package/types/packages/http-client/src/index.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/abort-controller.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/abort-signal.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/apply-content-type-header.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/base-error.d.ts +0 -5
- package/types/packages/http-client/src/lib/platform/binary.d.ts +0 -13
- package/types/packages/http-client/src/lib/platform/data-type-error.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/decode-form-data.d.ts +0 -48
- package/types/packages/http-client/src/lib/platform/decode-response-body.d.ts +0 -3
- package/types/packages/http-client/src/lib/platform/default-status-validator.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/encode-request-body.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/http-client-abort-error.d.ts +0 -7
- package/types/packages/http-client/src/lib/platform/http-client-request-error.d.ts +0 -7
- package/types/packages/http-client/src/lib/platform/http-client-response-error-serializer.d.ts +0 -3
- package/types/packages/http-client/src/lib/platform/http-client-response-error.d.ts +0 -11
- package/types/packages/http-client/src/lib/platform/http-client-response.d.ts +0 -10
- package/types/packages/http-client/src/lib/platform/http-client.d.ts +0 -24
- package/types/packages/http-client/src/lib/platform/index.d.ts +0 -12
- package/types/packages/http-client/src/lib/platform/oauth-http-client.d.ts +0 -41
- package/types/packages/http-client/src/lib/platform/unsupported-operation-error.d.ts +0 -6
- package/types/packages/http-client/src/lib/types/abort-controller.d.ts +0 -14
- package/types/packages/http-client/src/lib/types/abort-signal.d.ts +0 -18
- package/types/packages/http-client/src/lib/types/base-error.d.ts +0 -4
- package/types/packages/http-client/src/lib/types/binary.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/data-type-error.d.ts +0 -14
- package/types/packages/http-client/src/lib/types/data-types.d.ts +0 -36
- package/types/packages/http-client/src/lib/types/form-data-request-body.d.ts +0 -83
- package/types/packages/http-client/src/lib/types/form-data-response-body.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/headers.d.ts +0 -6
- package/types/packages/http-client/src/lib/types/http-client-abort-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-network-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-request-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-request-options.d.ts +0 -42
- package/types/packages/http-client/src/lib/types/http-client-response-error.d.ts +0 -20
- package/types/packages/http-client/src/lib/types/http-client-response.d.ts +0 -33
- package/types/packages/http-client/src/lib/types/http-client.d.ts +0 -24
- package/types/packages/http-client/src/lib/types/index.d.ts +0 -20
- package/types/packages/http-client/src/lib/types/request-body-types.d.ts +0 -26
- package/types/packages/http-client/src/lib/types/response-body-types.d.ts +0 -46
- package/types/packages/http-client/src/lib/types/status-validator.d.ts +0 -7
- package/types/packages/http-client/src/lib/types/unsupported-operation-error.d.ts +0 -14
- package/types/packages/platform/error-handlers/src/index.d.ts +0 -2
- package/types/packages/platform/error-handlers/src/lib/add-global-error-serializer.d.ts +0 -13
- package/types/packages/platform/error-handlers/src/lib/types/common-serialized-error.d.ts +0 -13
- package/types/packages/platform/error-handlers/src/lib/types/dt-runtime-error-handlers.d.ts +0 -5
- package/types/packages/platform/error-handlers/src/lib/types/error-type.d.ts +0 -9
- package/types/packages/platform/error-handlers/src/lib/types/global-dt-runtime-with-error-handlers.d.ts +0 -7
- package/types/packages/platform/error-handlers/src/lib/types/global-error-serializer.d.ts +0 -10
- package/types/packages/platform/error-handlers/src/lib/types/http-serialized-error.d.ts +0 -16
- package/types/packages/platform/error-handlers/src/lib/types/index.d.ts +0 -6
- package/types/packages/platform/error-handlers/src/lib/types/serialized-error.d.ts +0 -10
- package/types/packages/platform/shared/index.d.ts +0 -1
- package/types/packages/platform/shared/utils/get-global-with-dt-runtime.d.ts +0 -1
- package/types/packages/shared-errors/src/api-client-error.d.ts +0 -23
- package/types/packages/shared-errors/src/api-gateway-error.d.ts +0 -37
- package/types/packages/shared-errors/src/client-request-error.d.ts +0 -39
- package/types/packages/shared-errors/src/index.d.ts +0 -5
- package/types/packages/shared-errors/src/invalid-response-error.d.ts +0 -26
- package/types/packages/shared-errors/src/types.d.ts +0 -88
package/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright 2023-
|
|
3
|
+
* Copyright 2023-2026 Dynatrace LLC
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at
|
|
@@ -102,6 +102,8 @@ __export(src_exports, {
|
|
|
102
102
|
DavisSecurityAdvisorClient: () => DavisSecurityAdvisorClient,
|
|
103
103
|
DeletionConstraintType: () => DeletionConstraintType,
|
|
104
104
|
EffectivePermissionGranted: () => EffectivePermissionGranted,
|
|
105
|
+
EnablementDtoOrigin: () => EnablementDtoOrigin,
|
|
106
|
+
EnablementDtoPerformanceMetric: () => EnablementDtoPerformanceMetric,
|
|
105
107
|
EntryPointUsageSegmentSegmentType: () => EntryPointUsageSegmentSegmentType,
|
|
106
108
|
EntryPointUsageSegmentSourceType: () => EntryPointUsageSegmentSourceType,
|
|
107
109
|
EntrypointPayloadType: () => EntrypointPayloadType,
|
|
@@ -245,6 +247,8 @@ __export(src_exports, {
|
|
|
245
247
|
SLOEvaluationType: () => SLOEvaluationType,
|
|
246
248
|
SLOStatus: () => SLOStatus,
|
|
247
249
|
SchemaConstraintRestDtoType: () => SchemaConstraintRestDtoType,
|
|
250
|
+
SchemaDefinitionRestDtoMaturity: () => SchemaDefinitionRestDtoMaturity,
|
|
251
|
+
SchemaStubMaturity: () => SchemaStubMaturity,
|
|
248
252
|
SchemaTypeType: () => SchemaTypeType,
|
|
249
253
|
SecurityProblemBulkMutingSummaryReason: () => SecurityProblemBulkMutingSummaryReason,
|
|
250
254
|
SecurityProblemDetailsStatus: () => SecurityProblemDetailsStatus,
|
|
@@ -267,6 +271,7 @@ __export(src_exports, {
|
|
|
267
271
|
SettingsSchemasClient: () => SettingsSchemasClient,
|
|
268
272
|
SloBurnRateBurnRateType: () => SloBurnRateBurnRateType,
|
|
269
273
|
SloConfigItemDtoImplEvaluationType: () => SloConfigItemDtoImplEvaluationType,
|
|
274
|
+
StoreLogQueryStructure: () => StoreLogQueryStructure,
|
|
270
275
|
SyntheticBrowserMonitorRequestType: () => SyntheticBrowserMonitorRequestType,
|
|
271
276
|
SyntheticBrowserMonitorResponseType: () => SyntheticBrowserMonitorResponseType,
|
|
272
277
|
SyntheticBrowserMonitorStepDtoType: () => SyntheticBrowserMonitorStepDtoType,
|
|
@@ -275,6 +280,7 @@ __export(src_exports, {
|
|
|
275
280
|
SyntheticLocationType: () => SyntheticLocationType,
|
|
276
281
|
SyntheticLocationUpdateType: () => SyntheticLocationUpdateType,
|
|
277
282
|
SyntheticLocationsNodesAndConfigurationClient: () => SyntheticLocationsNodesAndConfigurationClient,
|
|
283
|
+
SyntheticMonitorOutageHandlingSettingsDtoOrigin: () => SyntheticMonitorOutageHandlingSettingsDtoOrigin,
|
|
278
284
|
SyntheticMonitorPerformanceThresholdDtoAggregation: () => SyntheticMonitorPerformanceThresholdDtoAggregation,
|
|
279
285
|
SyntheticMonitorPerformanceThresholdDtoType: () => SyntheticMonitorPerformanceThresholdDtoType,
|
|
280
286
|
SyntheticMonitorSummaryDtoType: () => SyntheticMonitorSummaryDtoType,
|
|
@@ -1547,6 +1553,7 @@ function mimeTypeToEncoding(mimeType, defaultEncoding) {
|
|
|
1547
1553
|
case "text/plain":
|
|
1548
1554
|
return "text" /* Text */;
|
|
1549
1555
|
case "application/octet-stream":
|
|
1556
|
+
case "application/yaml":
|
|
1550
1557
|
return "binary" /* Binary */;
|
|
1551
1558
|
case "multipart/form-data":
|
|
1552
1559
|
return "form-data" /* FormData */;
|
|
@@ -7300,7 +7307,7 @@ var CredentialVaultClient = class {
|
|
|
7300
7307
|
/**
|
|
7301
7308
|
* Gets the details of the specified credentials set.
|
|
7302
7309
|
*
|
|
7303
|
-
* **Required scope:** environment-api:credentials:read<br/><br/>The credentials set including username/certificate, password or token is included in the response.
|
|
7310
|
+
* **Required scope:** environment-api:credentials:read<br/>**Required permission:** environment:roles:viewer<br/><br/>The credentials set including username/certificate, password or token is included in the response.
|
|
7304
7311
|
*
|
|
7305
7312
|
* @returns {Promise<AbstractCredentialsResponseElement>} Success. The response contains the details of the credentials set.
|
|
7306
7313
|
*
|
|
@@ -14194,7 +14201,10 @@ var LogsClient = class {
|
|
|
14194
14201
|
throw new import_shared_errors20.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
14195
14202
|
}
|
|
14196
14203
|
const encodedBody = config.type === "application/json" ? this.shouldTransformDates ? transformRequest(config.body, []) : config.body : config.type === "application/json; charset=utf-8" ? this.shouldTransformDates ? transformRequest(config.body, []) : config.body : config.body;
|
|
14197
|
-
const query = toQueryString({ "content-type": config.contentType });
|
|
14204
|
+
const query = toQueryString({ structure: config.structure, "content-type": config.contentType });
|
|
14205
|
+
const headerParameters = {
|
|
14206
|
+
...config.xDynatraceOptions !== void 0 && { "X-Dynatrace-Options": String(config.xDynatraceOptions) }
|
|
14207
|
+
};
|
|
14198
14208
|
try {
|
|
14199
14209
|
const response = await this.httpClient.send({
|
|
14200
14210
|
url: `/platform/classic/environment-api/v2/logs/ingest${query}`,
|
|
@@ -14203,7 +14213,8 @@ var LogsClient = class {
|
|
|
14203
14213
|
body: encodedBody,
|
|
14204
14214
|
headers: {
|
|
14205
14215
|
"Content-Type": config.type,
|
|
14206
|
-
Accept: "application/json; charset=utf-8, application/json"
|
|
14216
|
+
Accept: "application/json; charset=utf-8, application/json",
|
|
14217
|
+
...headerParameters
|
|
14207
14218
|
},
|
|
14208
14219
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
14209
14220
|
statusValidator: (status) => {
|
|
@@ -14794,6 +14805,7 @@ var MetricsClient = class {
|
|
|
14794
14805
|
text: config.text,
|
|
14795
14806
|
fields: config.fields,
|
|
14796
14807
|
writtenSince: config.writtenSince,
|
|
14808
|
+
writtenSinceMode: config.writtenSinceMode,
|
|
14797
14809
|
metadataSelector: config.metadataSelector
|
|
14798
14810
|
});
|
|
14799
14811
|
try {
|
|
@@ -14950,6 +14962,145 @@ var MetricsClient = class {
|
|
|
14950
14962
|
}
|
|
14951
14963
|
}
|
|
14952
14964
|
}
|
|
14965
|
+
/**
|
|
14966
|
+
* Deletes all metrics older than the specified days
|
|
14967
|
+
*
|
|
14968
|
+
* **Required scope:** environment-api:metrics:write<br/>**Required permission:** environment:roles:manage-settings<br/><br/>Deletion cannot be undone! timeframe for minUnusedDays: 30 days - 5 years
|
|
14969
|
+
*
|
|
14970
|
+
* @example <caption>Code example</caption>
|
|
14971
|
+
* import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
14972
|
+
*
|
|
14973
|
+
* const data = await metricsClient.bulkDelete({
|
|
14974
|
+
* metricSelector: "...",
|
|
14975
|
+
* });
|
|
14976
|
+
*
|
|
14977
|
+
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
|
|
14978
|
+
* @throws {InvalidResponseError}
|
|
14979
|
+
* @throws {ApiClientError}
|
|
14980
|
+
* @throws {ClientRequestError}
|
|
14981
|
+
*/
|
|
14982
|
+
async bulkDelete(config) {
|
|
14983
|
+
if (!config) {
|
|
14984
|
+
throw new import_shared_errors22.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
14985
|
+
}
|
|
14986
|
+
const query = toQueryString({ metricSelector: config.metricSelector, minUnusedDays: config.minUnusedDays });
|
|
14987
|
+
try {
|
|
14988
|
+
await this.httpClient.send({
|
|
14989
|
+
url: `/platform/classic/environment-api/v2/metrics${query}`,
|
|
14990
|
+
method: "DELETE",
|
|
14991
|
+
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
14992
|
+
statusValidator: (status) => {
|
|
14993
|
+
return [202].includes(status);
|
|
14994
|
+
}
|
|
14995
|
+
});
|
|
14996
|
+
return;
|
|
14997
|
+
} catch (e) {
|
|
14998
|
+
if ((0, import_http_client17.isHttpClientAbortError)(e)) {
|
|
14999
|
+
throw e;
|
|
15000
|
+
}
|
|
15001
|
+
if (!(0, import_http_client17.isHttpClientResponseError)(e)) {
|
|
15002
|
+
throw new import_shared_errors22.ApiClientError("UnexpectedError", "Unexpected error", e);
|
|
15003
|
+
}
|
|
15004
|
+
const response = e.response;
|
|
15005
|
+
await apiGatewayErrorsHandler(response);
|
|
15006
|
+
switch (response.status) {
|
|
15007
|
+
case 400: {
|
|
15008
|
+
const contentType = response.headers["content-type"];
|
|
15009
|
+
const encoding = mimeTypeToEncoding(contentType, "text" /* Text */);
|
|
15010
|
+
const responseValue = await response.body(encoding);
|
|
15011
|
+
throw new import_shared_errors22.ClientRequestError(`400`, response, responseValue, getErrorMessage(responseValue, `Failed.`));
|
|
15012
|
+
}
|
|
15013
|
+
case 500: {
|
|
15014
|
+
const contentType = response.headers["content-type"];
|
|
15015
|
+
const encoding = mimeTypeToEncoding(contentType, "text" /* Text */);
|
|
15016
|
+
const responseValue = await response.body(encoding);
|
|
15017
|
+
throw new import_shared_errors22.ClientRequestError(
|
|
15018
|
+
`500`,
|
|
15019
|
+
response,
|
|
15020
|
+
responseValue,
|
|
15021
|
+
getErrorMessage(responseValue, `Failed. The bulk-deletion failed.`)
|
|
15022
|
+
);
|
|
15023
|
+
}
|
|
15024
|
+
default: {
|
|
15025
|
+
if (response.status >= 400 && response.status <= 499) {
|
|
15026
|
+
const responseValue = await response.body("json");
|
|
15027
|
+
try {
|
|
15028
|
+
const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
15029
|
+
throw new ErrorEnvelopeError(
|
|
15030
|
+
`${response.status}`,
|
|
15031
|
+
response,
|
|
15032
|
+
errorBody,
|
|
15033
|
+
getErrorMessage(errorBody, "Client side error."),
|
|
15034
|
+
e
|
|
15035
|
+
);
|
|
15036
|
+
} catch (err) {
|
|
15037
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
15038
|
+
throw err;
|
|
15039
|
+
}
|
|
15040
|
+
throw new import_shared_errors22.InvalidResponseError(
|
|
15041
|
+
`MetricsClient.bulkDelete:${response.status}`,
|
|
15042
|
+
err,
|
|
15043
|
+
responseValue,
|
|
15044
|
+
"ErrorEnvelope",
|
|
15045
|
+
void 0,
|
|
15046
|
+
response
|
|
15047
|
+
);
|
|
15048
|
+
}
|
|
15049
|
+
} else if (response.status >= 500 && response.status <= 599) {
|
|
15050
|
+
const responseValue = await response.body("json");
|
|
15051
|
+
try {
|
|
15052
|
+
const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
15053
|
+
throw new ErrorEnvelopeError(
|
|
15054
|
+
`${response.status}`,
|
|
15055
|
+
response,
|
|
15056
|
+
errorBody,
|
|
15057
|
+
getErrorMessage(errorBody, "Server side error."),
|
|
15058
|
+
e
|
|
15059
|
+
);
|
|
15060
|
+
} catch (err) {
|
|
15061
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
15062
|
+
throw err;
|
|
15063
|
+
}
|
|
15064
|
+
throw new import_shared_errors22.InvalidResponseError(
|
|
15065
|
+
`MetricsClient.bulkDelete:${response.status}`,
|
|
15066
|
+
err,
|
|
15067
|
+
responseValue,
|
|
15068
|
+
"ErrorEnvelope",
|
|
15069
|
+
void 0,
|
|
15070
|
+
response
|
|
15071
|
+
);
|
|
15072
|
+
}
|
|
15073
|
+
} else {
|
|
15074
|
+
try {
|
|
15075
|
+
const responseValue = await response.body("json");
|
|
15076
|
+
throw new import_shared_errors22.ClientRequestError(
|
|
15077
|
+
`${response.status}`,
|
|
15078
|
+
response,
|
|
15079
|
+
responseValue,
|
|
15080
|
+
getErrorMessage(
|
|
15081
|
+
responseValue,
|
|
15082
|
+
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
15083
|
+
)
|
|
15084
|
+
);
|
|
15085
|
+
} catch (error) {
|
|
15086
|
+
if (error instanceof import_shared_errors22.ClientRequestError) {
|
|
15087
|
+
throw error;
|
|
15088
|
+
}
|
|
15089
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
15090
|
+
throw new import_shared_errors22.InvalidResponseError(
|
|
15091
|
+
`${response.status}`,
|
|
15092
|
+
error,
|
|
15093
|
+
responseValue,
|
|
15094
|
+
"json",
|
|
15095
|
+
"Unexpected api response",
|
|
15096
|
+
response
|
|
15097
|
+
);
|
|
15098
|
+
}
|
|
15099
|
+
}
|
|
15100
|
+
}
|
|
15101
|
+
}
|
|
15102
|
+
}
|
|
15103
|
+
}
|
|
14953
15104
|
/**
|
|
14954
15105
|
* Pushes metric data points to Dynatrace
|
|
14955
15106
|
*
|
|
@@ -16084,6 +16235,8 @@ var MonitoredEntitiesClient = class {
|
|
|
16084
16235
|
* 1. Specify the number of results per page in the **pageSize** query parameter.
|
|
16085
16236
|
* 2. Use the cursor from the **nextPageKey** field of the previous response in the **nextPageKey** query parameter to obtain subsequent pages.
|
|
16086
16237
|
*
|
|
16238
|
+
* @deprecated
|
|
16239
|
+
*
|
|
16087
16240
|
* @returns {Promise<EntitiesList>} Success
|
|
16088
16241
|
*
|
|
16089
16242
|
* @example <caption>Code example</caption>
|
|
@@ -16222,6 +16375,8 @@ var MonitoredEntitiesClient = class {
|
|
|
16222
16375
|
*
|
|
16223
16376
|
* **Required scope:** environment-api:entities:write<br/>**Required permission:** environment:roles:manage-settings
|
|
16224
16377
|
*
|
|
16378
|
+
* @deprecated
|
|
16379
|
+
*
|
|
16225
16380
|
* @returns {Promise<CustomDeviceCreationResult | void>} Success
|
|
16226
16381
|
*
|
|
16227
16382
|
* @example <caption>Code example</caption>
|
|
@@ -16695,6 +16850,8 @@ var MonitoredEntitiesClient = class {
|
|
|
16695
16850
|
*
|
|
16696
16851
|
* **Required scope:** environment-api:entities:read<br/>**Required permission:** environment:roles:viewer
|
|
16697
16852
|
*
|
|
16853
|
+
* @deprecated
|
|
16854
|
+
*
|
|
16698
16855
|
* @returns {Promise<Entity>} Success
|
|
16699
16856
|
*
|
|
16700
16857
|
* @example <caption>Code example</caption>
|
|
@@ -16829,6 +16986,8 @@ var MonitoredEntitiesClient = class {
|
|
|
16829
16986
|
* 1. Specify the number of results per page in the **pageSize** query parameter.
|
|
16830
16987
|
* 2. Use the cursor from the **nextPageKey** field of the previous response in the **nextPageKey** query parameter to obtain subsequent pages.
|
|
16831
16988
|
*
|
|
16989
|
+
* @deprecated
|
|
16990
|
+
*
|
|
16832
16991
|
* @returns {Promise<EntityTypeList>} Success
|
|
16833
16992
|
*
|
|
16834
16993
|
* @example <caption>Code example</caption>
|
|
@@ -16977,6 +17136,8 @@ var MonitoredEntitiesClient = class {
|
|
|
16977
17136
|
*
|
|
16978
17137
|
* **Required scope:** environment-api:entities:read<br/>**Required permission:** environment:roles:viewer
|
|
16979
17138
|
*
|
|
17139
|
+
* @deprecated
|
|
17140
|
+
*
|
|
16980
17141
|
* @returns {Promise<EntityType>} Success
|
|
16981
17142
|
*
|
|
16982
17143
|
* @example <caption>Code example</caption>
|
|
@@ -28218,50 +28379,331 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28218
28379
|
}
|
|
28219
28380
|
}
|
|
28220
28381
|
/**
|
|
28221
|
-
* Lists all synthetic locations (both public and private) available for your environment
|
|
28382
|
+
* Lists all synthetic locations (both public and private) available for your environment
|
|
28383
|
+
*
|
|
28384
|
+
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:viewer
|
|
28385
|
+
*
|
|
28386
|
+
* @returns {Promise<SyntheticLocations>} Success
|
|
28387
|
+
*
|
|
28388
|
+
* @example <caption>Code example</caption>
|
|
28389
|
+
* import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
28390
|
+
*
|
|
28391
|
+
* const data =
|
|
28392
|
+
* await syntheticLocationsNodesAndConfigurationClient.getLocations();
|
|
28393
|
+
*
|
|
28394
|
+
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
|
|
28395
|
+
* @throws {InvalidResponseError}
|
|
28396
|
+
* @throws {ApiClientError}
|
|
28397
|
+
* @throws {ClientRequestError}
|
|
28398
|
+
*/
|
|
28399
|
+
async getLocations(config = {}) {
|
|
28400
|
+
if (!config) {
|
|
28401
|
+
throw new import_shared_errors39.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
28402
|
+
}
|
|
28403
|
+
const query = toQueryString({
|
|
28404
|
+
cloudPlatform: config.cloudPlatform,
|
|
28405
|
+
type: config.type,
|
|
28406
|
+
capability: config.capability
|
|
28407
|
+
});
|
|
28408
|
+
try {
|
|
28409
|
+
const response = await this.httpClient.send({
|
|
28410
|
+
url: `/platform/classic/environment-api/v2/synthetic/locations${query}`,
|
|
28411
|
+
method: "GET",
|
|
28412
|
+
headers: {
|
|
28413
|
+
Accept: "application/json; charset=utf-8, application/json"
|
|
28414
|
+
},
|
|
28415
|
+
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
28416
|
+
statusValidator: (status) => {
|
|
28417
|
+
return [200].includes(status);
|
|
28418
|
+
}
|
|
28419
|
+
});
|
|
28420
|
+
const responseValue = await response.body("json");
|
|
28421
|
+
try {
|
|
28422
|
+
return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
28423
|
+
} catch (err) {
|
|
28424
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28425
|
+
`SyntheticLocationsNodesAndConfigurationClient.getLocations:200`,
|
|
28426
|
+
err,
|
|
28427
|
+
responseValue,
|
|
28428
|
+
void 0,
|
|
28429
|
+
void 0,
|
|
28430
|
+
response
|
|
28431
|
+
);
|
|
28432
|
+
}
|
|
28433
|
+
} catch (e) {
|
|
28434
|
+
if ((0, import_http_client32.isHttpClientAbortError)(e) || (0, import_shared_errors39.isInvalidResponseError)(e)) {
|
|
28435
|
+
throw e;
|
|
28436
|
+
}
|
|
28437
|
+
if (!(0, import_http_client32.isHttpClientResponseError)(e)) {
|
|
28438
|
+
throw new import_shared_errors39.ApiClientError("UnexpectedError", "Unexpected error", e);
|
|
28439
|
+
}
|
|
28440
|
+
const response = e.response;
|
|
28441
|
+
await apiGatewayErrorsHandler(response);
|
|
28442
|
+
if (response.status >= 400 && response.status <= 499) {
|
|
28443
|
+
const responseValue = await response.body("json");
|
|
28444
|
+
try {
|
|
28445
|
+
const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
28446
|
+
throw new ErrorEnvelopeError(
|
|
28447
|
+
`${response.status}`,
|
|
28448
|
+
response,
|
|
28449
|
+
errorBody,
|
|
28450
|
+
getErrorMessage(errorBody, "Client side error."),
|
|
28451
|
+
e
|
|
28452
|
+
);
|
|
28453
|
+
} catch (err) {
|
|
28454
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
28455
|
+
throw err;
|
|
28456
|
+
}
|
|
28457
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28458
|
+
`SyntheticLocationsNodesAndConfigurationClient.getLocations:${response.status}`,
|
|
28459
|
+
err,
|
|
28460
|
+
responseValue,
|
|
28461
|
+
"ErrorEnvelope",
|
|
28462
|
+
void 0,
|
|
28463
|
+
response
|
|
28464
|
+
);
|
|
28465
|
+
}
|
|
28466
|
+
} else if (response.status >= 500 && response.status <= 599) {
|
|
28467
|
+
const responseValue = await response.body("json");
|
|
28468
|
+
try {
|
|
28469
|
+
const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
28470
|
+
throw new ErrorEnvelopeError(
|
|
28471
|
+
`${response.status}`,
|
|
28472
|
+
response,
|
|
28473
|
+
errorBody,
|
|
28474
|
+
getErrorMessage(errorBody, "Server side error."),
|
|
28475
|
+
e
|
|
28476
|
+
);
|
|
28477
|
+
} catch (err) {
|
|
28478
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
28479
|
+
throw err;
|
|
28480
|
+
}
|
|
28481
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28482
|
+
`SyntheticLocationsNodesAndConfigurationClient.getLocations:${response.status}`,
|
|
28483
|
+
err,
|
|
28484
|
+
responseValue,
|
|
28485
|
+
"ErrorEnvelope",
|
|
28486
|
+
void 0,
|
|
28487
|
+
response
|
|
28488
|
+
);
|
|
28489
|
+
}
|
|
28490
|
+
} else {
|
|
28491
|
+
try {
|
|
28492
|
+
const responseValue = await response.body("json");
|
|
28493
|
+
throw new import_shared_errors39.ClientRequestError(
|
|
28494
|
+
`${response.status}`,
|
|
28495
|
+
response,
|
|
28496
|
+
responseValue,
|
|
28497
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
28498
|
+
);
|
|
28499
|
+
} catch (error) {
|
|
28500
|
+
if (error instanceof import_shared_errors39.ClientRequestError) {
|
|
28501
|
+
throw error;
|
|
28502
|
+
}
|
|
28503
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
28504
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28505
|
+
`${response.status}`,
|
|
28506
|
+
error,
|
|
28507
|
+
responseValue,
|
|
28508
|
+
"json",
|
|
28509
|
+
"Unexpected api response",
|
|
28510
|
+
response
|
|
28511
|
+
);
|
|
28512
|
+
}
|
|
28513
|
+
}
|
|
28514
|
+
}
|
|
28515
|
+
}
|
|
28516
|
+
/**
|
|
28517
|
+
* Creates a new private synthetic location
|
|
28518
|
+
*
|
|
28519
|
+
* **Required scope:** environment-api:synthetic:write<br/>**Required permission:** environment:roles:manage-settings
|
|
28520
|
+
*
|
|
28521
|
+
* @returns {Promise<SyntheticLocationIdsDto>} Success. The private location has been created. The response contains the ID of the new location.
|
|
28522
|
+
*
|
|
28523
|
+
* @example <caption>Code example</caption>
|
|
28524
|
+
* import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
28525
|
+
*
|
|
28526
|
+
* const data =
|
|
28527
|
+
* await syntheticLocationsNodesAndConfigurationClient.addLocation(
|
|
28528
|
+
* {
|
|
28529
|
+
* body: {
|
|
28530
|
+
* latitude: 10,
|
|
28531
|
+
* longitude: 10,
|
|
28532
|
+
* name: "...",
|
|
28533
|
+
* nodes: ["..."],
|
|
28534
|
+
* type: "CLUSTER",
|
|
28535
|
+
* },
|
|
28536
|
+
* },
|
|
28537
|
+
* );
|
|
28538
|
+
*
|
|
28539
|
+
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
|
|
28540
|
+
* @throws {InvalidResponseError}
|
|
28541
|
+
* @throws {ApiClientError}
|
|
28542
|
+
* @throws {ClientRequestError}
|
|
28543
|
+
*/
|
|
28544
|
+
async addLocation(config) {
|
|
28545
|
+
if (!config) {
|
|
28546
|
+
throw new import_shared_errors39.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
28547
|
+
}
|
|
28548
|
+
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
28549
|
+
try {
|
|
28550
|
+
const response = await this.httpClient.send({
|
|
28551
|
+
url: `/platform/classic/environment-api/v2/synthetic/locations`,
|
|
28552
|
+
method: "POST",
|
|
28553
|
+
requestBodyType: "json",
|
|
28554
|
+
body: encodedBody,
|
|
28555
|
+
headers: {
|
|
28556
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
28557
|
+
Accept: "application/json; charset=utf-8, application/json"
|
|
28558
|
+
},
|
|
28559
|
+
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
28560
|
+
statusValidator: (status) => {
|
|
28561
|
+
return [201].includes(status);
|
|
28562
|
+
}
|
|
28563
|
+
});
|
|
28564
|
+
const responseValue = await response.body("json");
|
|
28565
|
+
try {
|
|
28566
|
+
return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
28567
|
+
} catch (err) {
|
|
28568
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28569
|
+
`SyntheticLocationsNodesAndConfigurationClient.addLocation:201`,
|
|
28570
|
+
err,
|
|
28571
|
+
responseValue,
|
|
28572
|
+
void 0,
|
|
28573
|
+
void 0,
|
|
28574
|
+
response
|
|
28575
|
+
);
|
|
28576
|
+
}
|
|
28577
|
+
} catch (e) {
|
|
28578
|
+
if ((0, import_http_client32.isHttpClientAbortError)(e) || (0, import_shared_errors39.isInvalidResponseError)(e)) {
|
|
28579
|
+
throw e;
|
|
28580
|
+
}
|
|
28581
|
+
if (!(0, import_http_client32.isHttpClientResponseError)(e)) {
|
|
28582
|
+
throw new import_shared_errors39.ApiClientError("UnexpectedError", "Unexpected error", e);
|
|
28583
|
+
}
|
|
28584
|
+
const response = e.response;
|
|
28585
|
+
await apiGatewayErrorsHandler(response);
|
|
28586
|
+
if (response.status >= 400 && response.status <= 499) {
|
|
28587
|
+
const responseValue = await response.body("json");
|
|
28588
|
+
try {
|
|
28589
|
+
const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
28590
|
+
throw new ErrorEnvelopeError(
|
|
28591
|
+
`${response.status}`,
|
|
28592
|
+
response,
|
|
28593
|
+
errorBody,
|
|
28594
|
+
getErrorMessage(errorBody, "Client side error."),
|
|
28595
|
+
e
|
|
28596
|
+
);
|
|
28597
|
+
} catch (err) {
|
|
28598
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
28599
|
+
throw err;
|
|
28600
|
+
}
|
|
28601
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28602
|
+
`SyntheticLocationsNodesAndConfigurationClient.addLocation:${response.status}`,
|
|
28603
|
+
err,
|
|
28604
|
+
responseValue,
|
|
28605
|
+
"ErrorEnvelope",
|
|
28606
|
+
void 0,
|
|
28607
|
+
response
|
|
28608
|
+
);
|
|
28609
|
+
}
|
|
28610
|
+
} else if (response.status >= 500 && response.status <= 599) {
|
|
28611
|
+
const responseValue = await response.body("json");
|
|
28612
|
+
try {
|
|
28613
|
+
const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
28614
|
+
throw new ErrorEnvelopeError(
|
|
28615
|
+
`${response.status}`,
|
|
28616
|
+
response,
|
|
28617
|
+
errorBody,
|
|
28618
|
+
getErrorMessage(errorBody, "Server side error."),
|
|
28619
|
+
e
|
|
28620
|
+
);
|
|
28621
|
+
} catch (err) {
|
|
28622
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
28623
|
+
throw err;
|
|
28624
|
+
}
|
|
28625
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28626
|
+
`SyntheticLocationsNodesAndConfigurationClient.addLocation:${response.status}`,
|
|
28627
|
+
err,
|
|
28628
|
+
responseValue,
|
|
28629
|
+
"ErrorEnvelope",
|
|
28630
|
+
void 0,
|
|
28631
|
+
response
|
|
28632
|
+
);
|
|
28633
|
+
}
|
|
28634
|
+
} else {
|
|
28635
|
+
try {
|
|
28636
|
+
const responseValue = await response.body("json");
|
|
28637
|
+
throw new import_shared_errors39.ClientRequestError(
|
|
28638
|
+
`${response.status}`,
|
|
28639
|
+
response,
|
|
28640
|
+
responseValue,
|
|
28641
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
28642
|
+
);
|
|
28643
|
+
} catch (error) {
|
|
28644
|
+
if (error instanceof import_shared_errors39.ClientRequestError) {
|
|
28645
|
+
throw error;
|
|
28646
|
+
}
|
|
28647
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
28648
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28649
|
+
`${response.status}`,
|
|
28650
|
+
error,
|
|
28651
|
+
responseValue,
|
|
28652
|
+
"json",
|
|
28653
|
+
"Unexpected api response",
|
|
28654
|
+
response
|
|
28655
|
+
);
|
|
28656
|
+
}
|
|
28657
|
+
}
|
|
28658
|
+
}
|
|
28659
|
+
}
|
|
28660
|
+
/**
|
|
28661
|
+
* Gets list of commands to deploy synthetic location in Kubernetes/Openshift cluster
|
|
28222
28662
|
*
|
|
28223
|
-
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:
|
|
28663
|
+
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:manage-settings
|
|
28224
28664
|
*
|
|
28225
|
-
* @returns {Promise<
|
|
28665
|
+
* @returns {Promise<string>} Success. The response contains the list of commands that needs to be executed to deploy a synthetic location.
|
|
28226
28666
|
*
|
|
28227
28667
|
* @example <caption>Code example</caption>
|
|
28228
28668
|
* import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
28229
28669
|
*
|
|
28230
28670
|
* const data =
|
|
28231
|
-
* await syntheticLocationsNodesAndConfigurationClient.
|
|
28671
|
+
* await syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentApplyCommands();
|
|
28232
28672
|
*
|
|
28233
28673
|
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
|
|
28234
28674
|
* @throws {InvalidResponseError}
|
|
28235
28675
|
* @throws {ApiClientError}
|
|
28236
28676
|
* @throws {ClientRequestError}
|
|
28237
28677
|
*/
|
|
28238
|
-
async
|
|
28678
|
+
async getLocationDeploymentApplyCommands(config = {}) {
|
|
28239
28679
|
if (!config) {
|
|
28240
28680
|
throw new import_shared_errors39.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
28241
28681
|
}
|
|
28242
28682
|
const query = toQueryString({
|
|
28243
|
-
|
|
28244
|
-
|
|
28245
|
-
|
|
28683
|
+
platform: config.platform,
|
|
28684
|
+
namespace: config.namespace,
|
|
28685
|
+
filename: config.filename,
|
|
28686
|
+
fipsMode: config.fipsMode,
|
|
28687
|
+
squidProxyConfig: config.squidProxyConfig
|
|
28246
28688
|
});
|
|
28247
28689
|
try {
|
|
28248
28690
|
const response = await this.httpClient.send({
|
|
28249
|
-
url: `/platform/classic/environment-api/v2/synthetic/locations${query}`,
|
|
28691
|
+
url: `/platform/classic/environment-api/v2/synthetic/locations/commands/apply${query}`,
|
|
28250
28692
|
method: "GET",
|
|
28251
28693
|
headers: {
|
|
28252
|
-
Accept: "
|
|
28694
|
+
Accept: "text/plain, application/json"
|
|
28253
28695
|
},
|
|
28254
28696
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
28255
28697
|
statusValidator: (status) => {
|
|
28256
28698
|
return [200].includes(status);
|
|
28257
28699
|
}
|
|
28258
28700
|
});
|
|
28259
|
-
const responseValue = await response.body("
|
|
28701
|
+
const responseValue = await response.body("text");
|
|
28260
28702
|
try {
|
|
28261
|
-
return
|
|
28703
|
+
return responseValue;
|
|
28262
28704
|
} catch (err) {
|
|
28263
28705
|
throw new import_shared_errors39.InvalidResponseError(
|
|
28264
|
-
`SyntheticLocationsNodesAndConfigurationClient.
|
|
28706
|
+
`SyntheticLocationsNodesAndConfigurationClient.getLocationDeploymentApplyCommands:200`,
|
|
28265
28707
|
err,
|
|
28266
28708
|
responseValue,
|
|
28267
28709
|
void 0,
|
|
@@ -28294,7 +28736,7 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28294
28736
|
throw err;
|
|
28295
28737
|
}
|
|
28296
28738
|
throw new import_shared_errors39.InvalidResponseError(
|
|
28297
|
-
`SyntheticLocationsNodesAndConfigurationClient.
|
|
28739
|
+
`SyntheticLocationsNodesAndConfigurationClient.getLocationDeploymentApplyCommands:${response.status}`,
|
|
28298
28740
|
err,
|
|
28299
28741
|
responseValue,
|
|
28300
28742
|
"ErrorEnvelope",
|
|
@@ -28318,7 +28760,7 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28318
28760
|
throw err;
|
|
28319
28761
|
}
|
|
28320
28762
|
throw new import_shared_errors39.InvalidResponseError(
|
|
28321
|
-
`SyntheticLocationsNodesAndConfigurationClient.
|
|
28763
|
+
`SyntheticLocationsNodesAndConfigurationClient.getLocationDeploymentApplyCommands:${response.status}`,
|
|
28322
28764
|
err,
|
|
28323
28765
|
responseValue,
|
|
28324
28766
|
"ErrorEnvelope",
|
|
@@ -28353,59 +28795,46 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28353
28795
|
}
|
|
28354
28796
|
}
|
|
28355
28797
|
/**
|
|
28356
|
-
*
|
|
28798
|
+
* Gets list of commands to deploy metric adapter in Kubernetes/Openshift cluster | maturity=EARLY_ADOPTER
|
|
28357
28799
|
*
|
|
28358
|
-
* **Required scope:** environment-api:synthetic:
|
|
28800
|
+
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:manage-settings
|
|
28359
28801
|
*
|
|
28360
|
-
* @returns {Promise<
|
|
28802
|
+
* @returns {Promise<string>} Success. The response contains the list of commands that needs to be executed to deploy a metric adapter.
|
|
28361
28803
|
*
|
|
28362
28804
|
* @example <caption>Code example</caption>
|
|
28363
28805
|
* import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
28364
28806
|
*
|
|
28365
28807
|
* const data =
|
|
28366
|
-
* await syntheticLocationsNodesAndConfigurationClient.
|
|
28367
|
-
* {
|
|
28368
|
-
* body: {
|
|
28369
|
-
* latitude: 10,
|
|
28370
|
-
* longitude: 10,
|
|
28371
|
-
* name: "...",
|
|
28372
|
-
* nodes: ["..."],
|
|
28373
|
-
* type: "CLUSTER",
|
|
28374
|
-
* },
|
|
28375
|
-
* },
|
|
28376
|
-
* );
|
|
28808
|
+
* await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentApplyCommands();
|
|
28377
28809
|
*
|
|
28378
28810
|
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
|
|
28379
28811
|
* @throws {InvalidResponseError}
|
|
28380
28812
|
* @throws {ApiClientError}
|
|
28381
28813
|
* @throws {ClientRequestError}
|
|
28382
28814
|
*/
|
|
28383
|
-
async
|
|
28815
|
+
async getMetricAdapterDeploymentApplyCommands(config = {}) {
|
|
28384
28816
|
if (!config) {
|
|
28385
28817
|
throw new import_shared_errors39.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
28386
28818
|
}
|
|
28387
|
-
const
|
|
28819
|
+
const query = toQueryString({ platform: config.platform, namespace: config.namespace, filename: config.filename });
|
|
28388
28820
|
try {
|
|
28389
28821
|
const response = await this.httpClient.send({
|
|
28390
|
-
url: `/platform/classic/environment-api/v2/synthetic/locations`,
|
|
28391
|
-
method: "
|
|
28392
|
-
requestBodyType: "json",
|
|
28393
|
-
body: encodedBody,
|
|
28822
|
+
url: `/platform/classic/environment-api/v2/synthetic/locations/metricAdapter/commands/apply${query}`,
|
|
28823
|
+
method: "GET",
|
|
28394
28824
|
headers: {
|
|
28395
|
-
|
|
28396
|
-
Accept: "application/json; charset=utf-8, application/json"
|
|
28825
|
+
Accept: "text/plain, application/json"
|
|
28397
28826
|
},
|
|
28398
28827
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
28399
28828
|
statusValidator: (status) => {
|
|
28400
|
-
return [
|
|
28829
|
+
return [200].includes(status);
|
|
28401
28830
|
}
|
|
28402
28831
|
});
|
|
28403
|
-
const responseValue = await response.body("
|
|
28832
|
+
const responseValue = await response.body("text");
|
|
28404
28833
|
try {
|
|
28405
|
-
return
|
|
28834
|
+
return responseValue;
|
|
28406
28835
|
} catch (err) {
|
|
28407
28836
|
throw new import_shared_errors39.InvalidResponseError(
|
|
28408
|
-
`SyntheticLocationsNodesAndConfigurationClient.
|
|
28837
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentApplyCommands:200`,
|
|
28409
28838
|
err,
|
|
28410
28839
|
responseValue,
|
|
28411
28840
|
void 0,
|
|
@@ -28438,7 +28867,7 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28438
28867
|
throw err;
|
|
28439
28868
|
}
|
|
28440
28869
|
throw new import_shared_errors39.InvalidResponseError(
|
|
28441
|
-
`SyntheticLocationsNodesAndConfigurationClient.
|
|
28870
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentApplyCommands:${response.status}`,
|
|
28442
28871
|
err,
|
|
28443
28872
|
responseValue,
|
|
28444
28873
|
"ErrorEnvelope",
|
|
@@ -28462,7 +28891,7 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28462
28891
|
throw err;
|
|
28463
28892
|
}
|
|
28464
28893
|
throw new import_shared_errors39.InvalidResponseError(
|
|
28465
|
-
`SyntheticLocationsNodesAndConfigurationClient.
|
|
28894
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentApplyCommands:${response.status}`,
|
|
28466
28895
|
err,
|
|
28467
28896
|
responseValue,
|
|
28468
28897
|
"ErrorEnvelope",
|
|
@@ -28497,46 +28926,55 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28497
28926
|
}
|
|
28498
28927
|
}
|
|
28499
28928
|
/**
|
|
28500
|
-
* Gets list of commands to
|
|
28929
|
+
* Gets list of commands to delete metric adapter in Kubernetes/Openshift cluster | maturity=EARLY_ADOPTER
|
|
28501
28930
|
*
|
|
28502
28931
|
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:manage-settings
|
|
28503
28932
|
*
|
|
28504
|
-
* @returns {Promise<
|
|
28933
|
+
* @returns {Promise<string>} Success. The response contains the list of commands that needs to be executed to delete a metric adapter.
|
|
28505
28934
|
*
|
|
28506
28935
|
* @example <caption>Code example</caption>
|
|
28507
28936
|
* import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
28508
28937
|
*
|
|
28509
28938
|
* const data =
|
|
28510
|
-
* await syntheticLocationsNodesAndConfigurationClient.
|
|
28939
|
+
* await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentDeleteCommands();
|
|
28511
28940
|
*
|
|
28512
28941
|
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
|
|
28513
28942
|
* @throws {InvalidResponseError}
|
|
28514
28943
|
* @throws {ApiClientError}
|
|
28515
28944
|
* @throws {ClientRequestError}
|
|
28516
28945
|
*/
|
|
28517
|
-
async
|
|
28946
|
+
async getMetricAdapterDeploymentDeleteCommands(config = {}) {
|
|
28518
28947
|
if (!config) {
|
|
28519
28948
|
throw new import_shared_errors39.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
28520
28949
|
}
|
|
28521
|
-
const query = toQueryString({
|
|
28522
|
-
platform: config.platform,
|
|
28523
|
-
namespace: config.namespace,
|
|
28524
|
-
filename: config.filename,
|
|
28525
|
-
fipsMode: config.fipsMode,
|
|
28526
|
-
squidProxyConfig: config.squidProxyConfig
|
|
28527
|
-
});
|
|
28950
|
+
const query = toQueryString({ platform: config.platform, filename: config.filename });
|
|
28528
28951
|
try {
|
|
28529
|
-
await this.httpClient.send({
|
|
28530
|
-
url: `/platform/classic/environment-api/v2/synthetic/locations/commands/
|
|
28952
|
+
const response = await this.httpClient.send({
|
|
28953
|
+
url: `/platform/classic/environment-api/v2/synthetic/locations/metricAdapter/commands/delete${query}`,
|
|
28531
28954
|
method: "GET",
|
|
28955
|
+
headers: {
|
|
28956
|
+
Accept: "text/plain, application/json"
|
|
28957
|
+
},
|
|
28532
28958
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
28533
28959
|
statusValidator: (status) => {
|
|
28534
28960
|
return [200].includes(status);
|
|
28535
28961
|
}
|
|
28536
28962
|
});
|
|
28537
|
-
|
|
28963
|
+
const responseValue = await response.body("text");
|
|
28964
|
+
try {
|
|
28965
|
+
return responseValue;
|
|
28966
|
+
} catch (err) {
|
|
28967
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
28968
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentDeleteCommands:200`,
|
|
28969
|
+
err,
|
|
28970
|
+
responseValue,
|
|
28971
|
+
void 0,
|
|
28972
|
+
void 0,
|
|
28973
|
+
response
|
|
28974
|
+
);
|
|
28975
|
+
}
|
|
28538
28976
|
} catch (e) {
|
|
28539
|
-
if ((0, import_http_client32.isHttpClientAbortError)(e)) {
|
|
28977
|
+
if ((0, import_http_client32.isHttpClientAbortError)(e) || (0, import_shared_errors39.isInvalidResponseError)(e)) {
|
|
28540
28978
|
throw e;
|
|
28541
28979
|
}
|
|
28542
28980
|
if (!(0, import_http_client32.isHttpClientResponseError)(e)) {
|
|
@@ -28560,7 +28998,7 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28560
28998
|
throw err;
|
|
28561
28999
|
}
|
|
28562
29000
|
throw new import_shared_errors39.InvalidResponseError(
|
|
28563
|
-
`SyntheticLocationsNodesAndConfigurationClient.
|
|
29001
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentDeleteCommands:${response.status}`,
|
|
28564
29002
|
err,
|
|
28565
29003
|
responseValue,
|
|
28566
29004
|
"ErrorEnvelope",
|
|
@@ -28584,7 +29022,138 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
28584
29022
|
throw err;
|
|
28585
29023
|
}
|
|
28586
29024
|
throw new import_shared_errors39.InvalidResponseError(
|
|
28587
|
-
`SyntheticLocationsNodesAndConfigurationClient.
|
|
29025
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentDeleteCommands:${response.status}`,
|
|
29026
|
+
err,
|
|
29027
|
+
responseValue,
|
|
29028
|
+
"ErrorEnvelope",
|
|
29029
|
+
void 0,
|
|
29030
|
+
response
|
|
29031
|
+
);
|
|
29032
|
+
}
|
|
29033
|
+
} else {
|
|
29034
|
+
try {
|
|
29035
|
+
const responseValue = await response.body("json");
|
|
29036
|
+
throw new import_shared_errors39.ClientRequestError(
|
|
29037
|
+
`${response.status}`,
|
|
29038
|
+
response,
|
|
29039
|
+
responseValue,
|
|
29040
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
29041
|
+
);
|
|
29042
|
+
} catch (error) {
|
|
29043
|
+
if (error instanceof import_shared_errors39.ClientRequestError) {
|
|
29044
|
+
throw error;
|
|
29045
|
+
}
|
|
29046
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
29047
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
29048
|
+
`${response.status}`,
|
|
29049
|
+
error,
|
|
29050
|
+
responseValue,
|
|
29051
|
+
"json",
|
|
29052
|
+
"Unexpected api response",
|
|
29053
|
+
response
|
|
29054
|
+
);
|
|
29055
|
+
}
|
|
29056
|
+
}
|
|
29057
|
+
}
|
|
29058
|
+
}
|
|
29059
|
+
/**
|
|
29060
|
+
* Gets yaml file content to deploy metric adapter in Kubernetes/Openshift cluster | maturity=EARLY_ADOPTER
|
|
29061
|
+
*
|
|
29062
|
+
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:manage-settings
|
|
29063
|
+
*
|
|
29064
|
+
* @returns {Promise<Binary>} Success. The response contains the content of deployment yaml file.
|
|
29065
|
+
*
|
|
29066
|
+
* @example <caption>Code example</caption>
|
|
29067
|
+
* import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
29068
|
+
*
|
|
29069
|
+
* const data =
|
|
29070
|
+
* await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentYaml();
|
|
29071
|
+
*
|
|
29072
|
+
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
|
|
29073
|
+
* @throws {InvalidResponseError}
|
|
29074
|
+
* @throws {ApiClientError}
|
|
29075
|
+
* @throws {ClientRequestError}
|
|
29076
|
+
*/
|
|
29077
|
+
async getMetricAdapterDeploymentYaml(config = {}) {
|
|
29078
|
+
if (!config) {
|
|
29079
|
+
throw new import_shared_errors39.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
29080
|
+
}
|
|
29081
|
+
const query = toQueryString({ platform: config.platform, namespace: config.namespace });
|
|
29082
|
+
try {
|
|
29083
|
+
const response = await this.httpClient.send({
|
|
29084
|
+
url: `/platform/classic/environment-api/v2/synthetic/locations/metricAdapter/yaml${query}`,
|
|
29085
|
+
method: "GET",
|
|
29086
|
+
headers: {
|
|
29087
|
+
Accept: "application/yaml, application/json"
|
|
29088
|
+
},
|
|
29089
|
+
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
29090
|
+
statusValidator: (status) => {
|
|
29091
|
+
return [200].includes(status);
|
|
29092
|
+
}
|
|
29093
|
+
});
|
|
29094
|
+
const responseValue = await response.body("binary");
|
|
29095
|
+
try {
|
|
29096
|
+
return responseValue;
|
|
29097
|
+
} catch (err) {
|
|
29098
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
29099
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentYaml:200`,
|
|
29100
|
+
err,
|
|
29101
|
+
responseValue,
|
|
29102
|
+
void 0,
|
|
29103
|
+
void 0,
|
|
29104
|
+
response
|
|
29105
|
+
);
|
|
29106
|
+
}
|
|
29107
|
+
} catch (e) {
|
|
29108
|
+
if ((0, import_http_client32.isHttpClientAbortError)(e) || (0, import_shared_errors39.isInvalidResponseError)(e)) {
|
|
29109
|
+
throw e;
|
|
29110
|
+
}
|
|
29111
|
+
if (!(0, import_http_client32.isHttpClientResponseError)(e)) {
|
|
29112
|
+
throw new import_shared_errors39.ApiClientError("UnexpectedError", "Unexpected error", e);
|
|
29113
|
+
}
|
|
29114
|
+
const response = e.response;
|
|
29115
|
+
await apiGatewayErrorsHandler(response);
|
|
29116
|
+
if (response.status >= 400 && response.status <= 499) {
|
|
29117
|
+
const responseValue = await response.body("json");
|
|
29118
|
+
try {
|
|
29119
|
+
const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
29120
|
+
throw new ErrorEnvelopeError(
|
|
29121
|
+
`${response.status}`,
|
|
29122
|
+
response,
|
|
29123
|
+
errorBody,
|
|
29124
|
+
getErrorMessage(errorBody, "Client side error."),
|
|
29125
|
+
e
|
|
29126
|
+
);
|
|
29127
|
+
} catch (err) {
|
|
29128
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
29129
|
+
throw err;
|
|
29130
|
+
}
|
|
29131
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
29132
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentYaml:${response.status}`,
|
|
29133
|
+
err,
|
|
29134
|
+
responseValue,
|
|
29135
|
+
"ErrorEnvelope",
|
|
29136
|
+
void 0,
|
|
29137
|
+
response
|
|
29138
|
+
);
|
|
29139
|
+
}
|
|
29140
|
+
} else if (response.status >= 500 && response.status <= 599) {
|
|
29141
|
+
const responseValue = await response.body("json");
|
|
29142
|
+
try {
|
|
29143
|
+
const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
|
|
29144
|
+
throw new ErrorEnvelopeError(
|
|
29145
|
+
`${response.status}`,
|
|
29146
|
+
response,
|
|
29147
|
+
errorBody,
|
|
29148
|
+
getErrorMessage(errorBody, "Server side error."),
|
|
29149
|
+
e
|
|
29150
|
+
);
|
|
29151
|
+
} catch (err) {
|
|
29152
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
29153
|
+
throw err;
|
|
29154
|
+
}
|
|
29155
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
29156
|
+
`SyntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentYaml:${response.status}`,
|
|
28588
29157
|
err,
|
|
28589
29158
|
responseValue,
|
|
28590
29159
|
"ErrorEnvelope",
|
|
@@ -29250,11 +29819,11 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
29250
29819
|
}
|
|
29251
29820
|
}
|
|
29252
29821
|
/**
|
|
29253
|
-
* Gets list of commands to delete synthetic location in Kubernetes/Openshift cluster
|
|
29822
|
+
* Gets list of commands to delete synthetic location in Kubernetes/Openshift cluster
|
|
29254
29823
|
*
|
|
29255
29824
|
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:manage-settings
|
|
29256
29825
|
*
|
|
29257
|
-
* @returns {Promise<
|
|
29826
|
+
* @returns {Promise<string>} Success. The response contains the list of commands that needs to be executed to delete a synthetic location.
|
|
29258
29827
|
*
|
|
29259
29828
|
* @example <caption>Code example</caption>
|
|
29260
29829
|
* import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
@@ -29275,17 +29844,32 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
29275
29844
|
}
|
|
29276
29845
|
const query = toQueryString({ platform: config.platform, namespace: config.namespace, filename: config.filename });
|
|
29277
29846
|
try {
|
|
29278
|
-
await this.httpClient.send({
|
|
29847
|
+
const response = await this.httpClient.send({
|
|
29279
29848
|
url: `/platform/classic/environment-api/v2/synthetic/locations/${config.locationId}/commands/delete${query}`,
|
|
29280
29849
|
method: "GET",
|
|
29850
|
+
headers: {
|
|
29851
|
+
Accept: "text/plain, application/json"
|
|
29852
|
+
},
|
|
29281
29853
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
29282
29854
|
statusValidator: (status) => {
|
|
29283
29855
|
return [200].includes(status);
|
|
29284
29856
|
}
|
|
29285
29857
|
});
|
|
29286
|
-
|
|
29858
|
+
const responseValue = await response.body("text");
|
|
29859
|
+
try {
|
|
29860
|
+
return responseValue;
|
|
29861
|
+
} catch (err) {
|
|
29862
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
29863
|
+
`SyntheticLocationsNodesAndConfigurationClient.getLocationDeploymentDeleteCommands:200`,
|
|
29864
|
+
err,
|
|
29865
|
+
responseValue,
|
|
29866
|
+
void 0,
|
|
29867
|
+
void 0,
|
|
29868
|
+
response
|
|
29869
|
+
);
|
|
29870
|
+
}
|
|
29287
29871
|
} catch (e) {
|
|
29288
|
-
if ((0, import_http_client32.isHttpClientAbortError)(e)) {
|
|
29872
|
+
if ((0, import_http_client32.isHttpClientAbortError)(e) || (0, import_shared_errors39.isInvalidResponseError)(e)) {
|
|
29289
29873
|
throw e;
|
|
29290
29874
|
}
|
|
29291
29875
|
if (!(0, import_http_client32.isHttpClientResponseError)(e)) {
|
|
@@ -29368,11 +29952,11 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
29368
29952
|
}
|
|
29369
29953
|
}
|
|
29370
29954
|
/**
|
|
29371
|
-
* Gets yaml file content to deploy location in Kubernetes/Openshift cluster
|
|
29955
|
+
* Gets yaml file content to deploy location in Kubernetes/Openshift cluster
|
|
29372
29956
|
*
|
|
29373
29957
|
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:manage-settings
|
|
29374
29958
|
*
|
|
29375
|
-
* @returns {Promise<
|
|
29959
|
+
* @returns {Promise<Binary>} Success. The response contains the content of deployment yaml file.
|
|
29376
29960
|
*
|
|
29377
29961
|
* @example <caption>Code example</caption>
|
|
29378
29962
|
* import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
|
|
@@ -29399,17 +29983,32 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
29399
29983
|
tagVersionSynthetic: config.tagVersionSynthetic
|
|
29400
29984
|
});
|
|
29401
29985
|
try {
|
|
29402
|
-
await this.httpClient.send({
|
|
29986
|
+
const response = await this.httpClient.send({
|
|
29403
29987
|
url: `/platform/classic/environment-api/v2/synthetic/locations/${config.locationId}/yaml${query}`,
|
|
29404
29988
|
method: "GET",
|
|
29989
|
+
headers: {
|
|
29990
|
+
Accept: "application/yaml, application/json"
|
|
29991
|
+
},
|
|
29405
29992
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
29406
29993
|
statusValidator: (status) => {
|
|
29407
29994
|
return [200].includes(status);
|
|
29408
29995
|
}
|
|
29409
29996
|
});
|
|
29410
|
-
|
|
29997
|
+
const responseValue = await response.body("binary");
|
|
29998
|
+
try {
|
|
29999
|
+
return responseValue;
|
|
30000
|
+
} catch (err) {
|
|
30001
|
+
throw new import_shared_errors39.InvalidResponseError(
|
|
30002
|
+
`SyntheticLocationsNodesAndConfigurationClient.getLocationDeploymentYaml:200`,
|
|
30003
|
+
err,
|
|
30004
|
+
responseValue,
|
|
30005
|
+
void 0,
|
|
30006
|
+
void 0,
|
|
30007
|
+
response
|
|
30008
|
+
);
|
|
30009
|
+
}
|
|
29411
30010
|
} catch (e) {
|
|
29412
|
-
if ((0, import_http_client32.isHttpClientAbortError)(e)) {
|
|
30011
|
+
if ((0, import_http_client32.isHttpClientAbortError)(e) || (0, import_shared_errors39.isInvalidResponseError)(e)) {
|
|
29413
30012
|
throw e;
|
|
29414
30013
|
}
|
|
29415
30014
|
if (!(0, import_http_client32.isHttpClientResponseError)(e)) {
|
|
@@ -29494,7 +30093,7 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
|
|
|
29494
30093
|
/**
|
|
29495
30094
|
* Lists all synthetic nodes available in your environment
|
|
29496
30095
|
*
|
|
29497
|
-
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:
|
|
30096
|
+
* **Required scope:** environment-api:synthetic:read<br/>**Required permission:** environment:roles:viewer
|
|
29498
30097
|
*
|
|
29499
30098
|
* @returns {Promise<Nodes>} Success
|
|
29500
30099
|
*
|
|
@@ -29774,7 +30373,7 @@ var SyntheticNetworkAvailabilityMonitorsClient = class {
|
|
|
29774
30373
|
this.shouldTransformDates = options?.transformDates ?? true;
|
|
29775
30374
|
}
|
|
29776
30375
|
/**
|
|
29777
|
-
* Gets all synthetic monitors. Currently network availability monitors only. | maturity=EARLY_ADOPTER
|
|
30376
|
+
* Gets all synthetic monitors. Currently browser and network availability monitors only. | maturity=EARLY_ADOPTER
|
|
29778
30377
|
*
|
|
29779
30378
|
* **Required scope:** environment-api:synthetic-monitors:read<br/>**Required permission:** environment:roles:manage-settings
|
|
29780
30379
|
*
|
|
@@ -29905,7 +30504,7 @@ var SyntheticNetworkAvailabilityMonitorsClient = class {
|
|
|
29905
30504
|
}
|
|
29906
30505
|
}
|
|
29907
30506
|
/**
|
|
29908
|
-
* Creates a synthetic monitor definition. Currently network availability monitors only. | maturity=EARLY_ADOPTER
|
|
30507
|
+
* Creates a synthetic monitor definition. Currently browser and network availability monitors only. | maturity=EARLY_ADOPTER
|
|
29909
30508
|
*
|
|
29910
30509
|
* **Required scope:** environment-api:synthetic-monitors:write<br/>**Required permission:** environment:roles:manage-settings
|
|
29911
30510
|
*
|
|
@@ -30037,7 +30636,7 @@ var SyntheticNetworkAvailabilityMonitorsClient = class {
|
|
|
30037
30636
|
}
|
|
30038
30637
|
}
|
|
30039
30638
|
/**
|
|
30040
|
-
* Gets a synthetic monitor definition for the given monitor ID. Currently network availability monitors only. | maturity=EARLY_ADOPTER
|
|
30639
|
+
* Gets a synthetic monitor definition for the given monitor ID. Currently browser and network availability monitors only. | maturity=EARLY_ADOPTER
|
|
30041
30640
|
*
|
|
30042
30641
|
* **Required scope:** environment-api:synthetic-monitors:read<br/>**Required permission:** environment:roles:manage-settings
|
|
30043
30642
|
*
|
|
@@ -30166,7 +30765,7 @@ var SyntheticNetworkAvailabilityMonitorsClient = class {
|
|
|
30166
30765
|
}
|
|
30167
30766
|
}
|
|
30168
30767
|
/**
|
|
30169
|
-
* Updates a synthetic monitor definition for the given monitor ID. Currently network availability monitors only. | maturity=EARLY_ADOPTER
|
|
30768
|
+
* Updates a synthetic monitor definition for the given monitor ID. Currently browser and network availability monitors only. | maturity=EARLY_ADOPTER
|
|
30170
30769
|
*
|
|
30171
30770
|
* **Required scope:** environment-api:synthetic-monitors:write<br/>**Required permission:** environment:roles:manage-settings
|
|
30172
30771
|
*
|
|
@@ -30283,7 +30882,7 @@ var SyntheticNetworkAvailabilityMonitorsClient = class {
|
|
|
30283
30882
|
}
|
|
30284
30883
|
}
|
|
30285
30884
|
/**
|
|
30286
|
-
* Deletes a synthetic monitor definition for the given monitor ID. Currently network availability monitors only. | maturity=EARLY_ADOPTER
|
|
30885
|
+
* Deletes a synthetic monitor definition for the given monitor ID. Currently browser and network availability monitors only. | maturity=EARLY_ADOPTER
|
|
30287
30886
|
*
|
|
30288
30887
|
* **Required scope:** environment-api:synthetic-monitors:write<br/>**Required permission:** environment:roles:manage-settings
|
|
30289
30888
|
*
|
|
@@ -32279,6 +32878,22 @@ var EffectivePermissionGranted = /* @__PURE__ */ ((EffectivePermissionGranted2)
|
|
|
32279
32878
|
return EffectivePermissionGranted2;
|
|
32280
32879
|
})(EffectivePermissionGranted || {});
|
|
32281
32880
|
|
|
32881
|
+
// packages/client/classic-environment-v2/src/lib/models/enablement-dto-origin.ts
|
|
32882
|
+
var EnablementDtoOrigin = /* @__PURE__ */ ((EnablementDtoOrigin2) => {
|
|
32883
|
+
EnablementDtoOrigin2["Monitor"] = "MONITOR";
|
|
32884
|
+
EnablementDtoOrigin2["Tenant"] = "TENANT";
|
|
32885
|
+
EnablementDtoOrigin2["Default"] = "DEFAULT";
|
|
32886
|
+
EnablementDtoOrigin2["Unknown"] = "UNKNOWN";
|
|
32887
|
+
return EnablementDtoOrigin2;
|
|
32888
|
+
})(EnablementDtoOrigin || {});
|
|
32889
|
+
|
|
32890
|
+
// packages/client/classic-environment-v2/src/lib/models/enablement-dto-performance-metric.ts
|
|
32891
|
+
var EnablementDtoPerformanceMetric = /* @__PURE__ */ ((EnablementDtoPerformanceMetric2) => {
|
|
32892
|
+
EnablementDtoPerformanceMetric2["ClassicTotalDuration"] = "classic.total_duration";
|
|
32893
|
+
EnablementDtoPerformanceMetric2["Duration"] = "duration";
|
|
32894
|
+
return EnablementDtoPerformanceMetric2;
|
|
32895
|
+
})(EnablementDtoPerformanceMetric || {});
|
|
32896
|
+
|
|
32282
32897
|
// packages/client/classic-environment-v2/src/lib/models/entry-point-usage-segment-segment-type.ts
|
|
32283
32898
|
var EntryPointUsageSegmentSegmentType = /* @__PURE__ */ ((EntryPointUsageSegmentSegmentType2) => {
|
|
32284
32899
|
EntryPointUsageSegmentSegmentType2["MaliciousInput"] = "MALICIOUS_INPUT";
|
|
@@ -33514,6 +34129,22 @@ var SchemaConstraintRestDtoType = /* @__PURE__ */ ((SchemaConstraintRestDtoType2
|
|
|
33514
34129
|
return SchemaConstraintRestDtoType2;
|
|
33515
34130
|
})(SchemaConstraintRestDtoType || {});
|
|
33516
34131
|
|
|
34132
|
+
// packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-maturity.ts
|
|
34133
|
+
var SchemaDefinitionRestDtoMaturity = /* @__PURE__ */ ((SchemaDefinitionRestDtoMaturity2) => {
|
|
34134
|
+
SchemaDefinitionRestDtoMaturity2["EarlyAdopter"] = "EARLY_ADOPTER";
|
|
34135
|
+
SchemaDefinitionRestDtoMaturity2["GeneralAvailability"] = "GENERAL_AVAILABILITY";
|
|
34136
|
+
SchemaDefinitionRestDtoMaturity2["Preview"] = "PREVIEW";
|
|
34137
|
+
return SchemaDefinitionRestDtoMaturity2;
|
|
34138
|
+
})(SchemaDefinitionRestDtoMaturity || {});
|
|
34139
|
+
|
|
34140
|
+
// packages/client/classic-environment-v2/src/lib/models/schema-stub-maturity.ts
|
|
34141
|
+
var SchemaStubMaturity = /* @__PURE__ */ ((SchemaStubMaturity2) => {
|
|
34142
|
+
SchemaStubMaturity2["EarlyAdopter"] = "EARLY_ADOPTER";
|
|
34143
|
+
SchemaStubMaturity2["GeneralAvailability"] = "GENERAL_AVAILABILITY";
|
|
34144
|
+
SchemaStubMaturity2["Preview"] = "PREVIEW";
|
|
34145
|
+
return SchemaStubMaturity2;
|
|
34146
|
+
})(SchemaStubMaturity || {});
|
|
34147
|
+
|
|
33517
34148
|
// packages/client/classic-environment-v2/src/lib/models/schema-type-type.ts
|
|
33518
34149
|
var SchemaTypeType = /* @__PURE__ */ ((SchemaTypeType2) => {
|
|
33519
34150
|
SchemaTypeType2["Object"] = "object";
|
|
@@ -33562,6 +34193,8 @@ var SecurityProblemEventReason = /* @__PURE__ */ ((SecurityProblemEventReason2)
|
|
|
33562
34193
|
SecurityProblemEventReason2["SecurityProblemReopened"] = "SECURITY_PROBLEM_REOPENED";
|
|
33563
34194
|
SecurityProblemEventReason2["SecurityProblemResolved"] = "SECURITY_PROBLEM_RESOLVED";
|
|
33564
34195
|
SecurityProblemEventReason2["SecurityProblemUnmuted"] = "SECURITY_PROBLEM_UNMUTED";
|
|
34196
|
+
SecurityProblemEventReason2["VulnerabilityDiscontinued"] = "VULNERABILITY_DISCONTINUED";
|
|
34197
|
+
SecurityProblemEventReason2["VulnerabilityIdChanged"] = "VULNERABILITY_ID_CHANGED";
|
|
33565
34198
|
return SecurityProblemEventReason2;
|
|
33566
34199
|
})(SecurityProblemEventReason || {});
|
|
33567
34200
|
|
|
@@ -33652,6 +34285,13 @@ var SLOStatus = /* @__PURE__ */ ((SLOStatus2) => {
|
|
|
33652
34285
|
return SLOStatus2;
|
|
33653
34286
|
})(SLOStatus || {});
|
|
33654
34287
|
|
|
34288
|
+
// packages/client/classic-environment-v2/src/lib/models/store-log-query-structure.ts
|
|
34289
|
+
var StoreLogQueryStructure = /* @__PURE__ */ ((StoreLogQueryStructure2) => {
|
|
34290
|
+
StoreLogQueryStructure2["Flattened"] = "flattened";
|
|
34291
|
+
StoreLogQueryStructure2["Raw"] = "raw";
|
|
34292
|
+
return StoreLogQueryStructure2;
|
|
34293
|
+
})(StoreLogQueryStructure || {});
|
|
34294
|
+
|
|
33655
34295
|
// packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-request-type.ts
|
|
33656
34296
|
var SyntheticBrowserMonitorRequestType = /* @__PURE__ */ ((SyntheticBrowserMonitorRequestType2) => {
|
|
33657
34297
|
SyntheticBrowserMonitorRequestType2["MultiProtocol"] = "MULTI_PROTOCOL";
|
|
@@ -33701,6 +34341,15 @@ var SyntheticLocationUpdateType = /* @__PURE__ */ ((SyntheticLocationUpdateType2
|
|
|
33701
34341
|
return SyntheticLocationUpdateType2;
|
|
33702
34342
|
})(SyntheticLocationUpdateType || {});
|
|
33703
34343
|
|
|
34344
|
+
// packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-outage-handling-settings-dto-origin.ts
|
|
34345
|
+
var SyntheticMonitorOutageHandlingSettingsDtoOrigin = /* @__PURE__ */ ((SyntheticMonitorOutageHandlingSettingsDtoOrigin2) => {
|
|
34346
|
+
SyntheticMonitorOutageHandlingSettingsDtoOrigin2["Monitor"] = "MONITOR";
|
|
34347
|
+
SyntheticMonitorOutageHandlingSettingsDtoOrigin2["Tenant"] = "TENANT";
|
|
34348
|
+
SyntheticMonitorOutageHandlingSettingsDtoOrigin2["Default"] = "DEFAULT";
|
|
34349
|
+
SyntheticMonitorOutageHandlingSettingsDtoOrigin2["Unknown"] = "UNKNOWN";
|
|
34350
|
+
return SyntheticMonitorOutageHandlingSettingsDtoOrigin2;
|
|
34351
|
+
})(SyntheticMonitorOutageHandlingSettingsDtoOrigin || {});
|
|
34352
|
+
|
|
33704
34353
|
// packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-performance-threshold-dto-aggregation.ts
|
|
33705
34354
|
var SyntheticMonitorPerformanceThresholdDtoAggregation = /* @__PURE__ */ ((SyntheticMonitorPerformanceThresholdDtoAggregation2) => {
|
|
33706
34355
|
SyntheticMonitorPerformanceThresholdDtoAggregation2["Avg"] = "AVG";
|