@azure/arm-monitor 8.0.0-alpha.20250618.1 → 8.0.0-alpha.20250718.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +449 -195
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/monitorClient.js +55 -11
- package/dist/browser/monitorClient.js.map +1 -1
- package/dist/browser/operations/actionGroups.js +30 -59
- package/dist/browser/operations/actionGroups.js.map +1 -1
- package/dist/browser/operations/activityLogAlerts.js +45 -79
- package/dist/browser/operations/activityLogAlerts.js.map +1 -1
- package/dist/browser/operations/activityLogs.js +23 -40
- package/dist/browser/operations/activityLogs.js.map +1 -1
- package/dist/browser/operations/alertRuleIncidents.js +10 -27
- package/dist/browser/operations/alertRuleIncidents.js.map +1 -1
- package/dist/browser/operations/alertRules.js +19 -53
- package/dist/browser/operations/alertRules.js.map +1 -1
- package/dist/browser/operations/autoscaleSettings.js +45 -79
- package/dist/browser/operations/autoscaleSettings.js.map +1 -1
- package/dist/browser/operations/azureMonitorWorkspaces.js +56 -85
- package/dist/browser/operations/azureMonitorWorkspaces.js.map +1 -1
- package/dist/browser/operations/baselines.js +10 -27
- package/dist/browser/operations/baselines.js.map +1 -1
- package/dist/browser/operations/dataCollectionEndpoints.js +45 -79
- package/dist/browser/operations/dataCollectionEndpoints.js.map +1 -1
- package/dist/browser/operations/dataCollectionRuleAssociations.js +67 -118
- package/dist/browser/operations/dataCollectionRuleAssociations.js.map +1 -1
- package/dist/browser/operations/dataCollectionRules.js +45 -79
- package/dist/browser/operations/dataCollectionRules.js.map +1 -1
- package/dist/browser/operations/diagnosticSettings.js +10 -27
- package/dist/browser/operations/diagnosticSettings.js.map +1 -1
- package/dist/browser/operations/diagnosticSettingsCategory.js +10 -27
- package/dist/browser/operations/diagnosticSettingsCategory.js.map +1 -1
- package/dist/browser/operations/eventCategories.js +10 -27
- package/dist/browser/operations/eventCategories.js.map +1 -1
- package/dist/browser/operations/logProfiles.js +10 -27
- package/dist/browser/operations/logProfiles.js.map +1 -1
- package/dist/browser/operations/metricAlerts.js +19 -53
- package/dist/browser/operations/metricAlerts.js.map +1 -1
- package/dist/browser/operations/metricAlertsStatus.js +1 -0
- package/dist/browser/operations/metricAlertsStatus.js.map +1 -1
- package/dist/browser/operations/metricDefinitions.js +19 -53
- package/dist/browser/operations/metricDefinitions.js.map +1 -1
- package/dist/browser/operations/metricNamespaces.js +10 -27
- package/dist/browser/operations/metricNamespaces.js.map +1 -1
- package/dist/browser/operations/metricsOperations.js +1 -0
- package/dist/browser/operations/metricsOperations.js.map +1 -1
- package/dist/browser/operations/monitorOperations.js +23 -40
- package/dist/browser/operations/monitorOperations.js.map +1 -1
- package/dist/browser/operations/operations.js +1 -0
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/predictiveMetric.js +1 -0
- package/dist/browser/operations/predictiveMetric.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +23 -12
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +1 -0
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/privateLinkScopeOperationStatus.js +1 -0
- package/dist/browser/operations/privateLinkScopeOperationStatus.js.map +1 -1
- package/dist/browser/operations/privateLinkScopedResources.js +45 -52
- package/dist/browser/operations/privateLinkScopedResources.js.map +1 -1
- package/dist/browser/operations/privateLinkScopes.js +56 -85
- package/dist/browser/operations/privateLinkScopes.js.map +1 -1
- package/dist/browser/operations/scheduledQueryRules.js +45 -79
- package/dist/browser/operations/scheduledQueryRules.js.map +1 -1
- package/dist/browser/operations/tenantActionGroups.js +10 -27
- package/dist/browser/operations/tenantActionGroups.js.map +1 -1
- package/dist/browser/operations/tenantActivityLogs.js +23 -40
- package/dist/browser/operations/tenantActivityLogs.js.map +1 -1
- package/dist/browser/operations/vMInsights.js +1 -0
- package/dist/browser/operations/vMInsights.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +449 -195
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/monitorClient.js +55 -11
- package/dist/commonjs/monitorClient.js.map +1 -1
- package/dist/commonjs/operations/actionGroups.js +30 -58
- package/dist/commonjs/operations/actionGroups.js.map +1 -1
- package/dist/commonjs/operations/activityLogAlerts.js +45 -78
- package/dist/commonjs/operations/activityLogAlerts.js.map +1 -1
- package/dist/commonjs/operations/activityLogs.js +23 -39
- package/dist/commonjs/operations/activityLogs.js.map +1 -1
- package/dist/commonjs/operations/alertRuleIncidents.js +10 -26
- package/dist/commonjs/operations/alertRuleIncidents.js.map +1 -1
- package/dist/commonjs/operations/alertRules.js +19 -52
- package/dist/commonjs/operations/alertRules.js.map +1 -1
- package/dist/commonjs/operations/autoscaleSettings.js +45 -78
- package/dist/commonjs/operations/autoscaleSettings.js.map +1 -1
- package/dist/commonjs/operations/azureMonitorWorkspaces.js +56 -84
- package/dist/commonjs/operations/azureMonitorWorkspaces.js.map +1 -1
- package/dist/commonjs/operations/baselines.js +10 -26
- package/dist/commonjs/operations/baselines.js.map +1 -1
- package/dist/commonjs/operations/dataCollectionEndpoints.js +45 -78
- package/dist/commonjs/operations/dataCollectionEndpoints.js.map +1 -1
- package/dist/commonjs/operations/dataCollectionRuleAssociations.js +67 -117
- package/dist/commonjs/operations/dataCollectionRuleAssociations.js.map +1 -1
- package/dist/commonjs/operations/dataCollectionRules.js +45 -78
- package/dist/commonjs/operations/dataCollectionRules.js.map +1 -1
- package/dist/commonjs/operations/diagnosticSettings.js +10 -26
- package/dist/commonjs/operations/diagnosticSettings.js.map +1 -1
- package/dist/commonjs/operations/diagnosticSettingsCategory.js +10 -26
- package/dist/commonjs/operations/diagnosticSettingsCategory.js.map +1 -1
- package/dist/commonjs/operations/eventCategories.js +10 -26
- package/dist/commonjs/operations/eventCategories.js.map +1 -1
- package/dist/commonjs/operations/logProfiles.js +10 -26
- package/dist/commonjs/operations/logProfiles.js.map +1 -1
- package/dist/commonjs/operations/metricAlerts.js +19 -52
- package/dist/commonjs/operations/metricAlerts.js.map +1 -1
- package/dist/commonjs/operations/metricAlertsStatus.js +1 -0
- package/dist/commonjs/operations/metricAlertsStatus.js.map +1 -1
- package/dist/commonjs/operations/metricDefinitions.js +19 -52
- package/dist/commonjs/operations/metricDefinitions.js.map +1 -1
- package/dist/commonjs/operations/metricNamespaces.js +10 -26
- package/dist/commonjs/operations/metricNamespaces.js.map +1 -1
- package/dist/commonjs/operations/metricsOperations.js +1 -0
- package/dist/commonjs/operations/metricsOperations.js.map +1 -1
- package/dist/commonjs/operations/monitorOperations.js +23 -39
- package/dist/commonjs/operations/monitorOperations.js.map +1 -1
- package/dist/commonjs/operations/operations.js +1 -0
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/predictiveMetric.js +1 -0
- package/dist/commonjs/operations/predictiveMetric.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +23 -12
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +1 -0
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/privateLinkScopeOperationStatus.js +1 -0
- package/dist/commonjs/operations/privateLinkScopeOperationStatus.js.map +1 -1
- package/dist/commonjs/operations/privateLinkScopedResources.js +45 -51
- package/dist/commonjs/operations/privateLinkScopedResources.js.map +1 -1
- package/dist/commonjs/operations/privateLinkScopes.js +56 -84
- package/dist/commonjs/operations/privateLinkScopes.js.map +1 -1
- package/dist/commonjs/operations/scheduledQueryRules.js +45 -78
- package/dist/commonjs/operations/scheduledQueryRules.js.map +1 -1
- package/dist/commonjs/operations/tenantActionGroups.js +10 -26
- package/dist/commonjs/operations/tenantActionGroups.js.map +1 -1
- package/dist/commonjs/operations/tenantActivityLogs.js +23 -39
- package/dist/commonjs/operations/tenantActivityLogs.js.map +1 -1
- package/dist/commonjs/operations/vMInsights.js +1 -0
- package/dist/commonjs/operations/vMInsights.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +449 -195
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/monitorClient.js +55 -11
- package/dist/esm/monitorClient.js.map +1 -1
- package/dist/esm/operations/actionGroups.js +30 -59
- package/dist/esm/operations/actionGroups.js.map +1 -1
- package/dist/esm/operations/activityLogAlerts.js +45 -79
- package/dist/esm/operations/activityLogAlerts.js.map +1 -1
- package/dist/esm/operations/activityLogs.js +23 -40
- package/dist/esm/operations/activityLogs.js.map +1 -1
- package/dist/esm/operations/alertRuleIncidents.js +10 -27
- package/dist/esm/operations/alertRuleIncidents.js.map +1 -1
- package/dist/esm/operations/alertRules.js +19 -53
- package/dist/esm/operations/alertRules.js.map +1 -1
- package/dist/esm/operations/autoscaleSettings.js +45 -79
- package/dist/esm/operations/autoscaleSettings.js.map +1 -1
- package/dist/esm/operations/azureMonitorWorkspaces.js +56 -85
- package/dist/esm/operations/azureMonitorWorkspaces.js.map +1 -1
- package/dist/esm/operations/baselines.js +10 -27
- package/dist/esm/operations/baselines.js.map +1 -1
- package/dist/esm/operations/dataCollectionEndpoints.js +45 -79
- package/dist/esm/operations/dataCollectionEndpoints.js.map +1 -1
- package/dist/esm/operations/dataCollectionRuleAssociations.js +67 -118
- package/dist/esm/operations/dataCollectionRuleAssociations.js.map +1 -1
- package/dist/esm/operations/dataCollectionRules.js +45 -79
- package/dist/esm/operations/dataCollectionRules.js.map +1 -1
- package/dist/esm/operations/diagnosticSettings.js +10 -27
- package/dist/esm/operations/diagnosticSettings.js.map +1 -1
- package/dist/esm/operations/diagnosticSettingsCategory.js +10 -27
- package/dist/esm/operations/diagnosticSettingsCategory.js.map +1 -1
- package/dist/esm/operations/eventCategories.js +10 -27
- package/dist/esm/operations/eventCategories.js.map +1 -1
- package/dist/esm/operations/logProfiles.js +10 -27
- package/dist/esm/operations/logProfiles.js.map +1 -1
- package/dist/esm/operations/metricAlerts.js +19 -53
- package/dist/esm/operations/metricAlerts.js.map +1 -1
- package/dist/esm/operations/metricAlertsStatus.js +1 -0
- package/dist/esm/operations/metricAlertsStatus.js.map +1 -1
- package/dist/esm/operations/metricDefinitions.js +19 -53
- package/dist/esm/operations/metricDefinitions.js.map +1 -1
- package/dist/esm/operations/metricNamespaces.js +10 -27
- package/dist/esm/operations/metricNamespaces.js.map +1 -1
- package/dist/esm/operations/metricsOperations.js +1 -0
- package/dist/esm/operations/metricsOperations.js.map +1 -1
- package/dist/esm/operations/monitorOperations.js +23 -40
- package/dist/esm/operations/monitorOperations.js.map +1 -1
- package/dist/esm/operations/operations.js +1 -0
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/predictiveMetric.js +1 -0
- package/dist/esm/operations/predictiveMetric.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +23 -12
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +1 -0
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/privateLinkScopeOperationStatus.js +1 -0
- package/dist/esm/operations/privateLinkScopeOperationStatus.js.map +1 -1
- package/dist/esm/operations/privateLinkScopedResources.js +45 -52
- package/dist/esm/operations/privateLinkScopedResources.js.map +1 -1
- package/dist/esm/operations/privateLinkScopes.js +56 -85
- package/dist/esm/operations/privateLinkScopes.js.map +1 -1
- package/dist/esm/operations/scheduledQueryRules.js +45 -79
- package/dist/esm/operations/scheduledQueryRules.js.map +1 -1
- package/dist/esm/operations/tenantActionGroups.js +10 -27
- package/dist/esm/operations/tenantActionGroups.js.map +1 -1
- package/dist/esm/operations/tenantActivityLogs.js +23 -40
- package/dist/esm/operations/tenantActivityLogs.js.map +1 -1
- package/dist/esm/operations/vMInsights.js +1 -0
- package/dist/esm/operations/vMInsights.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +449 -195
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/monitorClient.js +55 -11
- package/dist/react-native/monitorClient.js.map +1 -1
- package/dist/react-native/operations/actionGroups.js +30 -59
- package/dist/react-native/operations/actionGroups.js.map +1 -1
- package/dist/react-native/operations/activityLogAlerts.js +45 -79
- package/dist/react-native/operations/activityLogAlerts.js.map +1 -1
- package/dist/react-native/operations/activityLogs.js +23 -40
- package/dist/react-native/operations/activityLogs.js.map +1 -1
- package/dist/react-native/operations/alertRuleIncidents.js +10 -27
- package/dist/react-native/operations/alertRuleIncidents.js.map +1 -1
- package/dist/react-native/operations/alertRules.js +19 -53
- package/dist/react-native/operations/alertRules.js.map +1 -1
- package/dist/react-native/operations/autoscaleSettings.js +45 -79
- package/dist/react-native/operations/autoscaleSettings.js.map +1 -1
- package/dist/react-native/operations/azureMonitorWorkspaces.js +56 -85
- package/dist/react-native/operations/azureMonitorWorkspaces.js.map +1 -1
- package/dist/react-native/operations/baselines.js +10 -27
- package/dist/react-native/operations/baselines.js.map +1 -1
- package/dist/react-native/operations/dataCollectionEndpoints.js +45 -79
- package/dist/react-native/operations/dataCollectionEndpoints.js.map +1 -1
- package/dist/react-native/operations/dataCollectionRuleAssociations.js +67 -118
- package/dist/react-native/operations/dataCollectionRuleAssociations.js.map +1 -1
- package/dist/react-native/operations/dataCollectionRules.js +45 -79
- package/dist/react-native/operations/dataCollectionRules.js.map +1 -1
- package/dist/react-native/operations/diagnosticSettings.js +10 -27
- package/dist/react-native/operations/diagnosticSettings.js.map +1 -1
- package/dist/react-native/operations/diagnosticSettingsCategory.js +10 -27
- package/dist/react-native/operations/diagnosticSettingsCategory.js.map +1 -1
- package/dist/react-native/operations/eventCategories.js +10 -27
- package/dist/react-native/operations/eventCategories.js.map +1 -1
- package/dist/react-native/operations/logProfiles.js +10 -27
- package/dist/react-native/operations/logProfiles.js.map +1 -1
- package/dist/react-native/operations/metricAlerts.js +19 -53
- package/dist/react-native/operations/metricAlerts.js.map +1 -1
- package/dist/react-native/operations/metricAlertsStatus.js +1 -0
- package/dist/react-native/operations/metricAlertsStatus.js.map +1 -1
- package/dist/react-native/operations/metricDefinitions.js +19 -53
- package/dist/react-native/operations/metricDefinitions.js.map +1 -1
- package/dist/react-native/operations/metricNamespaces.js +10 -27
- package/dist/react-native/operations/metricNamespaces.js.map +1 -1
- package/dist/react-native/operations/metricsOperations.js +1 -0
- package/dist/react-native/operations/metricsOperations.js.map +1 -1
- package/dist/react-native/operations/monitorOperations.js +23 -40
- package/dist/react-native/operations/monitorOperations.js.map +1 -1
- package/dist/react-native/operations/operations.js +1 -0
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/predictiveMetric.js +1 -0
- package/dist/react-native/operations/predictiveMetric.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +23 -12
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +1 -0
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/privateLinkScopeOperationStatus.js +1 -0
- package/dist/react-native/operations/privateLinkScopeOperationStatus.js.map +1 -1
- package/dist/react-native/operations/privateLinkScopedResources.js +45 -52
- package/dist/react-native/operations/privateLinkScopedResources.js.map +1 -1
- package/dist/react-native/operations/privateLinkScopes.js +56 -85
- package/dist/react-native/operations/privateLinkScopes.js.map +1 -1
- package/dist/react-native/operations/scheduledQueryRules.js +45 -79
- package/dist/react-native/operations/scheduledQueryRules.js.map +1 -1
- package/dist/react-native/operations/tenantActionGroups.js +10 -27
- package/dist/react-native/operations/tenantActionGroups.js.map +1 -1
- package/dist/react-native/operations/tenantActivityLogs.js +23 -40
- package/dist/react-native/operations/tenantActivityLogs.js.map +1 -1
- package/dist/react-native/operations/vMInsights.js +1 -0
- package/dist/react-native/operations/vMInsights.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-monitor.api.md → arm-monitor-node.api.md} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alertRules.js","sourceRoot":"","sources":["../../../src/operations/alertRules.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAkBtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,iBAAyB,EACzB,OAAqD;QAErD,MAAM,IAAI,GAAG,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC3E,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,6BAA6B,CACvC,iBAAiB,EACjB,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAA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AAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,4GAA4G;IAClH,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,+BAA+B,GAA6B;IAChE,IAAI,EAAE,yEAAyE;IAC/E,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { AlertRules } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n AlertRuleResource,\n AlertRulesListByResourceGroupOptionalParams,\n AlertRulesListByResourceGroupResponse,\n AlertRulesListBySubscriptionOptionalParams,\n AlertRulesListBySubscriptionResponse,\n AlertRulesCreateOrUpdateOptionalParams,\n AlertRulesCreateOrUpdateResponse,\n AlertRulesDeleteOptionalParams,\n AlertRulesGetOptionalParams,\n AlertRulesGetResponse,\n AlertRuleResourcePatch,\n AlertRulesUpdateOptionalParams,\n AlertRulesUpdateResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AlertRules operations. */\nexport class AlertRulesImpl implements AlertRules {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class AlertRules class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * List the classic metric alert rules within a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<AlertRuleResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AlertRuleResource[]> {\n let result: AlertRulesListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<AlertRuleResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List the classic metric alert rules within a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<AlertRuleResource> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: AlertRulesListBySubscriptionOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AlertRuleResource[]> {\n let result: AlertRulesListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<AlertRuleResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Creates or updates a classic metric alert rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param parameters The parameters of the rule to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n ruleName: string,\n parameters: AlertRuleResource,\n options?: AlertRulesCreateOrUpdateOptionalParams,\n ): Promise<AlertRulesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a classic metric alert rule\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n ruleName: string,\n options?: AlertRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets a classic metric alert rule\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n ruleName: string,\n options?: AlertRulesGetOptionalParams,\n ): Promise<AlertRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate\n * method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param alertRulesResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n ruleName: string,\n alertRulesResource: AlertRuleResourcePatch,\n options?: AlertRulesUpdateOptionalParams,\n ): Promise<AlertRulesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, alertRulesResource, options },\n updateOperationSpec,\n );\n }\n\n /**\n * List the classic metric alert rules within a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n ): Promise<AlertRulesListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * List the classic metric alert rules within a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): Promise<AlertRulesListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n 201: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n 201: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.alertRulesResource,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"alertRules.js","sourceRoot":"","sources":["../../../src/operations/alertRules.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAkBtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,iBAAyB,E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,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { AlertRules } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n AlertRuleResource,\n AlertRulesListByResourceGroupOptionalParams,\n AlertRulesListByResourceGroupResponse,\n AlertRulesListBySubscriptionOptionalParams,\n AlertRulesListBySubscriptionResponse,\n AlertRulesCreateOrUpdateOptionalParams,\n AlertRulesCreateOrUpdateResponse,\n AlertRulesDeleteOptionalParams,\n AlertRulesGetOptionalParams,\n AlertRulesGetResponse,\n AlertRuleResourcePatch,\n AlertRulesUpdateOptionalParams,\n AlertRulesUpdateResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AlertRules operations. */\nexport class AlertRulesImpl implements AlertRules {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class AlertRules class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * List the classic metric alert rules within a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<AlertRuleResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AlertRuleResource[]> {\n let result: AlertRulesListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<AlertRuleResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List the classic metric alert rules within a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<AlertRuleResource> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: AlertRulesListBySubscriptionOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<AlertRuleResource[]> {\n let result: AlertRulesListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<AlertRuleResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Creates or updates a classic metric alert rule.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param parameters The parameters of the rule to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n ruleName: string,\n parameters: AlertRuleResource,\n options?: AlertRulesCreateOrUpdateOptionalParams,\n ): Promise<AlertRulesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a classic metric alert rule\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n ruleName: string,\n options?: AlertRulesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets a classic metric alert rule\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n ruleName: string,\n options?: AlertRulesGetOptionalParams,\n ): Promise<AlertRulesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate\n * method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param ruleName The name of the rule.\n * @param alertRulesResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n ruleName: string,\n alertRulesResource: AlertRuleResourcePatch,\n options?: AlertRulesUpdateOptionalParams,\n ): Promise<AlertRulesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, ruleName, alertRulesResource, options },\n updateOperationSpec,\n );\n }\n\n /**\n * List the classic metric alert rules within a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: AlertRulesListByResourceGroupOptionalParams,\n ): Promise<AlertRulesListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * List the classic metric alert rules within a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AlertRulesListBySubscriptionOptionalParams,\n ): Promise<AlertRulesListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n 201: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n 201: {\n bodyMapper: Mappers.AlertRuleResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.alertRulesResource,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.ruleName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlertRuleResourceCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing AutoscaleSettings operations. */
|
|
18
18
|
class AutoscaleSettingsImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class AutoscaleSettings class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -38,52 +39,35 @@ class AutoscaleSettingsImpl {
|
|
|
38
39
|
return this;
|
|
39
40
|
},
|
|
40
41
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
42
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
44
|
}
|
|
44
45
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
45
46
|
},
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
49
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
54
|
+
let page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
67
66
|
}
|
|
68
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
67
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
68
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
87
71
|
}
|
|
88
72
|
/**
|
|
89
73
|
* Lists the autoscale settings for a subscription
|
|
@@ -99,52 +83,35 @@ class AutoscaleSettingsImpl {
|
|
|
99
83
|
return this;
|
|
100
84
|
},
|
|
101
85
|
byPage: (settings) => {
|
|
102
|
-
if (settings
|
|
86
|
+
if (settings?.maxPageSize) {
|
|
103
87
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
104
88
|
}
|
|
105
89
|
return this.listBySubscriptionPagingPage(options, settings);
|
|
106
90
|
},
|
|
107
91
|
};
|
|
108
92
|
}
|
|
109
|
-
listBySubscriptionPagingPage(options, settings) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
});
|
|
93
|
+
async *listBySubscriptionPagingPage(options, settings) {
|
|
94
|
+
let result;
|
|
95
|
+
let continuationToken = settings?.continuationToken;
|
|
96
|
+
if (!continuationToken) {
|
|
97
|
+
result = await this._listBySubscription(options);
|
|
98
|
+
let page = result.value || [];
|
|
99
|
+
continuationToken = result.nextLink;
|
|
100
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
101
|
+
yield page;
|
|
102
|
+
}
|
|
103
|
+
while (continuationToken) {
|
|
104
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
105
|
+
continuationToken = result.nextLink;
|
|
106
|
+
let page = result.value || [];
|
|
107
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
108
|
+
yield page;
|
|
109
|
+
}
|
|
128
110
|
}
|
|
129
|
-
listBySubscriptionPagingAll(options) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
134
|
-
_c = _f.value;
|
|
135
|
-
_d = false;
|
|
136
|
-
const page = _c;
|
|
137
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
141
|
-
finally {
|
|
142
|
-
try {
|
|
143
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
144
|
-
}
|
|
145
|
-
finally { if (e_2) throw e_2.error; }
|
|
146
|
-
}
|
|
147
|
-
});
|
|
111
|
+
async *listBySubscriptionPagingAll(options) {
|
|
112
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
113
|
+
yield* page;
|
|
114
|
+
}
|
|
148
115
|
}
|
|
149
116
|
/**
|
|
150
117
|
* Lists the autoscale settings for a resource group
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoscaleSettings.js","sourceRoot":"","sources":["../../../src/operations/autoscaleSettings.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAsBtD,4CAA4C;AAC5C,qDAAqD;AACrD,MAAa,qBAAqB;IAGhC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,iBAAyB,EACzB,OAA4D;QAE5D,MAAM,IAAI,GAAG,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC3E,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,6BAA6B,CACvC,iBAAiB,EACjB,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,6BAA6B,CAC1C,iBAAyB,EACzB,OAA4D,EAC5D,QAAuB;;YAEvB,IAAI,MAAoD,CAAC;YACzD,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EAAE,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AA6B;IACrE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kCAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,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,kCAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AutoscaleSettings } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n AutoscaleSettingResource,\n AutoscaleSettingsListByResourceGroupNextOptionalParams,\n AutoscaleSettingsListByResourceGroupOptionalParams,\n AutoscaleSettingsListByResourceGroupResponse,\n AutoscaleSettingsListBySubscriptionNextOptionalParams,\n AutoscaleSettingsListBySubscriptionOptionalParams,\n AutoscaleSettingsListBySubscriptionResponse,\n AutoscaleSettingsCreateOrUpdateOptionalParams,\n AutoscaleSettingsCreateOrUpdateResponse,\n AutoscaleSettingsDeleteOptionalParams,\n AutoscaleSettingsGetOptionalParams,\n AutoscaleSettingsGetResponse,\n AutoscaleSettingResourcePatch,\n AutoscaleSettingsUpdateOptionalParams,\n AutoscaleSettingsUpdateResponse,\n AutoscaleSettingsListByResourceGroupNextResponse,\n AutoscaleSettingsListBySubscriptionNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AutoscaleSettings operations. */\nexport class AutoscaleSettingsImpl implements AutoscaleSettings {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class AutoscaleSettings class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the autoscale settings for a resource group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<AutoscaleSettingResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AutoscaleSettingResource[]> {\n let result: AutoscaleSettingsListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByResourceGroupNext(\n resourceGroupName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<AutoscaleSettingResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the autoscale settings for a subscription\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<AutoscaleSettingResource> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AutoscaleSettingResource[]> {\n let result: AutoscaleSettingsListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<AutoscaleSettingResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the autoscale settings for a resource group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): Promise<AutoscaleSettingsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Creates or updates an autoscale setting.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param parameters Parameters supplied to the operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n autoscaleSettingName: string,\n parameters: AutoscaleSettingResource,\n options?: AutoscaleSettingsCreateOrUpdateOptionalParams,\n ): Promise<AutoscaleSettingsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes and autoscale setting\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n autoscaleSettingName: string,\n options?: AutoscaleSettingsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets an autoscale setting\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n autoscaleSettingName: string,\n options?: AutoscaleSettingsGetOptionalParams,\n ): Promise<AutoscaleSettingsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param autoscaleSettingResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n autoscaleSettingName: string,\n autoscaleSettingResource: AutoscaleSettingResourcePatch,\n options?: AutoscaleSettingsUpdateOptionalParams,\n ): Promise<AutoscaleSettingsUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n autoscaleSettingName,\n autoscaleSettingResource,\n options,\n },\n updateOperationSpec,\n );\n }\n\n /**\n * Lists the autoscale settings for a subscription\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): Promise<AutoscaleSettingsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: AutoscaleSettingsListByResourceGroupNextOptionalParams,\n ): Promise<AutoscaleSettingsListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\n );\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: AutoscaleSettingsListBySubscriptionNextOptionalParams,\n ): Promise<AutoscaleSettingsListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n 201: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n requestBody: Parameters.autoscaleSettingResource,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"autoscaleSettings.js","sourceRoot":"","sources":["../../../src/operations/autoscaleSettings.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAsBtD,4CAA4C;AAC5C,qDAAqD;AACrD,MAAa,qBAAqB;IACf,MAAM,CAAgB;IAEvC;;;OAGG;IACH,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CACxB,iBAAyB,EACzB,OAA4D;QAE5D,MAAM,IAAI,GAAG,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC3E,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,6BAA6B,CACvC,iBAAiB,EACjB,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,6BAA6B,CAC1C,iBAAyB,EACzB,OAA4D,EAC5D,QAAuB;QAEvB,IAAI,MAAoD,CAAC;QACzD,IAAI,iBAA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B;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,kCAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AutoscaleSettings } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MonitorClient } from \"../monitorClient.js\";\nimport {\n AutoscaleSettingResource,\n AutoscaleSettingsListByResourceGroupNextOptionalParams,\n AutoscaleSettingsListByResourceGroupOptionalParams,\n AutoscaleSettingsListByResourceGroupResponse,\n AutoscaleSettingsListBySubscriptionNextOptionalParams,\n AutoscaleSettingsListBySubscriptionOptionalParams,\n AutoscaleSettingsListBySubscriptionResponse,\n AutoscaleSettingsCreateOrUpdateOptionalParams,\n AutoscaleSettingsCreateOrUpdateResponse,\n AutoscaleSettingsDeleteOptionalParams,\n AutoscaleSettingsGetOptionalParams,\n AutoscaleSettingsGetResponse,\n AutoscaleSettingResourcePatch,\n AutoscaleSettingsUpdateOptionalParams,\n AutoscaleSettingsUpdateResponse,\n AutoscaleSettingsListByResourceGroupNextResponse,\n AutoscaleSettingsListBySubscriptionNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AutoscaleSettings operations. */\nexport class AutoscaleSettingsImpl implements AutoscaleSettings {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class AutoscaleSettings class.\n * @param client Reference to the service client\n */\n constructor(client: MonitorClient) {\n this.client = client;\n }\n\n /**\n * Lists the autoscale settings for a resource group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<AutoscaleSettingResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AutoscaleSettingResource[]> {\n let result: AutoscaleSettingsListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByResourceGroupNext(\n resourceGroupName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<AutoscaleSettingResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the autoscale settings for a subscription\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<AutoscaleSettingResource> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AutoscaleSettingResource[]> {\n let result: AutoscaleSettingsListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<AutoscaleSettingResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the autoscale settings for a resource group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: AutoscaleSettingsListByResourceGroupOptionalParams,\n ): Promise<AutoscaleSettingsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Creates or updates an autoscale setting.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param parameters Parameters supplied to the operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n autoscaleSettingName: string,\n parameters: AutoscaleSettingResource,\n options?: AutoscaleSettingsCreateOrUpdateOptionalParams,\n ): Promise<AutoscaleSettingsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes and autoscale setting\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n autoscaleSettingName: string,\n options?: AutoscaleSettingsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Gets an autoscale setting\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n autoscaleSettingName: string,\n options?: AutoscaleSettingsGetOptionalParams,\n ): Promise<AutoscaleSettingsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, autoscaleSettingName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param autoscaleSettingName The autoscale setting name.\n * @param autoscaleSettingResource Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n autoscaleSettingName: string,\n autoscaleSettingResource: AutoscaleSettingResourcePatch,\n options?: AutoscaleSettingsUpdateOptionalParams,\n ): Promise<AutoscaleSettingsUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n autoscaleSettingName,\n autoscaleSettingResource,\n options,\n },\n updateOperationSpec,\n );\n }\n\n /**\n * Lists the autoscale settings for a subscription\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AutoscaleSettingsListBySubscriptionOptionalParams,\n ): Promise<AutoscaleSettingsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: AutoscaleSettingsListByResourceGroupNextOptionalParams,\n ): Promise<AutoscaleSettingsListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\n );\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: AutoscaleSettingsListBySubscriptionNextOptionalParams,\n ): Promise<AutoscaleSettingsListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n 201: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResource,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n requestBody: Parameters.autoscaleSettingResource,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.autoscaleSettingName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoscaleSettingResourceCollection,\n },\n default: {\n bodyMapper: Mappers.AutoscaleErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing AzureMonitorWorkspaces operations. */
|
|
20
20
|
class AzureMonitorWorkspacesImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class AzureMonitorWorkspaces class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -40,52 +41,35 @@ class AzureMonitorWorkspacesImpl {
|
|
|
40
41
|
return this;
|
|
41
42
|
},
|
|
42
43
|
byPage: (settings) => {
|
|
43
|
-
if (settings
|
|
44
|
+
if (settings?.maxPageSize) {
|
|
44
45
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
45
46
|
}
|
|
46
47
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
47
48
|
},
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
});
|
|
51
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
52
|
+
let result;
|
|
53
|
+
let continuationToken = settings?.continuationToken;
|
|
54
|
+
if (!continuationToken) {
|
|
55
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
56
|
+
let page = result.value || [];
|
|
57
|
+
continuationToken = result.nextLink;
|
|
58
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
59
|
+
yield page;
|
|
60
|
+
}
|
|
61
|
+
while (continuationToken) {
|
|
62
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
63
|
+
continuationToken = result.nextLink;
|
|
64
|
+
let page = result.value || [];
|
|
65
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
66
|
+
yield page;
|
|
67
|
+
}
|
|
69
68
|
}
|
|
70
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
75
|
-
_c = _f.value;
|
|
76
|
-
_d = false;
|
|
77
|
-
const page = _c;
|
|
78
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
82
|
-
finally {
|
|
83
|
-
try {
|
|
84
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
85
|
-
}
|
|
86
|
-
finally { if (e_1) throw e_1.error; }
|
|
87
|
-
}
|
|
88
|
-
});
|
|
69
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
70
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
71
|
+
yield* page;
|
|
72
|
+
}
|
|
89
73
|
}
|
|
90
74
|
/**
|
|
91
75
|
* Lists all Azure Monitor Workspaces in the specified subscription
|
|
@@ -101,52 +85,35 @@ class AzureMonitorWorkspacesImpl {
|
|
|
101
85
|
return this;
|
|
102
86
|
},
|
|
103
87
|
byPage: (settings) => {
|
|
104
|
-
if (settings
|
|
88
|
+
if (settings?.maxPageSize) {
|
|
105
89
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
106
90
|
}
|
|
107
91
|
return this.listBySubscriptionPagingPage(options, settings);
|
|
108
92
|
},
|
|
109
93
|
};
|
|
110
94
|
}
|
|
111
|
-
listBySubscriptionPagingPage(options, settings) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
});
|
|
95
|
+
async *listBySubscriptionPagingPage(options, settings) {
|
|
96
|
+
let result;
|
|
97
|
+
let continuationToken = settings?.continuationToken;
|
|
98
|
+
if (!continuationToken) {
|
|
99
|
+
result = await this._listBySubscription(options);
|
|
100
|
+
let page = result.value || [];
|
|
101
|
+
continuationToken = result.nextLink;
|
|
102
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
103
|
+
yield page;
|
|
104
|
+
}
|
|
105
|
+
while (continuationToken) {
|
|
106
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
107
|
+
continuationToken = result.nextLink;
|
|
108
|
+
let page = result.value || [];
|
|
109
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
110
|
+
yield page;
|
|
111
|
+
}
|
|
130
112
|
}
|
|
131
|
-
listBySubscriptionPagingAll(options) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
136
|
-
_c = _f.value;
|
|
137
|
-
_d = false;
|
|
138
|
-
const page = _c;
|
|
139
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
143
|
-
finally {
|
|
144
|
-
try {
|
|
145
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
146
|
-
}
|
|
147
|
-
finally { if (e_2) throw e_2.error; }
|
|
148
|
-
}
|
|
149
|
-
});
|
|
113
|
+
async *listBySubscriptionPagingAll(options) {
|
|
114
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
115
|
+
yield* page;
|
|
116
|
+
}
|
|
150
117
|
}
|
|
151
118
|
/**
|
|
152
119
|
* Lists all Azure Monitor Workspaces in the specified resource group
|
|
@@ -212,14 +179,19 @@ class AzureMonitorWorkspacesImpl {
|
|
|
212
179
|
return this.client.sendOperationRequest(args, spec);
|
|
213
180
|
};
|
|
214
181
|
const sendOperationFn = async (args, spec) => {
|
|
215
|
-
var _a;
|
|
216
182
|
let currentRawResponse = undefined;
|
|
217
|
-
const providedCallback =
|
|
183
|
+
const providedCallback = args.options?.onResponse;
|
|
218
184
|
const callback = (rawResponse, flatResponse) => {
|
|
219
185
|
currentRawResponse = rawResponse;
|
|
220
|
-
providedCallback
|
|
186
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
187
|
+
};
|
|
188
|
+
const updatedArgs = {
|
|
189
|
+
...args,
|
|
190
|
+
options: {
|
|
191
|
+
...args.options,
|
|
192
|
+
onResponse: callback,
|
|
193
|
+
},
|
|
221
194
|
};
|
|
222
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
223
195
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
224
196
|
return {
|
|
225
197
|
flatResponse,
|
|
@@ -236,8 +208,8 @@ class AzureMonitorWorkspacesImpl {
|
|
|
236
208
|
spec: deleteOperationSpec,
|
|
237
209
|
});
|
|
238
210
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
239
|
-
restoreFrom: options
|
|
240
|
-
intervalInMs: options
|
|
211
|
+
restoreFrom: options?.resumeFrom,
|
|
212
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
241
213
|
resourceLocationConfig: "location",
|
|
242
214
|
});
|
|
243
215
|
await poller.poll();
|