@azure/arm-monitor 8.0.0-alpha.20250618.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 AlertRules operations. */
|
|
14
13
|
export class AlertRulesImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class AlertRules class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -34,39 +34,22 @@ export class AlertRulesImpl {
|
|
|
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.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
yield yield __await(result.value || []);
|
|
49
|
-
});
|
|
44
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
|
|
45
|
+
let result;
|
|
46
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
47
|
+
yield result.value || [];
|
|
50
48
|
}
|
|
51
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, 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 *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
50
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
51
|
+
yield* page;
|
|
52
|
+
}
|
|
70
53
|
}
|
|
71
54
|
/**
|
|
72
55
|
* List the classic metric alert rules within a subscription.
|
|
@@ -82,39 +65,22 @@ export class AlertRulesImpl {
|
|
|
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.listBySubscriptionPagingPage(options, settings);
|
|
89
72
|
},
|
|
90
73
|
};
|
|
91
74
|
}
|
|
92
|
-
listBySubscriptionPagingPage(options, _settings) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
yield yield __await(result.value || []);
|
|
97
|
-
});
|
|
75
|
+
async *listBySubscriptionPagingPage(options, _settings) {
|
|
76
|
+
let result;
|
|
77
|
+
result = await this._listBySubscription(options);
|
|
78
|
+
yield result.value || [];
|
|
98
79
|
}
|
|
99
|
-
listBySubscriptionPagingAll(options) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(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 *listBySubscriptionPagingAll(options) {
|
|
81
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
82
|
+
yield* page;
|
|
83
|
+
}
|
|
118
84
|
}
|
|
119
85
|
/**
|
|
120
86
|
* Creates or updates a classic metric alert rule.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alertRules.js","sourceRoot":"","sources":["../../../src/operations/alertRules.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,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,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X,CAAC;AACF,MAAM,+BAA+B,GAA6B;IAChE,IAAI,EAAE,yEAAyE;IAC/E,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,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 { AlertRules } 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 AlertRuleResource,\n AlertRulesListByResourceGroupOptionalParams,\n AlertRulesListByResourceGroupResponse,\n AlertRulesListBySubscriptionOptionalParams,\n AlertRulesListBySubscriptionResponse,\n AlertRulesCreateOrUpdateOptionalParams,\n AlertRulesCreateOrUpdateResponse,\n AlertRulesDeleteOptionalParams,\n AlertRulesGetOptionalParams,\n AlertRulesGetResponse,\n AlertRuleResourcePatch,\n AlertRulesUpdateOptionalParams,\n AlertRulesUpdateResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AlertRules operations. */\nexport class AlertRulesImpl implements AlertRules {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class AlertRules class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * List the classic metric alert rules within 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?: AlertRulesListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<AlertRuleResource> {\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?: AlertRulesListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AlertRuleResource[]> {\n let result: AlertRulesListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<AlertRuleResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List the classic metric alert rules within a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<AlertRuleResource> {\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?: AlertRulesListBySubscriptionOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AlertRuleResource[]> {\n let result: AlertRulesListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<AlertRuleResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Creates or updates a classic metric alert rule.\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: AlertRuleResource,\n options?: AlertRulesCreateOrUpdateOptionalParams,\n ): Promise<AlertRulesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a classic metric alert rule\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?: AlertRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets a classic metric alert rule\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?: AlertRulesGetOptionalParams,\n ): Promise<AlertRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate\n * method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param alertRulesResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n ruleName: string,\n alertRulesResource: AlertRuleResourcePatch,\n options?: AlertRulesUpdateOptionalParams,\n ): Promise<AlertRulesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, alertRulesResource, options },\n updateOperationSpec,\n );\n }\n\n /**\n * List the classic metric alert rules within 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?: AlertRulesListByResourceGroupOptionalParams,\n ): Promise<AlertRulesListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * List the classic metric alert rules within a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): Promise<AlertRulesListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n 201: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion4],\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/alertrules/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n 201: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.alertRulesResource,\n queryParameters: [Parameters.apiVersion4],\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 listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"alertRules.js","sourceRoot":"","sources":["../../../src/operations/alertRules.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,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,iBAAyB,EACzB,OAAqD;QAErD,MAAM,IAAI,GAAG,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC3E,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,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,6BAA6B,CACvC,iBAAiB,EACjB,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,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E;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;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,+BAA+B,GAA6B;IAChE,IAAI,EAAE,yEAAyE;IAC/E,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,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 { AlertRules } 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 AlertRuleResource,\n AlertRulesListByResourceGroupOptionalParams,\n AlertRulesListByResourceGroupResponse,\n AlertRulesListBySubscriptionOptionalParams,\n AlertRulesListBySubscriptionResponse,\n AlertRulesCreateOrUpdateOptionalParams,\n AlertRulesCreateOrUpdateResponse,\n AlertRulesDeleteOptionalParams,\n AlertRulesGetOptionalParams,\n AlertRulesGetResponse,\n AlertRuleResourcePatch,\n AlertRulesUpdateOptionalParams,\n AlertRulesUpdateResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AlertRules operations. */\nexport class AlertRulesImpl implements AlertRules {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class AlertRules class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * List the classic metric alert rules within 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?: AlertRulesListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<AlertRuleResource> {\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?: AlertRulesListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AlertRuleResource[]> {\n let result: AlertRulesListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<AlertRuleResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List the classic metric alert rules within a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<AlertRuleResource> {\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?: AlertRulesListBySubscriptionOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AlertRuleResource[]> {\n let result: AlertRulesListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<AlertRuleResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Creates or updates a classic metric alert rule.\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: AlertRuleResource,\n options?: AlertRulesCreateOrUpdateOptionalParams,\n ): Promise<AlertRulesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a classic metric alert rule\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?: AlertRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets a classic metric alert rule\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?: AlertRulesGetOptionalParams,\n ): Promise<AlertRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate\n * method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param alertRulesResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n ruleName: string,\n alertRulesResource: AlertRuleResourcePatch,\n options?: AlertRulesUpdateOptionalParams,\n ): Promise<AlertRulesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, alertRulesResource, options },\n updateOperationSpec,\n );\n }\n\n /**\n * List the classic metric alert rules within 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?: AlertRulesListByResourceGroupOptionalParams,\n ): Promise<AlertRulesListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * List the classic metric alert rules within a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): Promise<AlertRulesListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n 201: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion4],\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/alertrules/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n 201: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.alertRulesResource,\n queryParameters: [Parameters.apiVersion4],\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 listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
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 { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing AutoscaleSettings operations. */
|
|
15
14
|
export class AutoscaleSettingsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class AutoscaleSettings class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -35,52 +35,35 @@ export class AutoscaleSettingsImpl {
|
|
|
35
35
|
return this;
|
|
36
36
|
},
|
|
37
37
|
byPage: (settings) => {
|
|
38
|
-
if (settings
|
|
38
|
+
if (settings?.maxPageSize) {
|
|
39
39
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
40
40
|
}
|
|
41
41
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
});
|
|
45
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
46
|
+
let result;
|
|
47
|
+
let continuationToken = settings?.continuationToken;
|
|
48
|
+
if (!continuationToken) {
|
|
49
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
50
|
+
let page = result.value || [];
|
|
51
|
+
continuationToken = result.nextLink;
|
|
52
|
+
setContinuationToken(page, continuationToken);
|
|
53
|
+
yield page;
|
|
54
|
+
}
|
|
55
|
+
while (continuationToken) {
|
|
56
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
57
|
+
continuationToken = result.nextLink;
|
|
58
|
+
let page = result.value || [];
|
|
59
|
+
setContinuationToken(page, continuationToken);
|
|
60
|
+
yield page;
|
|
61
|
+
}
|
|
64
62
|
}
|
|
65
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
70
|
-
_c = _f.value;
|
|
71
|
-
_d = false;
|
|
72
|
-
const page = _c;
|
|
73
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
77
|
-
finally {
|
|
78
|
-
try {
|
|
79
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
80
|
-
}
|
|
81
|
-
finally { if (e_1) throw e_1.error; }
|
|
82
|
-
}
|
|
83
|
-
});
|
|
63
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
64
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
65
|
+
yield* page;
|
|
66
|
+
}
|
|
84
67
|
}
|
|
85
68
|
/**
|
|
86
69
|
* Lists the autoscale settings for a subscription
|
|
@@ -96,52 +79,35 @@ export class AutoscaleSettingsImpl {
|
|
|
96
79
|
return this;
|
|
97
80
|
},
|
|
98
81
|
byPage: (settings) => {
|
|
99
|
-
if (settings
|
|
82
|
+
if (settings?.maxPageSize) {
|
|
100
83
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
101
84
|
}
|
|
102
85
|
return this.listBySubscriptionPagingPage(options, settings);
|
|
103
86
|
},
|
|
104
87
|
};
|
|
105
88
|
}
|
|
106
|
-
listBySubscriptionPagingPage(options, settings) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
});
|
|
89
|
+
async *listBySubscriptionPagingPage(options, settings) {
|
|
90
|
+
let result;
|
|
91
|
+
let continuationToken = settings?.continuationToken;
|
|
92
|
+
if (!continuationToken) {
|
|
93
|
+
result = await this._listBySubscription(options);
|
|
94
|
+
let page = result.value || [];
|
|
95
|
+
continuationToken = result.nextLink;
|
|
96
|
+
setContinuationToken(page, continuationToken);
|
|
97
|
+
yield page;
|
|
98
|
+
}
|
|
99
|
+
while (continuationToken) {
|
|
100
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
101
|
+
continuationToken = result.nextLink;
|
|
102
|
+
let page = result.value || [];
|
|
103
|
+
setContinuationToken(page, continuationToken);
|
|
104
|
+
yield page;
|
|
105
|
+
}
|
|
125
106
|
}
|
|
126
|
-
listBySubscriptionPagingAll(options) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
131
|
-
_c = _f.value;
|
|
132
|
-
_d = false;
|
|
133
|
-
const page = _c;
|
|
134
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
138
|
-
finally {
|
|
139
|
-
try {
|
|
140
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
141
|
-
}
|
|
142
|
-
finally { if (e_2) throw e_2.error; }
|
|
143
|
-
}
|
|
144
|
-
});
|
|
107
|
+
async *listBySubscriptionPagingAll(options) {
|
|
108
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
109
|
+
yield* page;
|
|
110
|
+
}
|
|
145
111
|
}
|
|
146
112
|
/**
|
|
147
113
|
* Lists the autoscale settings for a resource group
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoscaleSettings.js","sourceRoot":"","sources":["../../../src/operations/autoscaleSettings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yB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E,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mCAAmC,GAA6B;IACpE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kCAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { AutoscaleSettings } 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 AutoscaleSettingResource,\n AutoscaleSettingsListByResourceGroupNextOptionalParams,\n AutoscaleSettingsListByResourceGroupOptionalParams,\n AutoscaleSettingsListByResourceGroupResponse,\n AutoscaleSettingsListBySubscriptionNextOptionalParams,\n AutoscaleSettingsListBySubscriptionOptionalParams,\n AutoscaleSettingsListBySubscriptionResponse,\n AutoscaleSettingsCreateOrUpdateOptionalParams,\n AutoscaleSettingsCreateOrUpdateResponse,\n AutoscaleSettingsDeleteOptionalParams,\n AutoscaleSettingsGetOptionalParams,\n AutoscaleSettingsGetResponse,\n AutoscaleSettingResourcePatch,\n AutoscaleSettingsUpdateOptionalParams,\n AutoscaleSettingsUpdateResponse,\n AutoscaleSettingsListByResourceGroupNextResponse,\n AutoscaleSettingsListBySubscriptionNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AutoscaleSettings operations. */\nexport class AutoscaleSettingsImpl implements AutoscaleSettings {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class AutoscaleSettings class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the autoscale settings for 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?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<AutoscaleSettingResource> {\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?: AutoscaleSettingsListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AutoscaleSettingResource[]> {\n let result: AutoscaleSettingsListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByResourceGroupNext(\n resourceGroupName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<AutoscaleSettingResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the autoscale settings for a subscription\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<AutoscaleSettingResource> {\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?: AutoscaleSettingsListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AutoscaleSettingResource[]> {\n let result: AutoscaleSettingsListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<AutoscaleSettingResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the autoscale settings for 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?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): Promise<AutoscaleSettingsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Creates or updates an autoscale setting.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param parameters Parameters supplied to the operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n autoscaleSettingName: string,\n parameters: AutoscaleSettingResource,\n options?: AutoscaleSettingsCreateOrUpdateOptionalParams,\n ): Promise<AutoscaleSettingsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes and autoscale setting\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n autoscaleSettingName: string,\n options?: AutoscaleSettingsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets an autoscale setting\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n autoscaleSettingName: string,\n options?: AutoscaleSettingsGetOptionalParams,\n ): Promise<AutoscaleSettingsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param autoscaleSettingResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n autoscaleSettingName: string,\n autoscaleSettingResource: AutoscaleSettingResourcePatch,\n options?: AutoscaleSettingsUpdateOptionalParams,\n ): Promise<AutoscaleSettingsUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n autoscaleSettingName,\n autoscaleSettingResource,\n options,\n },\n updateOperationSpec,\n );\n }\n\n /**\n * Lists the autoscale settings for a subscription\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): Promise<AutoscaleSettingsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: AutoscaleSettingsListByResourceGroupNextOptionalParams,\n ): Promise<AutoscaleSettingsListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\n );\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: AutoscaleSettingsListBySubscriptionNextOptionalParams,\n ): Promise<AutoscaleSettingsListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n 201: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\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/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n requestBody: Parameters.autoscaleSettingResource,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"autoscaleSettings.js","sourceRoot":"","sources":["../../../src/operations/autoscaleSettings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,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CAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { AutoscaleSettings } 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 AutoscaleSettingResource,\n AutoscaleSettingsListByResourceGroupNextOptionalParams,\n AutoscaleSettingsListByResourceGroupOptionalParams,\n AutoscaleSettingsListByResourceGroupResponse,\n AutoscaleSettingsListBySubscriptionNextOptionalParams,\n AutoscaleSettingsListBySubscriptionOptionalParams,\n AutoscaleSettingsListBySubscriptionResponse,\n AutoscaleSettingsCreateOrUpdateOptionalParams,\n AutoscaleSettingsCreateOrUpdateResponse,\n AutoscaleSettingsDeleteOptionalParams,\n AutoscaleSettingsGetOptionalParams,\n AutoscaleSettingsGetResponse,\n AutoscaleSettingResourcePatch,\n AutoscaleSettingsUpdateOptionalParams,\n AutoscaleSettingsUpdateResponse,\n AutoscaleSettingsListByResourceGroupNextResponse,\n AutoscaleSettingsListBySubscriptionNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AutoscaleSettings operations. */\nexport class AutoscaleSettingsImpl implements AutoscaleSettings {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class AutoscaleSettings class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the autoscale settings for 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?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<AutoscaleSettingResource> {\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?: AutoscaleSettingsListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AutoscaleSettingResource[]> {\n let result: AutoscaleSettingsListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByResourceGroupNext(\n resourceGroupName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<AutoscaleSettingResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the autoscale settings for a subscription\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<AutoscaleSettingResource> {\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?: AutoscaleSettingsListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AutoscaleSettingResource[]> {\n let result: AutoscaleSettingsListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<AutoscaleSettingResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the autoscale settings for 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?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): Promise<AutoscaleSettingsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Creates or updates an autoscale setting.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param parameters Parameters supplied to the operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n autoscaleSettingName: string,\n parameters: AutoscaleSettingResource,\n options?: AutoscaleSettingsCreateOrUpdateOptionalParams,\n ): Promise<AutoscaleSettingsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes and autoscale setting\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n autoscaleSettingName: string,\n options?: AutoscaleSettingsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets an autoscale setting\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n autoscaleSettingName: string,\n options?: AutoscaleSettingsGetOptionalParams,\n ): Promise<AutoscaleSettingsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param autoscaleSettingResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n autoscaleSettingName: string,\n autoscaleSettingResource: AutoscaleSettingResourcePatch,\n options?: AutoscaleSettingsUpdateOptionalParams,\n ): Promise<AutoscaleSettingsUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n autoscaleSettingName,\n autoscaleSettingResource,\n options,\n },\n updateOperationSpec,\n );\n }\n\n /**\n * Lists the autoscale settings for a subscription\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): Promise<AutoscaleSettingsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: AutoscaleSettingsListByResourceGroupNextOptionalParams,\n ): Promise<AutoscaleSettingsListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\n );\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: AutoscaleSettingsListBySubscriptionNextOptionalParams,\n ): Promise<AutoscaleSettingsListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n 201: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\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/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n requestBody: Parameters.autoscaleSettingResource,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|