@dynatrace-sdk/client-classic-environment-v2 7.0.0 → 9.0.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/esm/index.js CHANGED
@@ -1314,6 +1314,8 @@ var AccessTokensApiTokensClient = class {
1314
1314
  * 1. Specify the number of results per page in the **pageSize** query parameter.
1315
1315
  * 2. Use the cursor from the **nextPageKey** field of the previous response in the **nextPageKey** query parameter to obtain subsequent pages.
1316
1316
  *
1317
+ * @deprecated
1318
+ *
1317
1319
  * @returns {Promise<ApiTokenList>} Success
1318
1320
  *
1319
1321
  * @example <caption>Code example</caption>
@@ -1495,6 +1497,8 @@ var AccessTokensApiTokensClient = class {
1495
1497
  *
1496
1498
  * Creating personal access tokens requires the `environment:roles:viewer` permission. Creating access tokens requires the `environment:roles:manage-settings` permission.
1497
1499
  *
1500
+ * @deprecated
1501
+ *
1498
1502
  * @returns {Promise<ApiTokenCreated>} Success. The token has been created. The body of the response contains the token secret.
1499
1503
  *
1500
1504
  * @example <caption>Code example</caption>
@@ -1669,6 +1673,10 @@ var AccessTokensApiTokensClient = class {
1669
1673
  * + environment:roles:viewer
1670
1674
  * + api-tokens:tokens:read
1671
1675
  *
1676
+ *
1677
+ *
1678
+ * @deprecated
1679
+ *
1672
1680
  * @returns {Promise<ApiToken>} Success
1673
1681
  *
1674
1682
  * @example <caption>Code example</caption>
@@ -1834,6 +1842,8 @@ var AccessTokensApiTokensClient = class {
1834
1842
  *
1835
1843
  * <br/><br/>The token secret is **not** exposed.
1836
1844
  *
1845
+ * @deprecated
1846
+ *
1837
1847
  * @returns {Promise<ApiToken>} Success
1838
1848
  *
1839
1849
  * @example <caption>Code example</caption>
@@ -2011,6 +2021,10 @@ var AccessTokensApiTokensClient = class {
2011
2021
  * + environment:roles:viewer
2012
2022
  * + api-tokens:tokens:write
2013
2023
  *
2024
+ *
2025
+ *
2026
+ * @deprecated
2027
+ *
2014
2028
  * @example <caption>Code example</caption>
2015
2029
  * import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
2016
2030
  *
@@ -2171,6 +2185,10 @@ var AccessTokensApiTokensClient = class {
2171
2185
  * + environment:roles:viewer
2172
2186
  * + api-tokens:tokens:write
2173
2187
  *
2188
+ *
2189
+ *
2190
+ * @deprecated
2191
+ *
2174
2192
  * @example <caption>Code example</caption>
2175
2193
  * import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
2176
2194
  *
@@ -2853,6 +2871,173 @@ var AccessTokensTenantTokensClient = class {
2853
2871
  }
2854
2872
  }
2855
2873
  }
2874
+ /**
2875
+ * Gets tenant token rotation status
2876
+ *
2877
+ * **One of the following scopes is required:**
2878
+ * + environment-api:tenant-token-rotation:write
2879
+ * + fleet-management:tenant-token:rotate
2880
+ *
2881
+ * <br/>**One of the following permissions is required:**
2882
+ * + environment:roles:manage-settings
2883
+ * + fleet-management:tenant-token:rotate
2884
+ *
2885
+ * <br/><br/>To learn how to rotate tokens, see [Token rotation](https://dt-url.net/1543sf6) in Dynatrace Documentation.
2886
+ *
2887
+ * @returns {Promise<TenantTokenRotationStatus>} Success. Returns rotation status.
2888
+ *
2889
+ * @example <caption>Code example</caption>
2890
+ * import { accessTokensTenantTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
2891
+ *
2892
+ * const data =
2893
+ * await accessTokensTenantTokensClient.getRotationStatus();
2894
+ *
2895
+ * @throws {ErrorEnvelopeError} Failed. Tenant token configuration is unavailable. | Client side error. | Server side error.
2896
+ * @throws {InvalidResponseError}
2897
+ * @throws {ApiClientError}
2898
+ * @throws {ClientRequestError}
2899
+ */
2900
+ async getRotationStatus(config = {}) {
2901
+ try {
2902
+ const response = await this.httpClient.send({
2903
+ url: `/platform/classic/environment-api/v2/tenantTokenRotation/status`,
2904
+ method: "GET",
2905
+ headers: {
2906
+ Accept: "application/json; charset=utf-8, application/json"
2907
+ },
2908
+ abortSignal: config instanceof EventTarget ? config : config.abortSignal,
2909
+ statusValidator: (status) => {
2910
+ return [200].includes(status);
2911
+ }
2912
+ });
2913
+ const responseValue = await response.body("json");
2914
+ try {
2915
+ return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
2916
+ } catch (err) {
2917
+ throw new InvalidResponseError4(
2918
+ `AccessTokensTenantTokensClient.getRotationStatus:200`,
2919
+ err,
2920
+ responseValue,
2921
+ void 0,
2922
+ void 0,
2923
+ response
2924
+ );
2925
+ }
2926
+ } catch (e) {
2927
+ if (isHttpClientAbortError4(e) || isInvalidResponseError4(e)) {
2928
+ throw e;
2929
+ }
2930
+ if (!isHttpClientResponseError4(e)) {
2931
+ throw new ApiClientError4("UnexpectedError", "Unexpected error", e);
2932
+ }
2933
+ const response = e.response;
2934
+ await apiGatewayErrorsHandler(response);
2935
+ switch (response.status) {
2936
+ case 503: {
2937
+ const responseValue = await response.body("json");
2938
+ try {
2939
+ const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
2940
+ throw new ErrorEnvelopeError(
2941
+ `503`,
2942
+ response,
2943
+ errorBody,
2944
+ getErrorMessage(errorBody, "Failed. Tenant token configuration is unavailable."),
2945
+ e
2946
+ );
2947
+ } catch (err) {
2948
+ if (err instanceof ErrorEnvelopeError) {
2949
+ throw err;
2950
+ }
2951
+ throw new InvalidResponseError4(
2952
+ `AccessTokensTenantTokensClient.getRotationStatus:503`,
2953
+ err,
2954
+ responseValue,
2955
+ "ErrorEnvelope",
2956
+ void 0,
2957
+ response
2958
+ );
2959
+ }
2960
+ }
2961
+ default: {
2962
+ if (response.status >= 400 && response.status <= 499) {
2963
+ const responseValue = await response.body("json");
2964
+ try {
2965
+ const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
2966
+ throw new ErrorEnvelopeError(
2967
+ `${response.status}`,
2968
+ response,
2969
+ errorBody,
2970
+ getErrorMessage(errorBody, "Client side error."),
2971
+ e
2972
+ );
2973
+ } catch (err) {
2974
+ if (err instanceof ErrorEnvelopeError) {
2975
+ throw err;
2976
+ }
2977
+ throw new InvalidResponseError4(
2978
+ `AccessTokensTenantTokensClient.getRotationStatus:${response.status}`,
2979
+ err,
2980
+ responseValue,
2981
+ "ErrorEnvelope",
2982
+ void 0,
2983
+ response
2984
+ );
2985
+ }
2986
+ } else if (response.status >= 500 && response.status <= 599) {
2987
+ const responseValue = await response.body("json");
2988
+ try {
2989
+ const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
2990
+ throw new ErrorEnvelopeError(
2991
+ `${response.status}`,
2992
+ response,
2993
+ errorBody,
2994
+ getErrorMessage(errorBody, "Server side error."),
2995
+ e
2996
+ );
2997
+ } catch (err) {
2998
+ if (err instanceof ErrorEnvelopeError) {
2999
+ throw err;
3000
+ }
3001
+ throw new InvalidResponseError4(
3002
+ `AccessTokensTenantTokensClient.getRotationStatus:${response.status}`,
3003
+ err,
3004
+ responseValue,
3005
+ "ErrorEnvelope",
3006
+ void 0,
3007
+ response
3008
+ );
3009
+ }
3010
+ } else {
3011
+ try {
3012
+ const responseValue = await response.body("json");
3013
+ throw new ClientRequestError5(
3014
+ `${response.status}`,
3015
+ response,
3016
+ responseValue,
3017
+ getErrorMessage(
3018
+ responseValue,
3019
+ `Unexpected api response: code=${response.status} body="${responseValue}"`
3020
+ )
3021
+ );
3022
+ } catch (error) {
3023
+ if (error instanceof ClientRequestError5) {
3024
+ throw error;
3025
+ }
3026
+ const responseValue = await response.body("text").catch(() => "");
3027
+ throw new InvalidResponseError4(
3028
+ `${response.status}`,
3029
+ error,
3030
+ responseValue,
3031
+ "json",
3032
+ "Unexpected api response",
3033
+ response
3034
+ );
3035
+ }
3036
+ }
3037
+ }
3038
+ }
3039
+ }
3040
+ }
2856
3041
  };
2857
3042
  var accessTokensTenantTokensClient = /* @__PURE__ */ new AccessTokensTenantTokensClient(defaultHttpClient4);
2858
3043
 
@@ -2892,6 +3077,10 @@ var ActiveGatesActiveGateGroupsClient = class {
2892
3077
  * + environment:roles:manage-settings
2893
3078
  * + fleet-management:activegates:read
2894
3079
  *
3080
+ * <br/><br/>Deprecated since version 1.343. Use DQL Smartscape nodes to query ActiveGate data instead. See https://dt-url.net/mf03894
3081
+ *
3082
+ * @deprecated
3083
+ *
2895
3084
  * @returns {Promise<ActiveGateGroups>} Success
2896
3085
  *
2897
3086
  * @example <caption>Code example</caption>
@@ -3212,7 +3401,9 @@ var ActiveGatesClient = class {
3212
3401
  * + environment:roles:manage-settings
3213
3402
  * + fleet-management:activegates:read
3214
3403
  *
3215
- * <br/><br/>The response includes all ActiveGates that are currently connected to the environment or have been connected during last 2 hours.
3404
+ * <br/><br/>The response includes all ActiveGates that are currently connected to the environment or have been connected during last 2 hours. Deprecated since version 1.343. Use DQL Smartscape nodes to query ActiveGate data instead. See https://dt-url.net/mf03894
3405
+ *
3406
+ * @deprecated
3216
3407
  *
3217
3408
  * @returns {Promise<ActiveGateList>} Success
3218
3409
  *
@@ -3402,6 +3593,10 @@ var ActiveGatesClient = class {
3402
3593
  * + environment:roles:manage-settings
3403
3594
  * + fleet-management:activegates:read
3404
3595
  *
3596
+ * <br/><br/>Deprecated since version 1.343. Use DQL Smartscape nodes to query ActiveGate data instead. See https://dt-url.net/mf03894
3597
+ *
3598
+ * @deprecated
3599
+ *
3405
3600
  * @returns {Promise<ActiveGate>} Success
3406
3601
  *
3407
3602
  * @example <caption>Code example</caption>
@@ -15588,6 +15783,8 @@ var FleetManagementContainerImagesClient = class {
15588
15783
  * + environment:roles:agent-install
15589
15784
  * + fleet-management:container-images:read
15590
15785
  *
15786
+ * <br/><br/>Returns container image references for Dynatrace components from the specified registry. Returned image versions are resolved based on the configured target versions: dynatrace-activegate, dynatrace-eec, dynatrace-sql-extension-executor, and dynatrace-database-datasource-executor image versions are resolved from the ActiveGate target version; dynatrace-oneagent, dynatrace-codemodules, and dynatrace-logmodule image versions are resolved from the OneAgent target version. If no target version is configured for a component, the latest available image is returned.
15787
+ *
15591
15788
  * @returns {Promise<ContainerImageData>} Container images data returned
15592
15789
  *
15593
15790
  * @example <caption>Code example</caption>
@@ -20787,7 +20984,7 @@ var MonitoredEntitiesClient = class {
20787
20984
  * const data =
20788
20985
  * await monitoredEntitiesClient.setSecurityContext({
20789
20986
  * entitySelector: "...",
20790
- * body: {},
20987
+ * body: { securityContext: ["..."] },
20791
20988
  * });
20792
20989
  *
20793
20990
  * @throws {ErrorEnvelopeError} Client side error. | Server side error.
@@ -33355,14 +33552,18 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33355
33552
  *
33356
33553
  * **Required scope:** environment-api:synthetic:write<br/>**Required permission:** environment:roles:manage-settings
33357
33554
  *
33358
- * @returns {Promise<SyntheticConfigDto>} Success. The set of synthetic related parameters has been updated. Response doesn't have a body.
33359
- *
33360
33555
  * @example <caption>Code example</caption>
33361
33556
  * import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
33362
33557
  *
33363
33558
  * const data =
33364
33559
  * await syntheticLocationsNodesAndConfigurationClient.updateConfiguration(
33365
- * { body: { bmMonitorTimeout: 10, bmStepTimeout: 10 } },
33560
+ * {
33561
+ * body: {
33562
+ * bmMonitorTimeout: 10,
33563
+ * bmStepTimeout: 10,
33564
+ * maintenanceWindowsExcludedFromAvailability: false,
33565
+ * },
33566
+ * },
33366
33567
  * );
33367
33568
  *
33368
33569
  * @throws {ErrorEnvelopeError} Client side error. | Server side error.
@@ -33376,35 +33577,22 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33376
33577
  }
33377
33578
  const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
33378
33579
  try {
33379
- const response = await this.httpClient.send({
33580
+ await this.httpClient.send({
33380
33581
  url: `/platform/classic/environment-api/v2/synthetic/config`,
33381
33582
  method: "PUT",
33382
33583
  requestBodyType: "json",
33383
33584
  body: encodedBody,
33384
33585
  headers: {
33385
- "Content-Type": "application/json; charset=utf-8",
33386
- Accept: "application/json; charset=utf-8, application/json"
33586
+ "Content-Type": "application/json; charset=utf-8"
33387
33587
  },
33388
33588
  abortSignal: config instanceof EventTarget ? config : config.abortSignal,
33389
33589
  statusValidator: (status) => {
33390
33590
  return [204].includes(status);
33391
33591
  }
33392
33592
  });
33393
- const responseValue = await response.body("json");
33394
- try {
33395
- return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;
33396
- } catch (err) {
33397
- throw new InvalidResponseError39(
33398
- `SyntheticLocationsNodesAndConfigurationClient.updateConfiguration:204`,
33399
- err,
33400
- responseValue,
33401
- void 0,
33402
- void 0,
33403
- response
33404
- );
33405
- }
33593
+ return;
33406
33594
  } catch (e) {
33407
- if (isHttpClientAbortError39(e) || isInvalidResponseError38(e)) {
33595
+ if (isHttpClientAbortError39(e)) {
33408
33596
  throw e;
33409
33597
  }
33410
33598
  if (!isHttpClientResponseError39(e)) {
@@ -33638,7 +33826,6 @@ var SyntheticLocationsNodesAndConfigurationClient = class {
33638
33826
  * latitude: 10,
33639
33827
  * longitude: 10,
33640
33828
  * name: "...",
33641
- * nodes: ["..."],
33642
33829
  * type: "CLUSTER",
33643
33830
  * },
33644
33831
  * },
@@ -37700,6 +37887,7 @@ var ApiTokenUpdateScopesItem = /* @__PURE__ */ ((ApiTokenUpdateScopesItem2) => {
37700
37887
  var AssessmentAccuracyDetailsReducedReasonsItem = /* @__PURE__ */ ((AssessmentAccuracyDetailsReducedReasonsItem2) => {
37701
37888
  AssessmentAccuracyDetailsReducedReasonsItem2["LimitedAgentSupport"] = "LIMITED_AGENT_SUPPORT";
37702
37889
  AssessmentAccuracyDetailsReducedReasonsItem2["LimitedByConfiguration"] = "LIMITED_BY_CONFIGURATION";
37890
+ AssessmentAccuracyDetailsReducedReasonsItem2["LimitedByServiceDetectionV2"] = "LIMITED_BY_SERVICE_DETECTION_V2";
37703
37891
  return AssessmentAccuracyDetailsReducedReasonsItem2;
37704
37892
  })(AssessmentAccuracyDetailsReducedReasonsItem || {});
37705
37893
 
@@ -37908,6 +38096,7 @@ var ContainerImageComponentType = /* @__PURE__ */ ((ContainerImageComponentType2
37908
38096
  ContainerImageComponentType2["Activegate"] = "activegate";
37909
38097
  ContainerImageComponentType2["Codemodules"] = "codemodules";
37910
38098
  ContainerImageComponentType2["DatabaseDatasourceExecutor"] = "database-datasource-executor";
38099
+ ContainerImageComponentType2["SqlExtensionExecutor"] = "sql-extension-executor";
37911
38100
  ContainerImageComponentType2["DynatraceSqlExtensionExecutor"] = "dynatrace-sql-extension-executor";
37912
38101
  ContainerImageComponentType2["Eec"] = "eec";
37913
38102
  ContainerImageComponentType2["Logmodule"] = "logmodule";
@@ -38739,6 +38928,7 @@ var MetricDescriptorAggregationTypesItem = /* @__PURE__ */ ((MetricDescriptorAgg
38739
38928
  // packages/client/classic-environment-v2/src/lib/models/metric-descriptor-transformations-item.ts
38740
38929
  var MetricDescriptorTransformationsItem = /* @__PURE__ */ ((MetricDescriptorTransformationsItem2) => {
38741
38930
  MetricDescriptorTransformationsItem2["AsGauge"] = "asGauge";
38931
+ MetricDescriptorTransformationsItem2["AsHistogram"] = "asHistogram";
38742
38932
  MetricDescriptorTransformationsItem2["Default"] = "default";
38743
38933
  MetricDescriptorTransformationsItem2["Delta"] = "delta";
38744
38934
  MetricDescriptorTransformationsItem2["EvaluateModel"] = "evaluateModel";
@@ -38903,6 +39093,15 @@ var PrivateSyntheticLocationFipsMode = /* @__PURE__ */ ((PrivateSyntheticLocatio
38903
39093
  return PrivateSyntheticLocationFipsMode2;
38904
39094
  })(PrivateSyntheticLocationFipsMode || {});
38905
39095
 
39096
+ // packages/client/classic-environment-v2/src/lib/models/private-synthetic-location-node-size.ts
39097
+ var PrivateSyntheticLocationNodeSize = /* @__PURE__ */ ((PrivateSyntheticLocationNodeSize2) => {
39098
+ PrivateSyntheticLocationNodeSize2["M"] = "M";
39099
+ PrivateSyntheticLocationNodeSize2["S"] = "S";
39100
+ PrivateSyntheticLocationNodeSize2["Unsupported"] = "UNSUPPORTED";
39101
+ PrivateSyntheticLocationNodeSize2["Xs"] = "XS";
39102
+ return PrivateSyntheticLocationNodeSize2;
39103
+ })(PrivateSyntheticLocationNodeSize || {});
39104
+
38906
39105
  // packages/client/classic-environment-v2/src/lib/models/private-synthetic-location-status.ts
38907
39106
  var PrivateSyntheticLocationStatus = /* @__PURE__ */ ((PrivateSyntheticLocationStatus2) => {
38908
39107
  PrivateSyntheticLocationStatus2["Disabled"] = "DISABLED";
@@ -39788,6 +39987,13 @@ var SyntheticTagWithSourceDtoSource = /* @__PURE__ */ ((SyntheticTagWithSourceDt
39788
39987
  return SyntheticTagWithSourceDtoSource2;
39789
39988
  })(SyntheticTagWithSourceDtoSource || {});
39790
39989
 
39990
+ // packages/client/classic-environment-v2/src/lib/models/tenant-token-rotation-status-status.ts
39991
+ var TenantTokenRotationStatusStatus = /* @__PURE__ */ ((TenantTokenRotationStatusStatus2) => {
39992
+ TenantTokenRotationStatusStatus2["Active"] = "ACTIVE";
39993
+ TenantTokenRotationStatusStatus2["Inactive"] = "INACTIVE";
39994
+ return TenantTokenRotationStatusStatus2;
39995
+ })(TenantTokenRotationStatusStatus || {});
39996
+
39791
39997
  // packages/client/classic-environment-v2/src/lib/models/update-java-script-mapping-file-metadata-alias-query-file-type.ts
39792
39998
  var UpdateJavaScriptMappingFileMetadataAliasQueryFileType = /* @__PURE__ */ ((UpdateJavaScriptMappingFileMetadataAliasQueryFileType2) => {
39793
39999
  UpdateJavaScriptMappingFileMetadataAliasQueryFileType2["Minified"] = "MINIFIED";
@@ -40075,6 +40281,7 @@ export {
40075
40281
  PreconditionType,
40076
40282
  PrivateSyntheticLocationDeploymentType,
40077
40283
  PrivateSyntheticLocationFipsMode,
40284
+ PrivateSyntheticLocationNodeSize,
40078
40285
  PrivateSyntheticLocationStatus,
40079
40286
  PrivateSyntheticLocationType,
40080
40287
  ProblemImpactLevel,
@@ -40195,6 +40402,7 @@ export {
40195
40402
  SyntheticOnDemandFailedExecutionStatusExecutionStage,
40196
40403
  SyntheticOnDemandMonitorExecutionsClient,
40197
40404
  SyntheticTagWithSourceDtoSource,
40405
+ TenantTokenRotationStatusStatus,
40198
40406
  UpdateJavaScriptMappingFileMetadataAliasQueryFileType,
40199
40407
  UpdateJavaScriptMappingFileMetadataPathFileType,
40200
40408
  UpdateJobAgType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/client-classic-environment-v2",
3
- "version": "7.0.0",
3
+ "version": "9.0.0",
4
4
  "description": "Client for the Dynatrace Environment API v2",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {