@azure/arm-monitor 8.0.0-alpha.20250619.1 → 8.0.0-alpha.20250718.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/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +449 -195
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/monitorClient.js +55 -11
- package/dist/browser/monitorClient.js.map +1 -1
- package/dist/browser/operations/actionGroups.js +30 -59
- package/dist/browser/operations/actionGroups.js.map +1 -1
- package/dist/browser/operations/activityLogAlerts.js +45 -79
- package/dist/browser/operations/activityLogAlerts.js.map +1 -1
- package/dist/browser/operations/activityLogs.js +23 -40
- package/dist/browser/operations/activityLogs.js.map +1 -1
- package/dist/browser/operations/alertRuleIncidents.js +10 -27
- package/dist/browser/operations/alertRuleIncidents.js.map +1 -1
- package/dist/browser/operations/alertRules.js +19 -53
- package/dist/browser/operations/alertRules.js.map +1 -1
- package/dist/browser/operations/autoscaleSettings.js +45 -79
- package/dist/browser/operations/autoscaleSettings.js.map +1 -1
- package/dist/browser/operations/azureMonitorWorkspaces.js +56 -85
- package/dist/browser/operations/azureMonitorWorkspaces.js.map +1 -1
- package/dist/browser/operations/baselines.js +10 -27
- package/dist/browser/operations/baselines.js.map +1 -1
- package/dist/browser/operations/dataCollectionEndpoints.js +45 -79
- package/dist/browser/operations/dataCollectionEndpoints.js.map +1 -1
- package/dist/browser/operations/dataCollectionRuleAssociations.js +67 -118
- package/dist/browser/operations/dataCollectionRuleAssociations.js.map +1 -1
- package/dist/browser/operations/dataCollectionRules.js +45 -79
- package/dist/browser/operations/dataCollectionRules.js.map +1 -1
- package/dist/browser/operations/diagnosticSettings.js +10 -27
- package/dist/browser/operations/diagnosticSettings.js.map +1 -1
- package/dist/browser/operations/diagnosticSettingsCategory.js +10 -27
- package/dist/browser/operations/diagnosticSettingsCategory.js.map +1 -1
- package/dist/browser/operations/eventCategories.js +10 -27
- package/dist/browser/operations/eventCategories.js.map +1 -1
- package/dist/browser/operations/logProfiles.js +10 -27
- package/dist/browser/operations/logProfiles.js.map +1 -1
- package/dist/browser/operations/metricAlerts.js +19 -53
- package/dist/browser/operations/metricAlerts.js.map +1 -1
- package/dist/browser/operations/metricAlertsStatus.js +1 -0
- package/dist/browser/operations/metricAlertsStatus.js.map +1 -1
- package/dist/browser/operations/metricDefinitions.js +19 -53
- package/dist/browser/operations/metricDefinitions.js.map +1 -1
- package/dist/browser/operations/metricNamespaces.js +10 -27
- package/dist/browser/operations/metricNamespaces.js.map +1 -1
- package/dist/browser/operations/metricsOperations.js +1 -0
- package/dist/browser/operations/metricsOperations.js.map +1 -1
- package/dist/browser/operations/monitorOperations.js +23 -40
- package/dist/browser/operations/monitorOperations.js.map +1 -1
- package/dist/browser/operations/operations.js +1 -0
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/predictiveMetric.js +1 -0
- package/dist/browser/operations/predictiveMetric.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +23 -12
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +1 -0
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/privateLinkScopeOperationStatus.js +1 -0
- package/dist/browser/operations/privateLinkScopeOperationStatus.js.map +1 -1
- package/dist/browser/operations/privateLinkScopedResources.js +45 -52
- package/dist/browser/operations/privateLinkScopedResources.js.map +1 -1
- package/dist/browser/operations/privateLinkScopes.js +56 -85
- package/dist/browser/operations/privateLinkScopes.js.map +1 -1
- package/dist/browser/operations/scheduledQueryRules.js +45 -79
- package/dist/browser/operations/scheduledQueryRules.js.map +1 -1
- package/dist/browser/operations/tenantActionGroups.js +10 -27
- package/dist/browser/operations/tenantActionGroups.js.map +1 -1
- package/dist/browser/operations/tenantActivityLogs.js +23 -40
- package/dist/browser/operations/tenantActivityLogs.js.map +1 -1
- package/dist/browser/operations/vMInsights.js +1 -0
- package/dist/browser/operations/vMInsights.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +449 -195
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/monitorClient.js +55 -11
- package/dist/commonjs/monitorClient.js.map +1 -1
- package/dist/commonjs/operations/actionGroups.js +30 -58
- package/dist/commonjs/operations/actionGroups.js.map +1 -1
- package/dist/commonjs/operations/activityLogAlerts.js +45 -78
- package/dist/commonjs/operations/activityLogAlerts.js.map +1 -1
- package/dist/commonjs/operations/activityLogs.js +23 -39
- package/dist/commonjs/operations/activityLogs.js.map +1 -1
- package/dist/commonjs/operations/alertRuleIncidents.js +10 -26
- package/dist/commonjs/operations/alertRuleIncidents.js.map +1 -1
- package/dist/commonjs/operations/alertRules.js +19 -52
- package/dist/commonjs/operations/alertRules.js.map +1 -1
- package/dist/commonjs/operations/autoscaleSettings.js +45 -78
- package/dist/commonjs/operations/autoscaleSettings.js.map +1 -1
- package/dist/commonjs/operations/azureMonitorWorkspaces.js +56 -84
- package/dist/commonjs/operations/azureMonitorWorkspaces.js.map +1 -1
- package/dist/commonjs/operations/baselines.js +10 -26
- package/dist/commonjs/operations/baselines.js.map +1 -1
- package/dist/commonjs/operations/dataCollectionEndpoints.js +45 -78
- package/dist/commonjs/operations/dataCollectionEndpoints.js.map +1 -1
- package/dist/commonjs/operations/dataCollectionRuleAssociations.js +67 -117
- package/dist/commonjs/operations/dataCollectionRuleAssociations.js.map +1 -1
- package/dist/commonjs/operations/dataCollectionRules.js +45 -78
- package/dist/commonjs/operations/dataCollectionRules.js.map +1 -1
- package/dist/commonjs/operations/diagnosticSettings.js +10 -26
- package/dist/commonjs/operations/diagnosticSettings.js.map +1 -1
- package/dist/commonjs/operations/diagnosticSettingsCategory.js +10 -26
- package/dist/commonjs/operations/diagnosticSettingsCategory.js.map +1 -1
- package/dist/commonjs/operations/eventCategories.js +10 -26
- package/dist/commonjs/operations/eventCategories.js.map +1 -1
- package/dist/commonjs/operations/logProfiles.js +10 -26
- package/dist/commonjs/operations/logProfiles.js.map +1 -1
- package/dist/commonjs/operations/metricAlerts.js +19 -52
- package/dist/commonjs/operations/metricAlerts.js.map +1 -1
- package/dist/commonjs/operations/metricAlertsStatus.js +1 -0
- package/dist/commonjs/operations/metricAlertsStatus.js.map +1 -1
- package/dist/commonjs/operations/metricDefinitions.js +19 -52
- package/dist/commonjs/operations/metricDefinitions.js.map +1 -1
- package/dist/commonjs/operations/metricNamespaces.js +10 -26
- package/dist/commonjs/operations/metricNamespaces.js.map +1 -1
- package/dist/commonjs/operations/metricsOperations.js +1 -0
- package/dist/commonjs/operations/metricsOperations.js.map +1 -1
- package/dist/commonjs/operations/monitorOperations.js +23 -39
- package/dist/commonjs/operations/monitorOperations.js.map +1 -1
- package/dist/commonjs/operations/operations.js +1 -0
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/predictiveMetric.js +1 -0
- package/dist/commonjs/operations/predictiveMetric.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +23 -12
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +1 -0
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/privateLinkScopeOperationStatus.js +1 -0
- package/dist/commonjs/operations/privateLinkScopeOperationStatus.js.map +1 -1
- package/dist/commonjs/operations/privateLinkScopedResources.js +45 -51
- package/dist/commonjs/operations/privateLinkScopedResources.js.map +1 -1
- package/dist/commonjs/operations/privateLinkScopes.js +56 -84
- package/dist/commonjs/operations/privateLinkScopes.js.map +1 -1
- package/dist/commonjs/operations/scheduledQueryRules.js +45 -78
- package/dist/commonjs/operations/scheduledQueryRules.js.map +1 -1
- package/dist/commonjs/operations/tenantActionGroups.js +10 -26
- package/dist/commonjs/operations/tenantActionGroups.js.map +1 -1
- package/dist/commonjs/operations/tenantActivityLogs.js +23 -39
- package/dist/commonjs/operations/tenantActivityLogs.js.map +1 -1
- package/dist/commonjs/operations/vMInsights.js +1 -0
- package/dist/commonjs/operations/vMInsights.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +449 -195
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/monitorClient.js +55 -11
- package/dist/esm/monitorClient.js.map +1 -1
- package/dist/esm/operations/actionGroups.js +30 -59
- package/dist/esm/operations/actionGroups.js.map +1 -1
- package/dist/esm/operations/activityLogAlerts.js +45 -79
- package/dist/esm/operations/activityLogAlerts.js.map +1 -1
- package/dist/esm/operations/activityLogs.js +23 -40
- package/dist/esm/operations/activityLogs.js.map +1 -1
- package/dist/esm/operations/alertRuleIncidents.js +10 -27
- package/dist/esm/operations/alertRuleIncidents.js.map +1 -1
- package/dist/esm/operations/alertRules.js +19 -53
- package/dist/esm/operations/alertRules.js.map +1 -1
- package/dist/esm/operations/autoscaleSettings.js +45 -79
- package/dist/esm/operations/autoscaleSettings.js.map +1 -1
- package/dist/esm/operations/azureMonitorWorkspaces.js +56 -85
- package/dist/esm/operations/azureMonitorWorkspaces.js.map +1 -1
- package/dist/esm/operations/baselines.js +10 -27
- package/dist/esm/operations/baselines.js.map +1 -1
- package/dist/esm/operations/dataCollectionEndpoints.js +45 -79
- package/dist/esm/operations/dataCollectionEndpoints.js.map +1 -1
- package/dist/esm/operations/dataCollectionRuleAssociations.js +67 -118
- package/dist/esm/operations/dataCollectionRuleAssociations.js.map +1 -1
- package/dist/esm/operations/dataCollectionRules.js +45 -79
- package/dist/esm/operations/dataCollectionRules.js.map +1 -1
- package/dist/esm/operations/diagnosticSettings.js +10 -27
- package/dist/esm/operations/diagnosticSettings.js.map +1 -1
- package/dist/esm/operations/diagnosticSettingsCategory.js +10 -27
- package/dist/esm/operations/diagnosticSettingsCategory.js.map +1 -1
- package/dist/esm/operations/eventCategories.js +10 -27
- package/dist/esm/operations/eventCategories.js.map +1 -1
- package/dist/esm/operations/logProfiles.js +10 -27
- package/dist/esm/operations/logProfiles.js.map +1 -1
- package/dist/esm/operations/metricAlerts.js +19 -53
- package/dist/esm/operations/metricAlerts.js.map +1 -1
- package/dist/esm/operations/metricAlertsStatus.js +1 -0
- package/dist/esm/operations/metricAlertsStatus.js.map +1 -1
- package/dist/esm/operations/metricDefinitions.js +19 -53
- package/dist/esm/operations/metricDefinitions.js.map +1 -1
- package/dist/esm/operations/metricNamespaces.js +10 -27
- package/dist/esm/operations/metricNamespaces.js.map +1 -1
- package/dist/esm/operations/metricsOperations.js +1 -0
- package/dist/esm/operations/metricsOperations.js.map +1 -1
- package/dist/esm/operations/monitorOperations.js +23 -40
- package/dist/esm/operations/monitorOperations.js.map +1 -1
- package/dist/esm/operations/operations.js +1 -0
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/predictiveMetric.js +1 -0
- package/dist/esm/operations/predictiveMetric.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +23 -12
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +1 -0
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/privateLinkScopeOperationStatus.js +1 -0
- package/dist/esm/operations/privateLinkScopeOperationStatus.js.map +1 -1
- package/dist/esm/operations/privateLinkScopedResources.js +45 -52
- package/dist/esm/operations/privateLinkScopedResources.js.map +1 -1
- package/dist/esm/operations/privateLinkScopes.js +56 -85
- package/dist/esm/operations/privateLinkScopes.js.map +1 -1
- package/dist/esm/operations/scheduledQueryRules.js +45 -79
- package/dist/esm/operations/scheduledQueryRules.js.map +1 -1
- package/dist/esm/operations/tenantActionGroups.js +10 -27
- package/dist/esm/operations/tenantActionGroups.js.map +1 -1
- package/dist/esm/operations/tenantActivityLogs.js +23 -40
- package/dist/esm/operations/tenantActivityLogs.js.map +1 -1
- package/dist/esm/operations/vMInsights.js +1 -0
- package/dist/esm/operations/vMInsights.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +449 -195
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/monitorClient.js +55 -11
- package/dist/react-native/monitorClient.js.map +1 -1
- package/dist/react-native/operations/actionGroups.js +30 -59
- package/dist/react-native/operations/actionGroups.js.map +1 -1
- package/dist/react-native/operations/activityLogAlerts.js +45 -79
- package/dist/react-native/operations/activityLogAlerts.js.map +1 -1
- package/dist/react-native/operations/activityLogs.js +23 -40
- package/dist/react-native/operations/activityLogs.js.map +1 -1
- package/dist/react-native/operations/alertRuleIncidents.js +10 -27
- package/dist/react-native/operations/alertRuleIncidents.js.map +1 -1
- package/dist/react-native/operations/alertRules.js +19 -53
- package/dist/react-native/operations/alertRules.js.map +1 -1
- package/dist/react-native/operations/autoscaleSettings.js +45 -79
- package/dist/react-native/operations/autoscaleSettings.js.map +1 -1
- package/dist/react-native/operations/azureMonitorWorkspaces.js +56 -85
- package/dist/react-native/operations/azureMonitorWorkspaces.js.map +1 -1
- package/dist/react-native/operations/baselines.js +10 -27
- package/dist/react-native/operations/baselines.js.map +1 -1
- package/dist/react-native/operations/dataCollectionEndpoints.js +45 -79
- package/dist/react-native/operations/dataCollectionEndpoints.js.map +1 -1
- package/dist/react-native/operations/dataCollectionRuleAssociations.js +67 -118
- package/dist/react-native/operations/dataCollectionRuleAssociations.js.map +1 -1
- package/dist/react-native/operations/dataCollectionRules.js +45 -79
- package/dist/react-native/operations/dataCollectionRules.js.map +1 -1
- package/dist/react-native/operations/diagnosticSettings.js +10 -27
- package/dist/react-native/operations/diagnosticSettings.js.map +1 -1
- package/dist/react-native/operations/diagnosticSettingsCategory.js +10 -27
- package/dist/react-native/operations/diagnosticSettingsCategory.js.map +1 -1
- package/dist/react-native/operations/eventCategories.js +10 -27
- package/dist/react-native/operations/eventCategories.js.map +1 -1
- package/dist/react-native/operations/logProfiles.js +10 -27
- package/dist/react-native/operations/logProfiles.js.map +1 -1
- package/dist/react-native/operations/metricAlerts.js +19 -53
- package/dist/react-native/operations/metricAlerts.js.map +1 -1
- package/dist/react-native/operations/metricAlertsStatus.js +1 -0
- package/dist/react-native/operations/metricAlertsStatus.js.map +1 -1
- package/dist/react-native/operations/metricDefinitions.js +19 -53
- package/dist/react-native/operations/metricDefinitions.js.map +1 -1
- package/dist/react-native/operations/metricNamespaces.js +10 -27
- package/dist/react-native/operations/metricNamespaces.js.map +1 -1
- package/dist/react-native/operations/metricsOperations.js +1 -0
- package/dist/react-native/operations/metricsOperations.js.map +1 -1
- package/dist/react-native/operations/monitorOperations.js +23 -40
- package/dist/react-native/operations/monitorOperations.js.map +1 -1
- package/dist/react-native/operations/operations.js +1 -0
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/predictiveMetric.js +1 -0
- package/dist/react-native/operations/predictiveMetric.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +23 -12
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +1 -0
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/privateLinkScopeOperationStatus.js +1 -0
- package/dist/react-native/operations/privateLinkScopeOperationStatus.js.map +1 -1
- package/dist/react-native/operations/privateLinkScopedResources.js +45 -52
- package/dist/react-native/operations/privateLinkScopedResources.js.map +1 -1
- package/dist/react-native/operations/privateLinkScopes.js +56 -85
- package/dist/react-native/operations/privateLinkScopes.js.map +1 -1
- package/dist/react-native/operations/scheduledQueryRules.js +45 -79
- package/dist/react-native/operations/scheduledQueryRules.js.map +1 -1
- package/dist/react-native/operations/tenantActionGroups.js +10 -27
- package/dist/react-native/operations/tenantActionGroups.js.map +1 -1
- package/dist/react-native/operations/tenantActivityLogs.js +23 -40
- package/dist/react-native/operations/tenantActivityLogs.js.map +1 -1
- package/dist/react-native/operations/vMInsights.js +1 -0
- package/dist/react-native/operations/vMInsights.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-monitor.api.md → arm-monitor-node.api.md} +0 -0
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing LogProfiles operations. */
|
|
14
13
|
export class LogProfilesImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class LogProfiles class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -33,39 +33,22 @@ export class LogProfilesImpl {
|
|
|
33
33
|
return this;
|
|
34
34
|
},
|
|
35
35
|
byPage: (settings) => {
|
|
36
|
-
if (settings
|
|
36
|
+
if (settings?.maxPageSize) {
|
|
37
37
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
38
38
|
}
|
|
39
39
|
return this.listPagingPage(options, settings);
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
listPagingPage(options, _settings) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
yield yield __await(result.value || []);
|
|
48
|
-
});
|
|
43
|
+
async *listPagingPage(options, _settings) {
|
|
44
|
+
let result;
|
|
45
|
+
result = await this._list(options);
|
|
46
|
+
yield result.value || [];
|
|
49
47
|
}
|
|
50
|
-
listPagingAll(options) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
55
|
-
_c = _f.value;
|
|
56
|
-
_d = false;
|
|
57
|
-
const page = _c;
|
|
58
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
62
|
-
finally {
|
|
63
|
-
try {
|
|
64
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
65
|
-
}
|
|
66
|
-
finally { if (e_1) throw e_1.error; }
|
|
67
|
-
}
|
|
68
|
-
});
|
|
48
|
+
async *listPagingAll(options) {
|
|
49
|
+
for await (const page of this.listPagingPage(options)) {
|
|
50
|
+
yield* page;
|
|
51
|
+
}
|
|
69
52
|
}
|
|
70
53
|
/**
|
|
71
54
|
* Deletes the log profile.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logProfiles.js","sourceRoot":"","sources":["../../../src/operations/logProfiles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAgBtD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAuC;QAEvC,MAAM,IAAI,GAAG,IAAI,CAAC,a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F,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,0EAA0E;IAChF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { LogProfiles } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n LogProfileResource,\n LogProfilesListOptionalParams,\n LogProfilesListResponse,\n LogProfilesDeleteOptionalParams,\n LogProfilesGetOptionalParams,\n LogProfilesGetResponse,\n LogProfilesCreateOrUpdateOptionalParams,\n LogProfilesCreateOrUpdateResponse,\n LogProfileResourcePatch,\n LogProfilesUpdateOptionalParams,\n LogProfilesUpdateResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LogProfiles operations. */\nexport class LogProfilesImpl implements LogProfiles {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class LogProfiles class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * List the log profiles.\n * @param options The options parameters.\n */\n public list(\n options?: LogProfilesListOptionalParams,\n ): PagedAsyncIterableIterator<LogProfileResource> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: LogProfilesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<LogProfileResource[]> {\n let result: LogProfilesListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: LogProfilesListOptionalParams,\n ): AsyncIterableIterator<LogProfileResource> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Deletes the log profile.\n * @param logProfileName The name of the log profile.\n * @param options The options parameters.\n */\n delete(\n logProfileName: string,\n options?: LogProfilesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { logProfileName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets the log profile.\n * @param logProfileName The name of the log profile.\n * @param options The options parameters.\n */\n get(\n logProfileName: string,\n options?: LogProfilesGetOptionalParams,\n ): Promise<LogProfilesGetResponse> {\n return this.client.sendOperationRequest(\n { logProfileName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or update a log profile in Azure Monitoring REST API.\n * @param logProfileName The name of the log profile.\n * @param parameters Parameters supplied to the operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n logProfileName: string,\n parameters: LogProfileResource,\n options?: LogProfilesCreateOrUpdateOptionalParams,\n ): Promise<LogProfilesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { logProfileName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method.\n * @param logProfileName The name of the log profile.\n * @param logProfilesResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n logProfileName: string,\n logProfilesResource: LogProfileResourcePatch,\n options?: LogProfilesUpdateOptionalParams,\n ): Promise<LogProfilesUpdateResponse> {\n return this.client.sendOperationRequest(\n { logProfileName, logProfilesResource, options },\n updateOperationSpec,\n );\n }\n\n /**\n * List the log profiles.\n * @param options The options parameters.\n */\n private _list(\n options?: LogProfilesListOptionalParams,\n ): Promise<LogProfilesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {} },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.logProfileName,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LogProfileResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.logProfileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LogProfileResource,\n },\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.logProfileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.LogProfileResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.logProfilesResource,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.logProfileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LogProfileCollection,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"logProfiles.js","sourceRoot":"","sources":["../../../src/operations/logProfiles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAgBtD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IACT,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAuC;QAEvC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,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* Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { LogProfiles } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n LogProfileResource,\n LogProfilesListOptionalParams,\n LogProfilesListResponse,\n LogProfilesDeleteOptionalParams,\n LogProfilesGetOptionalParams,\n LogProfilesGetResponse,\n LogProfilesCreateOrUpdateOptionalParams,\n LogProfilesCreateOrUpdateResponse,\n LogProfileResourcePatch,\n LogProfilesUpdateOptionalParams,\n LogProfilesUpdateResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LogProfiles operations. */\nexport class LogProfilesImpl implements LogProfiles {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class LogProfiles class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * List the log profiles.\n * @param options The options parameters.\n */\n public list(\n options?: LogProfilesListOptionalParams,\n ): PagedAsyncIterableIterator<LogProfileResource> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: LogProfilesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<LogProfileResource[]> {\n let result: LogProfilesListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: LogProfilesListOptionalParams,\n ): AsyncIterableIterator<LogProfileResource> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Deletes the log profile.\n * @param logProfileName The name of the log profile.\n * @param options The options parameters.\n */\n delete(\n logProfileName: string,\n options?: LogProfilesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { logProfileName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets the log profile.\n * @param logProfileName The name of the log profile.\n * @param options The options parameters.\n */\n get(\n logProfileName: string,\n options?: LogProfilesGetOptionalParams,\n ): Promise<LogProfilesGetResponse> {\n return this.client.sendOperationRequest(\n { logProfileName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or update a log profile in Azure Monitoring REST API.\n * @param logProfileName The name of the log profile.\n * @param parameters Parameters supplied to the operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n logProfileName: string,\n parameters: LogProfileResource,\n options?: LogProfilesCreateOrUpdateOptionalParams,\n ): Promise<LogProfilesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { logProfileName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method.\n * @param logProfileName The name of the log profile.\n * @param logProfilesResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n logProfileName: string,\n logProfilesResource: LogProfileResourcePatch,\n options?: LogProfilesUpdateOptionalParams,\n ): Promise<LogProfilesUpdateResponse> {\n return this.client.sendOperationRequest(\n { logProfileName, logProfilesResource, options },\n updateOperationSpec,\n );\n }\n\n /**\n * List the log profiles.\n * @param options The options parameters.\n */\n private _list(\n options?: LogProfilesListOptionalParams,\n ): Promise<LogProfilesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {} },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.logProfileName,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LogProfileResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.logProfileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LogProfileResource,\n },\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.logProfileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.LogProfileResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.logProfilesResource,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.logProfileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LogProfileCollection,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing MetricAlerts operations. */
|
|
14
13
|
export class MetricAlertsImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class MetricAlerts class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -33,39 +33,22 @@ export class MetricAlertsImpl {
|
|
|
33
33
|
return this;
|
|
34
34
|
},
|
|
35
35
|
byPage: (settings) => {
|
|
36
|
-
if (settings
|
|
36
|
+
if (settings?.maxPageSize) {
|
|
37
37
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
38
38
|
}
|
|
39
39
|
return this.listBySubscriptionPagingPage(options, settings);
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
listBySubscriptionPagingPage(options, _settings) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
yield yield __await(result.value || []);
|
|
48
|
-
});
|
|
43
|
+
async *listBySubscriptionPagingPage(options, _settings) {
|
|
44
|
+
let result;
|
|
45
|
+
result = await this._listBySubscription(options);
|
|
46
|
+
yield result.value || [];
|
|
49
47
|
}
|
|
50
|
-
listBySubscriptionPagingAll(options) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
55
|
-
_c = _f.value;
|
|
56
|
-
_d = false;
|
|
57
|
-
const page = _c;
|
|
58
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
62
|
-
finally {
|
|
63
|
-
try {
|
|
64
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
65
|
-
}
|
|
66
|
-
finally { if (e_1) throw e_1.error; }
|
|
67
|
-
}
|
|
68
|
-
});
|
|
48
|
+
async *listBySubscriptionPagingAll(options) {
|
|
49
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
50
|
+
yield* page;
|
|
51
|
+
}
|
|
69
52
|
}
|
|
70
53
|
/**
|
|
71
54
|
* Retrieve alert rule definitions in a resource group.
|
|
@@ -82,39 +65,22 @@ export class MetricAlertsImpl {
|
|
|
82
65
|
return this;
|
|
83
66
|
},
|
|
84
67
|
byPage: (settings) => {
|
|
85
|
-
if (settings
|
|
68
|
+
if (settings?.maxPageSize) {
|
|
86
69
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
87
70
|
}
|
|
88
71
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
89
72
|
},
|
|
90
73
|
};
|
|
91
74
|
}
|
|
92
|
-
listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
yield yield __await(result.value || []);
|
|
97
|
-
});
|
|
75
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
|
|
76
|
+
let result;
|
|
77
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
78
|
+
yield result.value || [];
|
|
98
79
|
}
|
|
99
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
104
|
-
_c = _f.value;
|
|
105
|
-
_d = false;
|
|
106
|
-
const page = _c;
|
|
107
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
111
|
-
finally {
|
|
112
|
-
try {
|
|
113
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
114
|
-
}
|
|
115
|
-
finally { if (e_2) throw e_2.error; }
|
|
116
|
-
}
|
|
117
|
-
});
|
|
80
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
81
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
82
|
+
yield* page;
|
|
83
|
+
}
|
|
118
84
|
}
|
|
119
85
|
/**
|
|
120
86
|
* Retrieve alert rule definitions in a subscription.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metricAlerts.js","sourceRoot":"","sources":["../../../src/operations/metricAlerts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAkBtD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IAG3B;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,kBAAkB,CACvB,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC;QACvD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC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,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { MetricAlerts } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n MetricAlertResource,\n MetricAlertsListBySubscriptionOptionalParams,\n MetricAlertsListBySubscriptionResponse,\n MetricAlertsListByResourceGroupOptionalParams,\n MetricAlertsListByResourceGroupResponse,\n MetricAlertsGetOptionalParams,\n MetricAlertsGetResponse,\n MetricAlertsCreateOrUpdateOptionalParams,\n MetricAlertsCreateOrUpdateResponse,\n MetricAlertResourcePatch,\n MetricAlertsUpdateOptionalParams,\n MetricAlertsUpdateResponse,\n MetricAlertsDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MetricAlerts operations. */\nexport class MetricAlertsImpl implements MetricAlerts {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class MetricAlerts class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Retrieve alert rule definitions in a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: MetricAlertsListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<MetricAlertResource> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: MetricAlertsListBySubscriptionOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<MetricAlertResource[]> {\n let result: MetricAlertsListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: MetricAlertsListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<MetricAlertResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieve alert rule definitions in a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: MetricAlertsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<MetricAlertResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: MetricAlertsListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<MetricAlertResource[]> {\n let result: MetricAlertsListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: MetricAlertsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<MetricAlertResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieve alert rule definitions in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: MetricAlertsListBySubscriptionOptionalParams,\n ): Promise<MetricAlertsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * Retrieve alert rule definitions in a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: MetricAlertsListByResourceGroupOptionalParams,\n ): Promise<MetricAlertsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Retrieve an alert rule definition.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n ruleName: string,\n options?: MetricAlertsGetOptionalParams,\n ): Promise<MetricAlertsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or update an metric alert definition.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param parameters The parameters of the rule to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n ruleName: string,\n parameters: MetricAlertResource,\n options?: MetricAlertsCreateOrUpdateOptionalParams,\n ): Promise<MetricAlertsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Update an metric alert definition.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param parameters The parameters of the rule to update.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n ruleName: string,\n parameters: MetricAlertResourcePatch,\n options?: MetricAlertsUpdateOptionalParams,\n ): Promise<MetricAlertsUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Delete an alert rule definition.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n ruleName: string,\n options?: MetricAlertsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n deleteOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters4,\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters5,\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"metricAlerts.js","sourceRoot":"","sources":["../../../src/operations/metricAlerts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;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AAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { MetricAlerts } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n MetricAlertResource,\n MetricAlertsListBySubscriptionOptionalParams,\n MetricAlertsListBySubscriptionResponse,\n MetricAlertsListByResourceGroupOptionalParams,\n MetricAlertsListByResourceGroupResponse,\n MetricAlertsGetOptionalParams,\n MetricAlertsGetResponse,\n MetricAlertsCreateOrUpdateOptionalParams,\n MetricAlertsCreateOrUpdateResponse,\n MetricAlertResourcePatch,\n MetricAlertsUpdateOptionalParams,\n MetricAlertsUpdateResponse,\n MetricAlertsDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MetricAlerts operations. */\nexport class MetricAlertsImpl implements MetricAlerts {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class MetricAlerts class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Retrieve alert rule definitions in a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: MetricAlertsListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<MetricAlertResource> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: MetricAlertsListBySubscriptionOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<MetricAlertResource[]> {\n let result: MetricAlertsListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: MetricAlertsListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<MetricAlertResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieve alert rule definitions in a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: MetricAlertsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<MetricAlertResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: MetricAlertsListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<MetricAlertResource[]> {\n let result: MetricAlertsListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: MetricAlertsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<MetricAlertResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieve alert rule definitions in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: MetricAlertsListBySubscriptionOptionalParams,\n ): Promise<MetricAlertsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * Retrieve alert rule definitions in a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: MetricAlertsListByResourceGroupOptionalParams,\n ): Promise<MetricAlertsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Retrieve an alert rule definition.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n ruleName: string,\n options?: MetricAlertsGetOptionalParams,\n ): Promise<MetricAlertsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or update an metric alert definition.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param parameters The parameters of the rule to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n ruleName: string,\n parameters: MetricAlertResource,\n options?: MetricAlertsCreateOrUpdateOptionalParams,\n ): Promise<MetricAlertsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Update an metric alert definition.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param parameters The parameters of the rule to update.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n ruleName: string,\n parameters: MetricAlertResourcePatch,\n options?: MetricAlertsUpdateOptionalParams,\n ): Promise<MetricAlertsUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Delete an alert rule definition.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n ruleName: string,\n options?: MetricAlertsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n deleteOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters4,\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters5,\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing MetricAlertsStatus operations. */
|
|
12
12
|
export class MetricAlertsStatusImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class MetricAlertsStatus class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metricAlertsStatus.js","sourceRoot":"","sources":["../../../src/operations/metricAlertsStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;
|
|
1
|
+
{"version":3,"file":"metricAlertsStatus.js","sourceRoot":"","sources":["../../../src/operations/metricAlertsStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAChB,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,iBAAyB,EACzB,QAAgB,EAChB,OAA8C;QAE9C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,EACxC,iBAAiB,CAClB,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,UAAU,CACR,iBAAyB,EACzB,QAAgB,EAChB,UAAkB,EAClB,OAAoD;QAEpD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACpD,uBAAuB,CACxB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,gIAAgI;IACtI,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,uBAAuB,GAA6B;IACxD,IAAI,EAAE,6IAA6I;IACnJ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { MetricAlertsStatus } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n MetricAlertsStatusListOptionalParams,\n MetricAlertsStatusListResponse,\n MetricAlertsStatusListByNameOptionalParams,\n MetricAlertsStatusListByNameResponse,\n} from \"../models/index.js\";\n\n/** Class containing MetricAlertsStatus operations. */\nexport class MetricAlertsStatusImpl implements MetricAlertsStatus {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class MetricAlertsStatus class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Retrieve an alert rule status.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n list(\n resourceGroupName: string,\n ruleName: string,\n options?: MetricAlertsStatusListOptionalParams,\n ): Promise<MetricAlertsStatusListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Retrieve an alert rule status.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param statusName The name of the status.\n * @param options The options parameters.\n */\n listByName(\n resourceGroupName: string,\n ruleName: string,\n statusName: string,\n options?: MetricAlertsStatusListByNameOptionalParams,\n ): Promise<MetricAlertsStatusListByNameResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, statusName, options },\n listByNameOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertStatusCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricAlertStatusCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion9],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n Parameters.statusName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing MetricDefinitions operations. */
|
|
14
13
|
export class MetricDefinitionsImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class MetricDefinitions class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -34,39 +34,22 @@ export class MetricDefinitionsImpl {
|
|
|
34
34
|
return this;
|
|
35
35
|
},
|
|
36
36
|
byPage: (settings) => {
|
|
37
|
-
if (settings
|
|
37
|
+
if (settings?.maxPageSize) {
|
|
38
38
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
39
39
|
}
|
|
40
40
|
return this.listAtSubscriptionScopePagingPage(region, options, settings);
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listAtSubscriptionScopePagingPage(region, options, _settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
yield yield __await(result.value || []);
|
|
49
|
-
});
|
|
44
|
+
async *listAtSubscriptionScopePagingPage(region, options, _settings) {
|
|
45
|
+
let result;
|
|
46
|
+
result = await this._listAtSubscriptionScope(region, options);
|
|
47
|
+
yield result.value || [];
|
|
50
48
|
}
|
|
51
|
-
listAtSubscriptionScopePagingAll(region, options) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
for (var _d = true, _e = __asyncValues(this.listAtSubscriptionScopePagingPage(region, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
56
|
-
_c = _f.value;
|
|
57
|
-
_d = false;
|
|
58
|
-
const page = _c;
|
|
59
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
63
|
-
finally {
|
|
64
|
-
try {
|
|
65
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
66
|
-
}
|
|
67
|
-
finally { if (e_1) throw e_1.error; }
|
|
68
|
-
}
|
|
69
|
-
});
|
|
49
|
+
async *listAtSubscriptionScopePagingAll(region, options) {
|
|
50
|
+
for await (const page of this.listAtSubscriptionScopePagingPage(region, options)) {
|
|
51
|
+
yield* page;
|
|
52
|
+
}
|
|
70
53
|
}
|
|
71
54
|
/**
|
|
72
55
|
* Lists the metric definitions for the resource.
|
|
@@ -83,39 +66,22 @@ export class MetricDefinitionsImpl {
|
|
|
83
66
|
return this;
|
|
84
67
|
},
|
|
85
68
|
byPage: (settings) => {
|
|
86
|
-
if (settings
|
|
69
|
+
if (settings?.maxPageSize) {
|
|
87
70
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
88
71
|
}
|
|
89
72
|
return this.listPagingPage(resourceUri, options, settings);
|
|
90
73
|
},
|
|
91
74
|
};
|
|
92
75
|
}
|
|
93
|
-
listPagingPage(resourceUri, options, _settings) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
yield yield __await(result.value || []);
|
|
98
|
-
});
|
|
76
|
+
async *listPagingPage(resourceUri, options, _settings) {
|
|
77
|
+
let result;
|
|
78
|
+
result = await this._list(resourceUri, options);
|
|
79
|
+
yield result.value || [];
|
|
99
80
|
}
|
|
100
|
-
listPagingAll(resourceUri, options) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
105
|
-
_c = _f.value;
|
|
106
|
-
_d = false;
|
|
107
|
-
const page = _c;
|
|
108
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
112
|
-
finally {
|
|
113
|
-
try {
|
|
114
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
115
|
-
}
|
|
116
|
-
finally { if (e_2) throw e_2.error; }
|
|
117
|
-
}
|
|
118
|
-
});
|
|
81
|
+
async *listPagingAll(resourceUri, options) {
|
|
82
|
+
for await (const page of this.listPagingPage(resourceUri, options)) {
|
|
83
|
+
yield* page;
|
|
84
|
+
}
|
|
119
85
|
}
|
|
120
86
|
/**
|
|
121
87
|
* Lists the metric definitions for the subscription.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metricDefinitions.js","sourceRoot":"","sources":["../../../src/operations/metricDefinitions.ts"],"names":[],"mappings":"AAAA;;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AAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,eAAe,CAAC;IACpE,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { MetricDefinitions } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n SubscriptionScopeMetricDefinition,\n MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n MetricDefinitionsListAtSubscriptionScopeResponse,\n MetricDefinition,\n MetricDefinitionsListOptionalParams,\n MetricDefinitionsListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MetricDefinitions operations. */\nexport class MetricDefinitionsImpl implements MetricDefinitions {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class MetricDefinitions class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the metric definitions for the subscription.\n * @param region The region where the metrics you want reside.\n * @param options The options parameters.\n */\n public listAtSubscriptionScope(\n region: string,\n options?: MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n ): PagedAsyncIterableIterator<SubscriptionScopeMetricDefinition> {\n const iter = this.listAtSubscriptionScopePagingAll(region, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listAtSubscriptionScopePagingPage(\n region,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listAtSubscriptionScopePagingPage(\n region: string,\n options?: MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<SubscriptionScopeMetricDefinition[]> {\n let result: MetricDefinitionsListAtSubscriptionScopeResponse;\n result = await this._listAtSubscriptionScope(region, options);\n yield result.value || [];\n }\n\n private async *listAtSubscriptionScopePagingAll(\n region: string,\n options?: MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n ): AsyncIterableIterator<SubscriptionScopeMetricDefinition> {\n for await (const page of this.listAtSubscriptionScopePagingPage(\n region,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the metric definitions for the resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: MetricDefinitionsListOptionalParams,\n ): PagedAsyncIterableIterator<MetricDefinition> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: MetricDefinitionsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<MetricDefinition[]> {\n let result: MetricDefinitionsListResponse;\n result = await this._list(resourceUri, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: MetricDefinitionsListOptionalParams,\n ): AsyncIterableIterator<MetricDefinition> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the metric definitions for the subscription.\n * @param region The region where the metrics you want reside.\n * @param options The options parameters.\n */\n private _listAtSubscriptionScope(\n region: string,\n options?: MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n ): Promise<MetricDefinitionsListAtSubscriptionScopeResponse> {\n return this.client.sendOperationRequest(\n { region, options },\n listAtSubscriptionScopeOperationSpec,\n );\n }\n\n /**\n * Lists the metric definitions for the resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: MetricDefinitionsListOptionalParams,\n ): Promise<MetricDefinitionsListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listAtSubscriptionScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricDefinitions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubscriptionScopeMetricDefinitionCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.region,\n Parameters.metricnamespace,\n ],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/metricDefinitions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricDefinitionCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseAutoGenerated,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.metricnamespace],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"metricDefinitions.js","sourceRoot":"","sources":["../../../src/operations/metricDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,K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CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,gFAAgF;IACtF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,2CAA2C;SAChE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,eAAe;KAC3B;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,+DAA+D;IACrE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,eAAe,CAAC;IACpE,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { MetricDefinitions } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n SubscriptionScopeMetricDefinition,\n MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n MetricDefinitionsListAtSubscriptionScopeResponse,\n MetricDefinition,\n MetricDefinitionsListOptionalParams,\n MetricDefinitionsListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MetricDefinitions operations. */\nexport class MetricDefinitionsImpl implements MetricDefinitions {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class MetricDefinitions class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the metric definitions for the subscription.\n * @param region The region where the metrics you want reside.\n * @param options The options parameters.\n */\n public listAtSubscriptionScope(\n region: string,\n options?: MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n ): PagedAsyncIterableIterator<SubscriptionScopeMetricDefinition> {\n const iter = this.listAtSubscriptionScopePagingAll(region, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listAtSubscriptionScopePagingPage(\n region,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listAtSubscriptionScopePagingPage(\n region: string,\n options?: MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<SubscriptionScopeMetricDefinition[]> {\n let result: MetricDefinitionsListAtSubscriptionScopeResponse;\n result = await this._listAtSubscriptionScope(region, options);\n yield result.value || [];\n }\n\n private async *listAtSubscriptionScopePagingAll(\n region: string,\n options?: MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n ): AsyncIterableIterator<SubscriptionScopeMetricDefinition> {\n for await (const page of this.listAtSubscriptionScopePagingPage(\n region,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the metric definitions for the resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: MetricDefinitionsListOptionalParams,\n ): PagedAsyncIterableIterator<MetricDefinition> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: MetricDefinitionsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<MetricDefinition[]> {\n let result: MetricDefinitionsListResponse;\n result = await this._list(resourceUri, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: MetricDefinitionsListOptionalParams,\n ): AsyncIterableIterator<MetricDefinition> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the metric definitions for the subscription.\n * @param region The region where the metrics you want reside.\n * @param options The options parameters.\n */\n private _listAtSubscriptionScope(\n region: string,\n options?: MetricDefinitionsListAtSubscriptionScopeOptionalParams,\n ): Promise<MetricDefinitionsListAtSubscriptionScopeResponse> {\n return this.client.sendOperationRequest(\n { region, options },\n listAtSubscriptionScopeOperationSpec,\n );\n }\n\n /**\n * Lists the metric definitions for the resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: MetricDefinitionsListOptionalParams,\n ): Promise<MetricDefinitionsListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listAtSubscriptionScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricDefinitions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubscriptionScopeMetricDefinitionCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.region,\n Parameters.metricnamespace,\n ],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/metricDefinitions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricDefinitionCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseAutoGenerated,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.metricnamespace],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing MetricNamespaces operations. */
|
|
14
13
|
export class MetricNamespacesImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class MetricNamespaces class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -34,39 +34,22 @@ export class MetricNamespacesImpl {
|
|
|
34
34
|
return this;
|
|
35
35
|
},
|
|
36
36
|
byPage: (settings) => {
|
|
37
|
-
if (settings
|
|
37
|
+
if (settings?.maxPageSize) {
|
|
38
38
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
39
39
|
}
|
|
40
40
|
return this.listPagingPage(resourceUri, options, settings);
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listPagingPage(resourceUri, options, _settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
yield yield __await(result.value || []);
|
|
49
|
-
});
|
|
44
|
+
async *listPagingPage(resourceUri, options, _settings) {
|
|
45
|
+
let result;
|
|
46
|
+
result = await this._list(resourceUri, options);
|
|
47
|
+
yield result.value || [];
|
|
50
48
|
}
|
|
51
|
-
listPagingAll(resourceUri, options) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
56
|
-
_c = _f.value;
|
|
57
|
-
_d = false;
|
|
58
|
-
const page = _c;
|
|
59
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
63
|
-
finally {
|
|
64
|
-
try {
|
|
65
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
66
|
-
}
|
|
67
|
-
finally { if (e_1) throw e_1.error; }
|
|
68
|
-
}
|
|
69
|
-
});
|
|
49
|
+
async *listPagingAll(resourceUri, options) {
|
|
50
|
+
for await (const page of this.listPagingPage(resourceUri, options)) {
|
|
51
|
+
yield* page;
|
|
52
|
+
}
|
|
70
53
|
}
|
|
71
54
|
/**
|
|
72
55
|
* Lists the metric namespaces for the resource.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metricNamespaces.js","sourceRoot":"","sources":["../../../src/operations/metricNamespaces.ts"],"names":[],"mappings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,aAAa,CAC1B,WAAmB,EACnB,OAA4C;QAE5C,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC;YACnE,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,KAAK,CACX,WAAmB,EACnB,OAA4C;QAE5C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,8DAA8D;IACpE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC;IAC9D,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { MetricNamespaces } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n MetricNamespace,\n MetricNamespacesListOptionalParams,\n MetricNamespacesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing MetricNamespaces operations. */\nexport class MetricNamespacesImpl implements MetricNamespaces {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class MetricNamespaces class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the metric namespaces for the resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: MetricNamespacesListOptionalParams,\n ): PagedAsyncIterableIterator<MetricNamespace> {\n const iter = this.listPagingAll(resourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: MetricNamespacesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<MetricNamespace[]> {\n let result: MetricNamespacesListResponse;\n result = await this._list(resourceUri, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: MetricNamespacesListOptionalParams,\n ): AsyncIterableIterator<MetricNamespace> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the metric namespaces for the resource.\n * @param resourceUri The identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: MetricNamespacesListOptionalParams,\n ): Promise<MetricNamespacesListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/microsoft.insights/metricNamespaces\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetricNamespaceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.startTime],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|