@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,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 ScheduledQueryRules operations. */
|
|
15
14
|
export class ScheduledQueryRulesImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class ScheduledQueryRules class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -34,52 +34,35 @@ export class ScheduledQueryRulesImpl {
|
|
|
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.listBySubscriptionPagingPage(options, settings);
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listBySubscriptionPagingPage(options, settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
});
|
|
44
|
+
async *listBySubscriptionPagingPage(options, settings) {
|
|
45
|
+
let result;
|
|
46
|
+
let continuationToken = settings?.continuationToken;
|
|
47
|
+
if (!continuationToken) {
|
|
48
|
+
result = await this._listBySubscription(options);
|
|
49
|
+
let page = result.value || [];
|
|
50
|
+
continuationToken = result.nextLink;
|
|
51
|
+
setContinuationToken(page, continuationToken);
|
|
52
|
+
yield page;
|
|
53
|
+
}
|
|
54
|
+
while (continuationToken) {
|
|
55
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
setContinuationToken(page, continuationToken);
|
|
59
|
+
yield page;
|
|
60
|
+
}
|
|
63
61
|
}
|
|
64
|
-
listBySubscriptionPagingAll(options) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
69
|
-
_c = _f.value;
|
|
70
|
-
_d = false;
|
|
71
|
-
const page = _c;
|
|
72
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
76
|
-
finally {
|
|
77
|
-
try {
|
|
78
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
79
|
-
}
|
|
80
|
-
finally { if (e_1) throw e_1.error; }
|
|
81
|
-
}
|
|
82
|
-
});
|
|
62
|
+
async *listBySubscriptionPagingAll(options) {
|
|
63
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
64
|
+
yield* page;
|
|
65
|
+
}
|
|
83
66
|
}
|
|
84
67
|
/**
|
|
85
68
|
* Retrieve scheduled query rule definitions in a resource group.
|
|
@@ -96,52 +79,35 @@ export class ScheduledQueryRulesImpl {
|
|
|
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.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
103
86
|
},
|
|
104
87
|
};
|
|
105
88
|
}
|
|
106
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
});
|
|
89
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
90
|
+
let result;
|
|
91
|
+
let continuationToken = settings?.continuationToken;
|
|
92
|
+
if (!continuationToken) {
|
|
93
|
+
result = await this._listByResourceGroup(resourceGroupName, 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._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
101
|
+
continuationToken = result.nextLink;
|
|
102
|
+
let page = result.value || [];
|
|
103
|
+
setContinuationToken(page, continuationToken);
|
|
104
|
+
yield page;
|
|
105
|
+
}
|
|
125
106
|
}
|
|
126
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, 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 *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
108
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
109
|
+
yield* page;
|
|
110
|
+
}
|
|
145
111
|
}
|
|
146
112
|
/**
|
|
147
113
|
* Retrieve a scheduled query rule definitions in a subscription.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduledQueryRules.js","sourceRoot":"","sources":["../../../src/operations/scheduledQueryRules.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,yBAAyB,CAAC;AAsBtD,4CAA4C;AAC5C,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,kBAAkB,CACvB,OAA6D;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F;IACD,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","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 { ScheduledQueryRules } 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 ScheduledQueryRuleResource,\n ScheduledQueryRulesListBySubscriptionNextOptionalParams,\n ScheduledQueryRulesListBySubscriptionOptionalParams,\n ScheduledQueryRulesListBySubscriptionResponse,\n ScheduledQueryRulesListByResourceGroupNextOptionalParams,\n ScheduledQueryRulesListByResourceGroupOptionalParams,\n ScheduledQueryRulesListByResourceGroupResponse,\n ScheduledQueryRulesGetOptionalParams,\n ScheduledQueryRulesGetResponse,\n ScheduledQueryRulesCreateOrUpdateOptionalParams,\n ScheduledQueryRulesCreateOrUpdateResponse,\n ScheduledQueryRuleResourcePatch,\n ScheduledQueryRulesUpdateOptionalParams,\n ScheduledQueryRulesUpdateResponse,\n ScheduledQueryRulesDeleteOptionalParams,\n ScheduledQueryRulesListBySubscriptionNextResponse,\n ScheduledQueryRulesListByResourceGroupNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ScheduledQueryRules operations. */\nexport class ScheduledQueryRulesImpl implements ScheduledQueryRules {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class ScheduledQueryRules class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Retrieve a scheduled query rule definitions in a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: ScheduledQueryRulesListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<ScheduledQueryRuleResource> {\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?: ScheduledQueryRulesListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ScheduledQueryRuleResource[]> {\n let result: ScheduledQueryRulesListBySubscriptionResponse;\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?: ScheduledQueryRulesListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<ScheduledQueryRuleResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieve scheduled query 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?: ScheduledQueryRulesListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<ScheduledQueryRuleResource> {\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?: ScheduledQueryRulesListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ScheduledQueryRuleResource[]> {\n let result: ScheduledQueryRulesListByResourceGroupResponse;\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?: ScheduledQueryRulesListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<ScheduledQueryRuleResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieve a scheduled query rule definitions in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: ScheduledQueryRulesListBySubscriptionOptionalParams,\n ): Promise<ScheduledQueryRulesListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * Retrieve scheduled query 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?: ScheduledQueryRulesListByResourceGroupOptionalParams,\n ): Promise<ScheduledQueryRulesListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Retrieve an scheduled query 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?: ScheduledQueryRulesGetOptionalParams,\n ): Promise<ScheduledQueryRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates a scheduled query 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: ScheduledQueryRuleResource,\n options?: ScheduledQueryRulesCreateOrUpdateOptionalParams,\n ): Promise<ScheduledQueryRulesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Update a scheduled query 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 update.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n ruleName: string,\n parameters: ScheduledQueryRuleResourcePatch,\n options?: ScheduledQueryRulesUpdateOptionalParams,\n ): Promise<ScheduledQueryRulesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Deletes a scheduled query 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?: ScheduledQueryRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n deleteOperationSpec,\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?: ScheduledQueryRulesListBySubscriptionNextOptionalParams,\n ): Promise<ScheduledQueryRulesListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\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?: ScheduledQueryRulesListByResourceGroupNextOptionalParams,\n ): Promise<ScheduledQueryRulesListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\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/scheduledQueryRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResource,\n },\n 201: {\n bodyMapper: Mappers.ScheduledQueryRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n requestBody: Parameters.parameters6,\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules/{ruleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [Parameters.apiVersion10],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\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.ScheduledQueryRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"scheduledQueryRules.js","sourceRoot":"","sources":["../../../src/operations/scheduledQueryRules.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,yBAAyB,CAAC;AAsBtD,4CAA4C;AAC5C,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IACjB,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;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ACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;IAC1C,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,mCAAmC,GAA6B;IACpE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;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;AACF,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,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","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 { ScheduledQueryRules } 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 ScheduledQueryRuleResource,\n ScheduledQueryRulesListBySubscriptionNextOptionalParams,\n ScheduledQueryRulesListBySubscriptionOptionalParams,\n ScheduledQueryRulesListBySubscriptionResponse,\n ScheduledQueryRulesListByResourceGroupNextOptionalParams,\n ScheduledQueryRulesListByResourceGroupOptionalParams,\n ScheduledQueryRulesListByResourceGroupResponse,\n ScheduledQueryRulesGetOptionalParams,\n ScheduledQueryRulesGetResponse,\n ScheduledQueryRulesCreateOrUpdateOptionalParams,\n ScheduledQueryRulesCreateOrUpdateResponse,\n ScheduledQueryRuleResourcePatch,\n ScheduledQueryRulesUpdateOptionalParams,\n ScheduledQueryRulesUpdateResponse,\n ScheduledQueryRulesDeleteOptionalParams,\n ScheduledQueryRulesListBySubscriptionNextResponse,\n ScheduledQueryRulesListByResourceGroupNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ScheduledQueryRules operations. */\nexport class ScheduledQueryRulesImpl implements ScheduledQueryRules {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class ScheduledQueryRules class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Retrieve a scheduled query rule definitions in a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: ScheduledQueryRulesListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<ScheduledQueryRuleResource> {\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?: ScheduledQueryRulesListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ScheduledQueryRuleResource[]> {\n let result: ScheduledQueryRulesListBySubscriptionResponse;\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?: ScheduledQueryRulesListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<ScheduledQueryRuleResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieve scheduled query 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?: ScheduledQueryRulesListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<ScheduledQueryRuleResource> {\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?: ScheduledQueryRulesListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ScheduledQueryRuleResource[]> {\n let result: ScheduledQueryRulesListByResourceGroupResponse;\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?: ScheduledQueryRulesListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<ScheduledQueryRuleResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieve a scheduled query rule definitions in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: ScheduledQueryRulesListBySubscriptionOptionalParams,\n ): Promise<ScheduledQueryRulesListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * Retrieve scheduled query 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?: ScheduledQueryRulesListByResourceGroupOptionalParams,\n ): Promise<ScheduledQueryRulesListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Retrieve an scheduled query 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?: ScheduledQueryRulesGetOptionalParams,\n ): Promise<ScheduledQueryRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates or updates a scheduled query 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: ScheduledQueryRuleResource,\n options?: ScheduledQueryRulesCreateOrUpdateOptionalParams,\n ): Promise<ScheduledQueryRulesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Update a scheduled query 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 update.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n ruleName: string,\n parameters: ScheduledQueryRuleResourcePatch,\n options?: ScheduledQueryRulesUpdateOptionalParams,\n ): Promise<ScheduledQueryRulesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Deletes a scheduled query 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?: ScheduledQueryRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n deleteOperationSpec,\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?: ScheduledQueryRulesListBySubscriptionNextOptionalParams,\n ): Promise<ScheduledQueryRulesListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\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?: ScheduledQueryRulesListByResourceGroupNextOptionalParams,\n ): Promise<ScheduledQueryRulesListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\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/scheduledQueryRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResource,\n },\n 201: {\n bodyMapper: Mappers.ScheduledQueryRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n requestBody: Parameters.parameters6,\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules/{ruleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion10],\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/scheduledQueryRules/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n queryParameters: [Parameters.apiVersion10],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\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.ScheduledQueryRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ScheduledQueryRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorContract,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\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 TenantActionGroups operations. */
|
|
14
13
|
export class TenantActionGroupsImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class TenantActionGroups class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -35,39 +35,22 @@ export class TenantActionGroupsImpl {
|
|
|
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.listByManagementGroupIdPagingPage(managementGroupId, xMsClientTenantId, options, settings);
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
listByManagementGroupIdPagingPage(managementGroupId, xMsClientTenantId, options, _settings) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
yield yield __await(result.value || []);
|
|
50
|
-
});
|
|
45
|
+
async *listByManagementGroupIdPagingPage(managementGroupId, xMsClientTenantId, options, _settings) {
|
|
46
|
+
let result;
|
|
47
|
+
result = await this._listByManagementGroupId(managementGroupId, xMsClientTenantId, options);
|
|
48
|
+
yield result.value || [];
|
|
51
49
|
}
|
|
52
|
-
listByManagementGroupIdPagingAll(managementGroupId, xMsClientTenantId, options) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
for (var _d = true, _e = __asyncValues(this.listByManagementGroupIdPagingPage(managementGroupId, xMsClientTenantId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
57
|
-
_c = _f.value;
|
|
58
|
-
_d = false;
|
|
59
|
-
const page = _c;
|
|
60
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
64
|
-
finally {
|
|
65
|
-
try {
|
|
66
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
67
|
-
}
|
|
68
|
-
finally { if (e_1) throw e_1.error; }
|
|
69
|
-
}
|
|
70
|
-
});
|
|
50
|
+
async *listByManagementGroupIdPagingAll(managementGroupId, xMsClientTenantId, options) {
|
|
51
|
+
for await (const page of this.listByManagementGroupIdPagingPage(managementGroupId, xMsClientTenantId, options)) {
|
|
52
|
+
yield* page;
|
|
53
|
+
}
|
|
71
54
|
}
|
|
72
55
|
/**
|
|
73
56
|
* Create a new tenant action group or update an existing one.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenantActionGroups.js","sourceRoot":"","sources":["../../../src/operations/tenantActionGroups.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,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;CACX,CAAC;AACF,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,sHAAsH;IAC5H,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;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,iBAAiB,CAAC;IAC/D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,iBAAiB,CAAC;IACnE,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 { TenantActionGroups } 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 TenantActionGroupResource,\n TenantActionGroupsListByManagementGroupIdOptionalParams,\n TenantActionGroupsListByManagementGroupIdResponse,\n TenantActionGroupsCreateOrUpdateOptionalParams,\n TenantActionGroupsCreateOrUpdateResponse,\n TenantActionGroupsGetOptionalParams,\n TenantActionGroupsGetResponse,\n TenantActionGroupsDeleteOptionalParams,\n ActionGroupPatchBodyAutoGenerated,\n TenantActionGroupsUpdateOptionalParams,\n TenantActionGroupsUpdateResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing TenantActionGroups operations. */\nexport class TenantActionGroupsImpl implements TenantActionGroups {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class TenantActionGroups class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Get a list of all tenant action groups in a management group.\n * @param managementGroupId The management group id.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param options The options parameters.\n */\n public listByManagementGroupId(\n managementGroupId: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsListByManagementGroupIdOptionalParams,\n ): PagedAsyncIterableIterator<TenantActionGroupResource> {\n const iter = this.listByManagementGroupIdPagingAll(\n managementGroupId,\n xMsClientTenantId,\n options,\n );\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.listByManagementGroupIdPagingPage(\n managementGroupId,\n xMsClientTenantId,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByManagementGroupIdPagingPage(\n managementGroupId: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsListByManagementGroupIdOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<TenantActionGroupResource[]> {\n let result: TenantActionGroupsListByManagementGroupIdResponse;\n result = await this._listByManagementGroupId(\n managementGroupId,\n xMsClientTenantId,\n options,\n );\n yield result.value || [];\n }\n\n private async *listByManagementGroupIdPagingAll(\n managementGroupId: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsListByManagementGroupIdOptionalParams,\n ): AsyncIterableIterator<TenantActionGroupResource> {\n for await (const page of this.listByManagementGroupIdPagingPage(\n managementGroupId,\n xMsClientTenantId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Create a new tenant action group or update an existing one.\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param actionGroup The tenant action group to create or use for the update.\n * @param options The options parameters.\n */\n createOrUpdate(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n actionGroup: TenantActionGroupResource,\n options?: TenantActionGroupsCreateOrUpdateOptionalParams,\n ): Promise<TenantActionGroupsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n actionGroup,\n options,\n },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Get a tenant action group.\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsGetOptionalParams,\n ): Promise<TenantActionGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, tenantActionGroupName, xMsClientTenantId, options },\n getOperationSpec,\n );\n }\n\n /**\n * Delete a tenant action group.\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param options The options parameters.\n */\n delete(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { managementGroupId, tenantActionGroupName, xMsClientTenantId, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate\n * method.\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param tenantActionGroupPatch Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n tenantActionGroupPatch: ActionGroupPatchBodyAutoGenerated,\n options?: TenantActionGroupsUpdateOptionalParams,\n ): Promise<TenantActionGroupsUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n tenantActionGroupPatch,\n options,\n },\n updateOperationSpec,\n );\n }\n\n /**\n * Get a list of all tenant action groups in a management group.\n * @param managementGroupId The management group id.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param options The options parameters.\n */\n private _listByManagementGroupId(\n managementGroupId: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsListByManagementGroupIdOptionalParams,\n ): Promise<TenantActionGroupsListByManagementGroupIdResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, xMsClientTenantId, options },\n listByManagementGroupIdOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.TenantActionGroupResource,\n },\n 201: {\n bodyMapper: Mappers.TenantActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroup1,\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.xMsClientTenantId,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TenantActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.TenantActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.tenantActionGroupPatch,\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.xMsClientTenantId,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst listByManagementGroupIdOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TenantActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [Parameters.$host, Parameters.managementGroupId],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"tenantActionGroups.js","sourceRoot":"","sources":["../../../src/operations/tenantActionGroups.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAA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AAE;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,iBAAiB,CAAC;IAC/D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,iBAAiB,CAAC;IACnE,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 { TenantActionGroups } 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 TenantActionGroupResource,\n TenantActionGroupsListByManagementGroupIdOptionalParams,\n TenantActionGroupsListByManagementGroupIdResponse,\n TenantActionGroupsCreateOrUpdateOptionalParams,\n TenantActionGroupsCreateOrUpdateResponse,\n TenantActionGroupsGetOptionalParams,\n TenantActionGroupsGetResponse,\n TenantActionGroupsDeleteOptionalParams,\n ActionGroupPatchBodyAutoGenerated,\n TenantActionGroupsUpdateOptionalParams,\n TenantActionGroupsUpdateResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing TenantActionGroups operations. */\nexport class TenantActionGroupsImpl implements TenantActionGroups {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class TenantActionGroups class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Get a list of all tenant action groups in a management group.\n * @param managementGroupId The management group id.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param options The options parameters.\n */\n public listByManagementGroupId(\n managementGroupId: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsListByManagementGroupIdOptionalParams,\n ): PagedAsyncIterableIterator<TenantActionGroupResource> {\n const iter = this.listByManagementGroupIdPagingAll(\n managementGroupId,\n xMsClientTenantId,\n options,\n );\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.listByManagementGroupIdPagingPage(\n managementGroupId,\n xMsClientTenantId,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByManagementGroupIdPagingPage(\n managementGroupId: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsListByManagementGroupIdOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<TenantActionGroupResource[]> {\n let result: TenantActionGroupsListByManagementGroupIdResponse;\n result = await this._listByManagementGroupId(\n managementGroupId,\n xMsClientTenantId,\n options,\n );\n yield result.value || [];\n }\n\n private async *listByManagementGroupIdPagingAll(\n managementGroupId: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsListByManagementGroupIdOptionalParams,\n ): AsyncIterableIterator<TenantActionGroupResource> {\n for await (const page of this.listByManagementGroupIdPagingPage(\n managementGroupId,\n xMsClientTenantId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Create a new tenant action group or update an existing one.\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param actionGroup The tenant action group to create or use for the update.\n * @param options The options parameters.\n */\n createOrUpdate(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n actionGroup: TenantActionGroupResource,\n options?: TenantActionGroupsCreateOrUpdateOptionalParams,\n ): Promise<TenantActionGroupsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n actionGroup,\n options,\n },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Get a tenant action group.\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsGetOptionalParams,\n ): Promise<TenantActionGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, tenantActionGroupName, xMsClientTenantId, options },\n getOperationSpec,\n );\n }\n\n /**\n * Delete a tenant action group.\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param options The options parameters.\n */\n delete(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { managementGroupId, tenantActionGroupName, xMsClientTenantId, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Updates an existing tenant action group's tags. To update other fields use the CreateOrUpdate\n * method.\n * @param managementGroupId The management group id.\n * @param tenantActionGroupName The name of the action group.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param tenantActionGroupPatch Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n tenantActionGroupPatch: ActionGroupPatchBodyAutoGenerated,\n options?: TenantActionGroupsUpdateOptionalParams,\n ): Promise<TenantActionGroupsUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n tenantActionGroupPatch,\n options,\n },\n updateOperationSpec,\n );\n }\n\n /**\n * Get a list of all tenant action groups in a management group.\n * @param managementGroupId The management group id.\n * @param xMsClientTenantId The tenant ID of the client making the request.\n * @param options The options parameters.\n */\n private _listByManagementGroupId(\n managementGroupId: string,\n xMsClientTenantId: string,\n options?: TenantActionGroupsListByManagementGroupIdOptionalParams,\n ): Promise<TenantActionGroupsListByManagementGroupIdResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, xMsClientTenantId, options },\n listByManagementGroupIdOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.TenantActionGroupResource,\n },\n 201: {\n bodyMapper: Mappers.TenantActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroup1,\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.xMsClientTenantId,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TenantActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.TenantActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.tenantActionGroupPatch,\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.xMsClientTenantId,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst listByManagementGroupIdOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TenantActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [Parameters.$host, Parameters.managementGroupId],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\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 TenantActivityLogs operations. */
|
|
15
14
|
export class TenantActivityLogsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class TenantActivityLogs class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -37,52 +37,35 @@ export class TenantActivityLogsImpl {
|
|
|
37
37
|
return this;
|
|
38
38
|
},
|
|
39
39
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
40
|
+
if (settings?.maxPageSize) {
|
|
41
41
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
42
|
}
|
|
43
43
|
return this.listPagingPage(options, settings);
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
listPagingPage(options, settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
47
|
+
async *listPagingPage(options, settings) {
|
|
48
|
+
let result;
|
|
49
|
+
let continuationToken = settings?.continuationToken;
|
|
50
|
+
if (!continuationToken) {
|
|
51
|
+
result = await this._list(options);
|
|
52
|
+
let page = result.value || [];
|
|
53
|
+
continuationToken = result.nextLink;
|
|
54
|
+
setContinuationToken(page, continuationToken);
|
|
55
|
+
yield page;
|
|
56
|
+
}
|
|
57
|
+
while (continuationToken) {
|
|
58
|
+
result = await this._listNext(continuationToken, options);
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
let page = result.value || [];
|
|
61
|
+
setContinuationToken(page, continuationToken);
|
|
62
|
+
yield page;
|
|
63
|
+
}
|
|
66
64
|
}
|
|
67
|
-
listPagingAll(options) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
72
|
-
_c = _f.value;
|
|
73
|
-
_d = false;
|
|
74
|
-
const page = _c;
|
|
75
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
79
|
-
finally {
|
|
80
|
-
try {
|
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
82
|
-
}
|
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
|
84
|
-
}
|
|
85
|
-
});
|
|
65
|
+
async *listPagingAll(options) {
|
|
66
|
+
for await (const page of this.listPagingPage(options)) {
|
|
67
|
+
yield* page;
|
|
68
|
+
}
|
|
86
69
|
}
|
|
87
70
|
/**
|
|
88
71
|
* Gets the Activity Logs for the Tenant.<br>Everything that is applicable to the API to get the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenantActivityLogs.js","sourceRoot":"","sources":["../../../src/operations/tenantActivityLogs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"tenantActivityLogs.js","sourceRoot":"","sources":["../../../src/operations/tenantActivityLogs.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,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAChB,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,IAAI,CACT,OAA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;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { TenantActivityLogs } 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 EventData,\n TenantActivityLogsListNextOptionalParams,\n TenantActivityLogsListOptionalParams,\n TenantActivityLogsListResponse,\n TenantActivityLogsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing TenantActivityLogs operations. */\nexport class TenantActivityLogsImpl implements TenantActivityLogs {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class TenantActivityLogs class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Gets the Activity Logs for the Tenant.<br>Everything that is applicable to the API to get the\n * Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).<br>One\n * thing to point out here is that this API does *not* retrieve the logs at the individual subscription\n * of the tenant but only surfaces the logs that were generated at the tenant level.\n * @param options The options parameters.\n */\n public list(\n options?: TenantActivityLogsListOptionalParams,\n ): PagedAsyncIterableIterator<EventData> {\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?: TenantActivityLogsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<EventData[]> {\n let result: TenantActivityLogsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: TenantActivityLogsListOptionalParams,\n ): AsyncIterableIterator<EventData> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the Activity Logs for the Tenant.<br>Everything that is applicable to the API to get the\n * Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).<br>One\n * thing to point out here is that this API does *not* retrieve the logs at the individual subscription\n * of the tenant but only surfaces the logs that were generated at the tenant level.\n * @param options The options parameters.\n */\n private _list(\n options?: TenantActivityLogsListOptionalParams,\n ): Promise<TenantActivityLogsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: TenantActivityLogsListNextOptionalParams,\n ): Promise<TenantActivityLogsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Insights/eventtypes/management/values\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventDataCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.filter,\n Parameters.apiVersion3,\n Parameters.select,\n ],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventDataCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\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 VMInsights operations. */
|
|
12
12
|
export class VMInsightsImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class VMInsights class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vMInsights.js","sourceRoot":"","sources":["../../../src/operations/vMInsights.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;AAOtD,8CAA8C;AAC9C,MAAM,OAAO,cAAc;
|
|
1
|
+
{"version":3,"file":"vMInsights.js","sourceRoot":"","sources":["../../../src/operations/vMInsights.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;AAOtD,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,mBAAmB,CACjB,WAAmB,EACnB,OAAqD;QAErD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,gCAAgC,CACjC,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,kFAAkF;IACxF,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,iBAAiB;SACtC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;IAC1C,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 { VMInsights } 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 VMInsightsGetOnboardingStatusOptionalParams,\n VMInsightsGetOnboardingStatusResponse,\n} from \"../models/index.js\";\n\n/** Class containing VMInsights operations. */\nexport class VMInsightsImpl implements VMInsights {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class VMInsights class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the VM Insights onboarding status for the specified resource or resource scope.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource, or scope,\n * whose status to retrieve.\n * @param options The options parameters.\n */\n getOnboardingStatus(\n resourceUri: string,\n options?: VMInsightsGetOnboardingStatusOptionalParams,\n ): Promise<VMInsightsGetOnboardingStatusResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n getOnboardingStatusOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOnboardingStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VMInsightsOnboardingStatus,\n },\n default: {\n bodyMapper: Mappers.ResponseWithError,\n },\n },\n queryParameters: [Parameters.apiVersion11],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
|
|
|
14
14
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
15
15
|
*/
|
|
16
16
|
export function getContinuationToken(page) {
|
|
17
|
-
var _a;
|
|
18
17
|
if (typeof page !== "object" || page === null) {
|
|
19
18
|
return undefined;
|
|
20
19
|
}
|
|
21
|
-
return
|
|
20
|
+
return pageMap.get(page)?.continuationToken;
|
|
22
21
|
}
|
|
23
22
|
export function setContinuationToken(page, continuationToken) {
|
|
24
|
-
var _a;
|
|
25
23
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
24
|
return;
|
|
27
25
|
}
|
|
28
|
-
const pageInfo =
|
|
26
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
29
27
|
pageInfo.continuationToken = continuationToken;
|
|
30
28
|
pageMap.set(page, pageInfo);
|
|
31
29
|
}
|