@azure/arm-dynatrace 1.0.0-beta.1 → 1.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +9 -9
  3. package/dist/index.js +116 -40
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/monitorsCreateOrUpdateSample.js +2 -2
  8. package/dist-esm/samples-dev/monitorsDeleteSample.js +2 -2
  9. package/dist-esm/samples-dev/monitorsGetAccountCredentialsSample.js +2 -2
  10. package/dist-esm/samples-dev/monitorsGetSample.js +2 -2
  11. package/dist-esm/samples-dev/monitorsGetSsoDetailsSample.js +2 -2
  12. package/dist-esm/samples-dev/monitorsGetVMHostPayloadSample.js +2 -2
  13. package/dist-esm/samples-dev/monitorsListAppServicesSample.js +2 -2
  14. package/dist-esm/samples-dev/monitorsListByResourceGroupSample.js +2 -2
  15. package/dist-esm/samples-dev/monitorsListBySubscriptionIdSample.js +2 -2
  16. package/dist-esm/samples-dev/monitorsListHostsSample.js +2 -2
  17. package/dist-esm/samples-dev/monitorsListLinkableEnvironmentsSample.js +2 -2
  18. package/dist-esm/samples-dev/monitorsListMonitoredResourcesSample.js +2 -2
  19. package/dist-esm/samples-dev/monitorsUpdateSample.js +2 -2
  20. package/dist-esm/samples-dev/operationsListSample.js +2 -2
  21. package/dist-esm/samples-dev/singleSignOnCreateOrUpdateSample.js +2 -2
  22. package/dist-esm/samples-dev/singleSignOnGetSample.js +2 -2
  23. package/dist-esm/samples-dev/singleSignOnListSample.js +2 -2
  24. package/dist-esm/samples-dev/tagRulesCreateOrUpdateSample.js +2 -2
  25. package/dist-esm/samples-dev/tagRulesDeleteSample.js +2 -2
  26. package/dist-esm/samples-dev/tagRulesGetSample.js +2 -2
  27. package/dist-esm/samples-dev/tagRulesListSample.js +2 -2
  28. package/dist-esm/samples-dev/tagRulesUpdateSample.js +2 -2
  29. package/dist-esm/src/dynatraceObservability.d.ts +2 -0
  30. package/dist-esm/src/dynatraceObservability.d.ts.map +1 -1
  31. package/dist-esm/src/dynatraceObservability.js +48 -14
  32. package/dist-esm/src/dynatraceObservability.js.map +1 -1
  33. package/dist-esm/src/models/index.d.ts +86 -18
  34. package/dist-esm/src/models/index.d.ts.map +1 -1
  35. package/dist-esm/src/models/index.js +67 -0
  36. package/dist-esm/src/models/index.js.map +1 -1
  37. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  38. package/dist-esm/src/models/mappers.js +0 -24
  39. package/dist-esm/src/models/mappers.js.map +1 -1
  40. package/dist-esm/src/models/parameters.js +1 -1
  41. package/dist-esm/src/models/parameters.js.map +1 -1
  42. package/dist-esm/test/dynatrace_examples.spec.d.ts +4 -0
  43. package/dist-esm/test/dynatrace_examples.spec.d.ts.map +1 -0
  44. package/dist-esm/test/dynatrace_examples.spec.js +134 -0
  45. package/dist-esm/test/dynatrace_examples.spec.js.map +1 -0
  46. package/package.json +11 -8
  47. package/review/arm-dynatrace.api.md +31 -97
  48. package/src/dynatraceObservability.ts +58 -17
  49. package/src/models/index.ts +85 -18
  50. package/src/models/mappers.ts +0 -24
  51. package/src/models/parameters.ts +1 -1
  52. package/types/arm-dynatrace.d.ts +88 -18
  53. package/dist-esm/test/sampleTest.d.ts +0 -2
  54. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  55. package/dist-esm/test/sampleTest.js +0 -40
  56. package/dist-esm/test/sampleTest.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Release History
2
2
 
3
- ## 1.0.0-beta.1 (2022-05-11)
3
+ ## 1.0.0 (2022-09-19)
4
4
 
5
5
  The package of @azure/arm-dynatrace is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # Azure Service client library for JavaScript
1
+ # Azure DynatraceObservability client library for JavaScript
2
2
 
3
- This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Service client.
3
+ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure DynatraceObservability client.
4
4
 
5
5
 
6
6
 
7
7
  [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/dynatrace/arm-dynatrace) |
8
8
  [Package (NPM)](https://www.npmjs.com/package/@azure/arm-dynatrace) |
9
- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-dynatrace?view=azure-node-preview) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-dynatrace) |
10
10
  [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
11
11
 
12
12
  ## Getting started
13
13
 
14
14
  ### Currently supported environments
15
15
 
16
- - [LTS versions of Node.js](https://nodejs.org/about/releases/)
16
+ - [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
17
17
  - Latest versions of Safari, Chrome, Edge and Firefox.
18
18
 
19
19
  See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
@@ -24,7 +24,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
24
24
 
25
25
  ### Install the `@azure/arm-dynatrace` package
26
26
 
27
- Install the Azure Service client library for JavaScript with `npm`:
27
+ Install the Azure DynatraceObservability client library for JavaScript with `npm`:
28
28
 
29
29
  ```bash
30
30
  npm install @azure/arm-dynatrace
@@ -32,8 +32,8 @@ npm install @azure/arm-dynatrace
32
32
 
33
33
  ### Create and authenticate a `DynatraceObservability`
34
34
 
35
- To create a client object to access the Azure Service API, you will need the `endpoint` of your Azure Service resource and a `credential`. The Azure Service client can use Azure Active Directory credentials to authenticate.
36
- You can find the endpoint for your Azure Service resource in the [Azure Portal][azure_portal].
35
+ To create a client object to access the Azure DynatraceObservability API, you will need the `endpoint` of your Azure DynatraceObservability resource and a `credential`. The Azure DynatraceObservability client can use Azure Active Directory credentials to authenticate.
36
+ You can find the endpoint for your Azure DynatraceObservability resource in the [Azure Portal][azure_portal].
37
37
 
38
38
  You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
39
39
 
@@ -43,7 +43,7 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
43
43
  npm install @azure/identity
44
44
  ```
45
45
 
46
- You will also need to **register a new AAD application and grant access to Azure Service** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
46
+ You will also need to **register a new AAD application and grant access to Azure DynatraceObservability** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
47
47
  Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
48
48
 
49
49
  For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
@@ -72,7 +72,7 @@ To use this client library in the browser, first you need to use a bundler. For
72
72
 
73
73
  ### DynatraceObservability
74
74
 
75
- `DynatraceObservability` is the primary interface for developers using the Azure Service client library. Explore the methods on this client object to understand the different features of the Azure Service service that you can access.
75
+ `DynatraceObservability` is the primary interface for developers using the Azure DynatraceObservability client library. Explore the methods on this client object to understand the different features of the Azure DynatraceObservability service that you can access.
76
76
 
77
77
  ## Troubleshooting
78
78
 
package/dist/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var tslib = require('tslib');
5
6
  var coreClient = require('@azure/core-client');
6
7
  var coreRestPipeline = require('@azure/core-rest-pipeline');
7
- var tslib = require('tslib');
8
8
  var coreLro = require('@azure/core-lro');
9
9
 
10
10
  function _interopNamespace(e) {
@@ -38,152 +38,219 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
38
38
  /** Known values of {@link SendingMetricsStatus} that the service accepts. */
39
39
  exports.KnownSendingMetricsStatus = void 0;
40
40
  (function (KnownSendingMetricsStatus) {
41
+ /** Enabled */
41
42
  KnownSendingMetricsStatus["Enabled"] = "Enabled";
43
+ /** Disabled */
42
44
  KnownSendingMetricsStatus["Disabled"] = "Disabled";
43
45
  })(exports.KnownSendingMetricsStatus || (exports.KnownSendingMetricsStatus = {}));
44
46
  /** Known values of {@link SendingLogsStatus} that the service accepts. */
45
47
  exports.KnownSendingLogsStatus = void 0;
46
48
  (function (KnownSendingLogsStatus) {
49
+ /** Enabled */
47
50
  KnownSendingLogsStatus["Enabled"] = "Enabled";
51
+ /** Disabled */
48
52
  KnownSendingLogsStatus["Disabled"] = "Disabled";
49
53
  })(exports.KnownSendingLogsStatus || (exports.KnownSendingLogsStatus = {}));
50
54
  /** Known values of {@link MonitoringStatus} that the service accepts. */
51
55
  exports.KnownMonitoringStatus = void 0;
52
56
  (function (KnownMonitoringStatus) {
57
+ /** Enabled */
53
58
  KnownMonitoringStatus["Enabled"] = "Enabled";
59
+ /** Disabled */
54
60
  KnownMonitoringStatus["Disabled"] = "Disabled";
55
61
  })(exports.KnownMonitoringStatus || (exports.KnownMonitoringStatus = {}));
56
62
  /** Known values of {@link MarketplaceSubscriptionStatus} that the service accepts. */
57
63
  exports.KnownMarketplaceSubscriptionStatus = void 0;
58
64
  (function (KnownMarketplaceSubscriptionStatus) {
65
+ /** Active */
59
66
  KnownMarketplaceSubscriptionStatus["Active"] = "Active";
67
+ /** Suspended */
60
68
  KnownMarketplaceSubscriptionStatus["Suspended"] = "Suspended";
61
69
  })(exports.KnownMarketplaceSubscriptionStatus || (exports.KnownMarketplaceSubscriptionStatus = {}));
62
70
  /** Known values of {@link SingleSignOnStates} that the service accepts. */
63
71
  exports.KnownSingleSignOnStates = void 0;
64
72
  (function (KnownSingleSignOnStates) {
73
+ /** Initial */
65
74
  KnownSingleSignOnStates["Initial"] = "Initial";
75
+ /** Enable */
66
76
  KnownSingleSignOnStates["Enable"] = "Enable";
77
+ /** Disable */
67
78
  KnownSingleSignOnStates["Disable"] = "Disable";
79
+ /** Existing */
68
80
  KnownSingleSignOnStates["Existing"] = "Existing";
69
81
  })(exports.KnownSingleSignOnStates || (exports.KnownSingleSignOnStates = {}));
70
82
  /** Known values of {@link ProvisioningState} that the service accepts. */
71
83
  exports.KnownProvisioningState = void 0;
72
84
  (function (KnownProvisioningState) {
85
+ /** Accepted */
73
86
  KnownProvisioningState["Accepted"] = "Accepted";
87
+ /** Creating */
74
88
  KnownProvisioningState["Creating"] = "Creating";
89
+ /** Updating */
75
90
  KnownProvisioningState["Updating"] = "Updating";
91
+ /** Deleting */
76
92
  KnownProvisioningState["Deleting"] = "Deleting";
93
+ /** Succeeded */
77
94
  KnownProvisioningState["Succeeded"] = "Succeeded";
95
+ /** Failed */
78
96
  KnownProvisioningState["Failed"] = "Failed";
97
+ /** Canceled */
79
98
  KnownProvisioningState["Canceled"] = "Canceled";
99
+ /** Deleted */
80
100
  KnownProvisioningState["Deleted"] = "Deleted";
101
+ /** NotSpecified */
81
102
  KnownProvisioningState["NotSpecified"] = "NotSpecified";
82
103
  })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
83
104
  /** Known values of {@link LiftrResourceCategories} that the service accepts. */
84
105
  exports.KnownLiftrResourceCategories = void 0;
85
106
  (function (KnownLiftrResourceCategories) {
107
+ /** Unknown */
86
108
  KnownLiftrResourceCategories["Unknown"] = "Unknown";
109
+ /** MonitorLogs */
87
110
  KnownLiftrResourceCategories["MonitorLogs"] = "MonitorLogs";
88
111
  })(exports.KnownLiftrResourceCategories || (exports.KnownLiftrResourceCategories = {}));
89
112
  /** Known values of {@link CreatedByType} that the service accepts. */
90
113
  exports.KnownCreatedByType = void 0;
91
114
  (function (KnownCreatedByType) {
115
+ /** User */
92
116
  KnownCreatedByType["User"] = "User";
117
+ /** Application */
93
118
  KnownCreatedByType["Application"] = "Application";
119
+ /** ManagedIdentity */
94
120
  KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
121
+ /** Key */
95
122
  KnownCreatedByType["Key"] = "Key";
96
123
  })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
97
124
  /** Known values of {@link ManagedIdentityType} that the service accepts. */
98
125
  exports.KnownManagedIdentityType = void 0;
99
126
  (function (KnownManagedIdentityType) {
127
+ /** SystemAssigned */
100
128
  KnownManagedIdentityType["SystemAssigned"] = "SystemAssigned";
129
+ /** UserAssigned */
101
130
  KnownManagedIdentityType["UserAssigned"] = "UserAssigned";
131
+ /** SystemAndUserAssigned */
102
132
  KnownManagedIdentityType["SystemAndUserAssigned"] = "SystemAndUserAssigned";
103
133
  })(exports.KnownManagedIdentityType || (exports.KnownManagedIdentityType = {}));
104
134
  /** Known values of {@link Origin} that the service accepts. */
105
135
  exports.KnownOrigin = void 0;
106
136
  (function (KnownOrigin) {
137
+ /** User */
107
138
  KnownOrigin["User"] = "user";
139
+ /** System */
108
140
  KnownOrigin["System"] = "system";
141
+ /** UserSystem */
109
142
  KnownOrigin["UserSystem"] = "user,system";
110
143
  })(exports.KnownOrigin || (exports.KnownOrigin = {}));
111
144
  /** Known values of {@link ActionType} that the service accepts. */
112
145
  exports.KnownActionType = void 0;
113
146
  (function (KnownActionType) {
147
+ /** Internal */
114
148
  KnownActionType["Internal"] = "Internal";
115
149
  })(exports.KnownActionType || (exports.KnownActionType = {}));
116
150
  /** Known values of {@link SendAadLogsStatus} that the service accepts. */
117
151
  exports.KnownSendAadLogsStatus = void 0;
118
152
  (function (KnownSendAadLogsStatus) {
153
+ /** Enabled */
119
154
  KnownSendAadLogsStatus["Enabled"] = "Enabled";
155
+ /** Disabled */
120
156
  KnownSendAadLogsStatus["Disabled"] = "Disabled";
121
157
  })(exports.KnownSendAadLogsStatus || (exports.KnownSendAadLogsStatus = {}));
122
158
  /** Known values of {@link SendSubscriptionLogsStatus} that the service accepts. */
123
159
  exports.KnownSendSubscriptionLogsStatus = void 0;
124
160
  (function (KnownSendSubscriptionLogsStatus) {
161
+ /** Enabled */
125
162
  KnownSendSubscriptionLogsStatus["Enabled"] = "Enabled";
163
+ /** Disabled */
126
164
  KnownSendSubscriptionLogsStatus["Disabled"] = "Disabled";
127
165
  })(exports.KnownSendSubscriptionLogsStatus || (exports.KnownSendSubscriptionLogsStatus = {}));
128
166
  /** Known values of {@link SendActivityLogsStatus} that the service accepts. */
129
167
  exports.KnownSendActivityLogsStatus = void 0;
130
168
  (function (KnownSendActivityLogsStatus) {
169
+ /** Enabled */
131
170
  KnownSendActivityLogsStatus["Enabled"] = "Enabled";
171
+ /** Disabled */
132
172
  KnownSendActivityLogsStatus["Disabled"] = "Disabled";
133
173
  })(exports.KnownSendActivityLogsStatus || (exports.KnownSendActivityLogsStatus = {}));
134
174
  /** Known values of {@link TagAction} that the service accepts. */
135
175
  exports.KnownTagAction = void 0;
136
176
  (function (KnownTagAction) {
177
+ /** Include */
137
178
  KnownTagAction["Include"] = "Include";
179
+ /** Exclude */
138
180
  KnownTagAction["Exclude"] = "Exclude";
139
181
  })(exports.KnownTagAction || (exports.KnownTagAction = {}));
140
182
  /** Known values of {@link MonitoringType} that the service accepts. */
141
183
  exports.KnownMonitoringType = void 0;
142
184
  (function (KnownMonitoringType) {
185
+ /** CloudInfrastructure */
143
186
  KnownMonitoringType["CloudInfrastructure"] = "CLOUD_INFRASTRUCTURE";
187
+ /** FullStack */
144
188
  KnownMonitoringType["FullStack"] = "FULL_STACK";
145
189
  })(exports.KnownMonitoringType || (exports.KnownMonitoringType = {}));
146
190
  /** Known values of {@link AutoUpdateSetting} that the service accepts. */
147
191
  exports.KnownAutoUpdateSetting = void 0;
148
192
  (function (KnownAutoUpdateSetting) {
193
+ /** Enabled */
149
194
  KnownAutoUpdateSetting["Enabled"] = "ENABLED";
195
+ /** Disabled */
150
196
  KnownAutoUpdateSetting["Disabled"] = "DISABLED";
151
197
  })(exports.KnownAutoUpdateSetting || (exports.KnownAutoUpdateSetting = {}));
152
198
  /** Known values of {@link UpdateStatus} that the service accepts. */
153
199
  exports.KnownUpdateStatus = void 0;
154
200
  (function (KnownUpdateStatus) {
201
+ /** Incompatible */
155
202
  KnownUpdateStatus["Incompatible"] = "INCOMPATIBLE";
203
+ /** Outdated */
156
204
  KnownUpdateStatus["Outdated"] = "OUTDATED";
205
+ /** Scheduled */
157
206
  KnownUpdateStatus["Scheduled"] = "SCHEDULED";
207
+ /** Suppressed */
158
208
  KnownUpdateStatus["Suppressed"] = "SUPPRESSED";
209
+ /** Unknown */
159
210
  KnownUpdateStatus["Unknown"] = "UNKNOWN";
211
+ /** UP2Date */
160
212
  KnownUpdateStatus["UP2Date"] = "UP2DATE";
213
+ /** UpdateINProgress */
161
214
  KnownUpdateStatus["UpdateINProgress"] = "UPDATE_IN_PROGRESS";
215
+ /** UpdatePending */
162
216
  KnownUpdateStatus["UpdatePending"] = "UPDATE_PENDING";
217
+ /** UpdateProblem */
163
218
  KnownUpdateStatus["UpdateProblem"] = "UPDATE_PROBLEM";
164
219
  })(exports.KnownUpdateStatus || (exports.KnownUpdateStatus = {}));
165
220
  /** Known values of {@link AvailabilityState} that the service accepts. */
166
221
  exports.KnownAvailabilityState = void 0;
167
222
  (function (KnownAvailabilityState) {
223
+ /** Crashed */
168
224
  KnownAvailabilityState["Crashed"] = "CRASHED";
225
+ /** Lost */
169
226
  KnownAvailabilityState["Lost"] = "LOST";
227
+ /** Monitored */
170
228
  KnownAvailabilityState["Monitored"] = "MONITORED";
229
+ /** PREMonitored */
171
230
  KnownAvailabilityState["PREMonitored"] = "PRE_MONITORED";
231
+ /** Shutdown */
172
232
  KnownAvailabilityState["Shutdown"] = "SHUTDOWN";
233
+ /** UnexpectedShutdown */
173
234
  KnownAvailabilityState["UnexpectedShutdown"] = "UNEXPECTED_SHUTDOWN";
235
+ /** Unknown */
174
236
  KnownAvailabilityState["Unknown"] = "UNKNOWN";
237
+ /** Unmonitored */
175
238
  KnownAvailabilityState["Unmonitored"] = "UNMONITORED";
176
239
  })(exports.KnownAvailabilityState || (exports.KnownAvailabilityState = {}));
177
240
  /** Known values of {@link LogModule} that the service accepts. */
178
241
  exports.KnownLogModule = void 0;
179
242
  (function (KnownLogModule) {
243
+ /** Enabled */
180
244
  KnownLogModule["Enabled"] = "ENABLED";
245
+ /** Disabled */
181
246
  KnownLogModule["Disabled"] = "DISABLED";
182
247
  })(exports.KnownLogModule || (exports.KnownLogModule = {}));
183
248
  /** Known values of {@link SSOStatus} that the service accepts. */
184
249
  exports.KnownSSOStatus = void 0;
185
250
  (function (KnownSSOStatus) {
251
+ /** Enabled */
186
252
  KnownSSOStatus["Enabled"] = "Enabled";
253
+ /** Disabled */
187
254
  KnownSSOStatus["Disabled"] = "Disabled";
188
255
  })(exports.KnownSSOStatus || (exports.KnownSSOStatus = {}));
189
256
 
@@ -323,7 +390,6 @@ const MonitoredResourceListResponse = {
323
390
  modelProperties: {
324
391
  value: {
325
392
  serializedName: "value",
326
- required: true,
327
393
  type: {
328
394
  name: "Sequence",
329
395
  element: {
@@ -336,7 +402,6 @@ const MonitoredResourceListResponse = {
336
402
  },
337
403
  nextLink: {
338
404
  serializedName: "nextLink",
339
- required: true,
340
405
  type: {
341
406
  name: "String"
342
407
  }
@@ -539,18 +604,12 @@ const UserInfo = {
539
604
  className: "UserInfo",
540
605
  modelProperties: {
541
606
  firstName: {
542
- constraints: {
543
- MaxLength: 50
544
- },
545
607
  serializedName: "firstName",
546
608
  type: {
547
609
  name: "String"
548
610
  }
549
611
  },
550
612
  lastName: {
551
- constraints: {
552
- MaxLength: 50
553
- },
554
613
  serializedName: "lastName",
555
614
  type: {
556
615
  name: "String"
@@ -589,27 +648,18 @@ const PlanData = {
589
648
  className: "PlanData",
590
649
  modelProperties: {
591
650
  usageType: {
592
- constraints: {
593
- MaxLength: 50
594
- },
595
651
  serializedName: "usageType",
596
652
  type: {
597
653
  name: "String"
598
654
  }
599
655
  },
600
656
  billingCycle: {
601
- constraints: {
602
- MaxLength: 50
603
- },
604
657
  serializedName: "billingCycle",
605
658
  type: {
606
659
  name: "String"
607
660
  }
608
661
  },
609
662
  planDetails: {
610
- constraints: {
611
- MaxLength: 50
612
- },
613
663
  serializedName: "planDetails",
614
664
  type: {
615
665
  name: "String"
@@ -932,7 +982,6 @@ const MonitorResourceListResult = {
932
982
  },
933
983
  nextLink: {
934
984
  serializedName: "nextLink",
935
- required: true,
936
985
  type: {
937
986
  name: "String"
938
987
  }
@@ -1066,7 +1115,6 @@ const TagRuleListResult = {
1066
1115
  },
1067
1116
  nextLink: {
1068
1117
  serializedName: "nextLink",
1069
- required: true,
1070
1118
  type: {
1071
1119
  name: "String"
1072
1120
  }
@@ -1094,7 +1142,6 @@ const DynatraceSingleSignOnResourceListResult = {
1094
1142
  },
1095
1143
  nextLink: {
1096
1144
  serializedName: "nextLink",
1097
- required: true,
1098
1145
  type: {
1099
1146
  name: "String"
1100
1147
  }
@@ -1109,7 +1156,6 @@ const VMHostsListResponse = {
1109
1156
  modelProperties: {
1110
1157
  value: {
1111
1158
  serializedName: "value",
1112
- required: true,
1113
1159
  type: {
1114
1160
  name: "Sequence",
1115
1161
  element: {
@@ -1122,7 +1168,6 @@ const VMHostsListResponse = {
1122
1168
  },
1123
1169
  nextLink: {
1124
1170
  serializedName: "nextLink",
1125
- required: true,
1126
1171
  type: {
1127
1172
  name: "String"
1128
1173
  }
@@ -1199,7 +1244,6 @@ const AppServiceListResponse = {
1199
1244
  modelProperties: {
1200
1245
  value: {
1201
1246
  serializedName: "value",
1202
- required: true,
1203
1247
  type: {
1204
1248
  name: "Sequence",
1205
1249
  element: {
@@ -1212,7 +1256,6 @@ const AppServiceListResponse = {
1212
1256
  },
1213
1257
  nextLink: {
1214
1258
  serializedName: "nextLink",
1215
- required: true,
1216
1259
  type: {
1217
1260
  name: "String"
1218
1261
  }
@@ -1668,7 +1711,7 @@ const $host = {
1668
1711
  const apiVersion = {
1669
1712
  parameterPath: "apiVersion",
1670
1713
  mapper: {
1671
- defaultValue: "2021-09-01-preview",
1714
+ defaultValue: "2021-09-01",
1672
1715
  isConstant: true,
1673
1716
  serializedName: "api-version",
1674
1717
  type: {
@@ -3579,7 +3622,7 @@ class DynatraceObservability extends coreClient__namespace.ServiceClient {
3579
3622
  requestContentType: "application/json; charset=utf-8",
3580
3623
  credential: credentials
3581
3624
  };
3582
- const packageDetails = `azsdk-js-arm-dynatrace/1.0.0-beta.1`;
3625
+ const packageDetails = `azsdk-js-arm-dynatrace/1.0.0`;
3583
3626
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3584
3627
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3585
3628
  : `${packageDetails}`;
@@ -3590,31 +3633,64 @@ class DynatraceObservability extends coreClient__namespace.ServiceClient {
3590
3633
  userAgentPrefix
3591
3634
  }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
3592
3635
  super(optionsWithDefaults);
3636
+ let bearerTokenAuthenticationPolicyFound = false;
3593
3637
  if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
3594
3638
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
3595
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
3639
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
3596
3640
  coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
3597
- if (!bearerTokenAuthenticationPolicyFound) {
3598
- this.pipeline.removePolicy({
3599
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
3600
- });
3601
- this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3602
- scopes: `${optionsWithDefaults.baseUri}/.default`,
3603
- challengeCallbacks: {
3604
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3605
- }
3606
- }));
3607
- }
3641
+ }
3642
+ if (!options ||
3643
+ !options.pipeline ||
3644
+ options.pipeline.getOrderedPolicies().length == 0 ||
3645
+ !bearerTokenAuthenticationPolicyFound) {
3646
+ this.pipeline.removePolicy({
3647
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
3648
+ });
3649
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3650
+ credential: credentials,
3651
+ scopes: `${optionsWithDefaults.credentialScopes}`,
3652
+ challengeCallbacks: {
3653
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3654
+ }
3655
+ }));
3608
3656
  }
3609
3657
  // Parameter assignments
3610
3658
  this.subscriptionId = subscriptionId;
3611
3659
  // Assigning values to Constant parameters
3612
3660
  this.$host = options.$host || "https://management.azure.com";
3613
- this.apiVersion = options.apiVersion || "2021-09-01-preview";
3661
+ this.apiVersion = options.apiVersion || "2021-09-01";
3614
3662
  this.monitors = new MonitorsImpl(this);
3615
3663
  this.operations = new OperationsImpl(this);
3616
3664
  this.tagRules = new TagRulesImpl(this);
3617
3665
  this.singleSignOn = new SingleSignOnImpl(this);
3666
+ this.addCustomApiVersionPolicy(options.apiVersion);
3667
+ }
3668
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
3669
+ addCustomApiVersionPolicy(apiVersion) {
3670
+ if (!apiVersion) {
3671
+ return;
3672
+ }
3673
+ const apiVersionPolicy = {
3674
+ name: "CustomApiVersionPolicy",
3675
+ sendRequest(request, next) {
3676
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3677
+ const param = request.url.split("?");
3678
+ if (param.length > 1) {
3679
+ const newParams = param[1].split("&").map((item) => {
3680
+ if (item.indexOf("api-version") > -1) {
3681
+ return "api-version=" + apiVersion;
3682
+ }
3683
+ else {
3684
+ return item;
3685
+ }
3686
+ });
3687
+ request.url = param[0] + "?" + newParams.join("&");
3688
+ }
3689
+ return next(request);
3690
+ });
3691
+ }
3692
+ };
3693
+ this.pipeline.addPolicy(apiVersionPolicy);
3618
3694
  }
3619
3695
  }
3620
3696