@azure/arm-monitor 8.0.0-alpha.20250619.1 → 8.0.0-alpha.20250729.1
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
|
@@ -17,8 +17,9 @@ const index_js_1 = require("./operations/index.js");
|
|
|
17
17
|
const Parameters = tslib_1.__importStar(require("./models/parameters.js"));
|
|
18
18
|
const Mappers = tslib_1.__importStar(require("./models/mappers.js"));
|
|
19
19
|
class MonitorClient extends coreClient.ServiceClient {
|
|
20
|
+
$host;
|
|
21
|
+
subscriptionId;
|
|
20
22
|
constructor(credentials, subscriptionIdOrOptions, options) {
|
|
21
|
-
var _a, _b, _c;
|
|
22
23
|
if (credentials === undefined) {
|
|
23
24
|
throw new Error("'credentials' cannot be null");
|
|
24
25
|
}
|
|
@@ -41,12 +42,17 @@ class MonitorClient extends coreClient.ServiceClient {
|
|
|
41
42
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
42
43
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
43
44
|
: `${packageDetails}`;
|
|
44
|
-
const optionsWithDefaults =
|
|
45
|
+
const optionsWithDefaults = {
|
|
46
|
+
...defaults,
|
|
47
|
+
...options,
|
|
48
|
+
userAgentOptions: {
|
|
45
49
|
userAgentPrefix,
|
|
46
|
-
},
|
|
50
|
+
},
|
|
51
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
52
|
+
};
|
|
47
53
|
super(optionsWithDefaults);
|
|
48
54
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
49
|
-
if (
|
|
55
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
50
56
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
51
57
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
52
58
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -60,7 +66,8 @@ class MonitorClient extends coreClient.ServiceClient {
|
|
|
60
66
|
});
|
|
61
67
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
62
68
|
credential: credentials,
|
|
63
|
-
scopes:
|
|
69
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
70
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
64
71
|
challengeCallbacks: {
|
|
65
72
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
66
73
|
},
|
|
@@ -118,14 +125,19 @@ class MonitorClient extends coreClient.ServiceClient {
|
|
|
118
125
|
return this.sendOperationRequest(args, spec);
|
|
119
126
|
};
|
|
120
127
|
const sendOperationFn = async (args, spec) => {
|
|
121
|
-
var _a;
|
|
122
128
|
let currentRawResponse = undefined;
|
|
123
|
-
const providedCallback =
|
|
129
|
+
const providedCallback = args.options?.onResponse;
|
|
124
130
|
const callback = (rawResponse, flatResponse) => {
|
|
125
131
|
currentRawResponse = rawResponse;
|
|
126
|
-
providedCallback
|
|
132
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
133
|
+
};
|
|
134
|
+
const updatedArgs = {
|
|
135
|
+
...args,
|
|
136
|
+
options: {
|
|
137
|
+
...args.options,
|
|
138
|
+
onResponse: callback,
|
|
139
|
+
},
|
|
127
140
|
};
|
|
128
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
129
141
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
130
142
|
return {
|
|
131
143
|
flatResponse,
|
|
@@ -148,8 +160,8 @@ class MonitorClient extends coreClient.ServiceClient {
|
|
|
148
160
|
spec: createNotificationsAtTenantActionGroupResourceLevelOperationSpec,
|
|
149
161
|
});
|
|
150
162
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
151
|
-
restoreFrom: options
|
|
152
|
-
intervalInMs: options
|
|
163
|
+
restoreFrom: options?.resumeFrom,
|
|
164
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
153
165
|
resourceLocationConfig: "location",
|
|
154
166
|
});
|
|
155
167
|
await poller.poll();
|
|
@@ -184,6 +196,38 @@ class MonitorClient extends coreClient.ServiceClient {
|
|
|
184
196
|
options,
|
|
185
197
|
}, getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec);
|
|
186
198
|
}
|
|
199
|
+
metricNamespaces;
|
|
200
|
+
metricDefinitions;
|
|
201
|
+
metricsOperations;
|
|
202
|
+
azureMonitorWorkspaces;
|
|
203
|
+
monitorOperations;
|
|
204
|
+
autoscaleSettings;
|
|
205
|
+
predictiveMetric;
|
|
206
|
+
operations;
|
|
207
|
+
alertRuleIncidents;
|
|
208
|
+
alertRules;
|
|
209
|
+
logProfiles;
|
|
210
|
+
diagnosticSettings;
|
|
211
|
+
diagnosticSettingsCategory;
|
|
212
|
+
actionGroups;
|
|
213
|
+
tenantActionGroups;
|
|
214
|
+
activityLogs;
|
|
215
|
+
eventCategories;
|
|
216
|
+
tenantActivityLogs;
|
|
217
|
+
baselines;
|
|
218
|
+
metricAlerts;
|
|
219
|
+
metricAlertsStatus;
|
|
220
|
+
scheduledQueryRules;
|
|
221
|
+
vMInsights;
|
|
222
|
+
privateLinkScopes;
|
|
223
|
+
privateLinkScopeOperationStatus;
|
|
224
|
+
privateLinkResources;
|
|
225
|
+
privateEndpointConnections;
|
|
226
|
+
privateLinkScopedResources;
|
|
227
|
+
activityLogAlerts;
|
|
228
|
+
dataCollectionEndpoints;
|
|
229
|
+
dataCollectionRuleAssociations;
|
|
230
|
+
dataCollectionRules;
|
|
187
231
|
}
|
|
188
232
|
exports.MonitorClient = MonitorClient;
|
|
189
233
|
// Operation Specifications
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitorClient.js","sourceRoot":"","sources":["../../src/monitorClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAE9D,8CAIyB;AACzB,6CAA6C;AAC7C,oDAiC+B;AAmC/B,2EAAqD;AACrD,qEAA+C;AAU/C,MAAa,aAAc,SAAQ,UAAU,CAAC,aAAa;IAmBzD,YACE,WAAqC,EACrC,uBAA8D,EAC9D,OAAqC;;QAErC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,CAAC;QAC3C,CAAC;aAAM,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YACvD,OAAO,GAAG,uBAAuB,CAAC;QACpC,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgC;YAC5C,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,mCAAmC,CAAC;QAC3D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,QAAQ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,UAAU,CAAC,oBAAoB;IAC5C,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,qBAAqB;KACjC;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,iBAAiB;KAC7B;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACJ,MAAM,iEAAiE,GACrE;IACE,IAAI,EAAE,kLAAkL;IACxL,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,4CAA4C;SACjE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,qBAAqB;KACjC;IACD,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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"./lroImpl.js\";\nimport {\n MetricNamespacesImpl,\n MetricDefinitionsImpl,\n MetricsOperationsImpl,\n AzureMonitorWorkspacesImpl,\n MonitorOperationsImpl,\n AutoscaleSettingsImpl,\n PredictiveMetricImpl,\n OperationsImpl,\n AlertRuleIncidentsImpl,\n AlertRulesImpl,\n LogProfilesImpl,\n DiagnosticSettingsImpl,\n DiagnosticSettingsCategoryImpl,\n ActionGroupsImpl,\n TenantActionGroupsImpl,\n ActivityLogsImpl,\n EventCategoriesImpl,\n TenantActivityLogsImpl,\n BaselinesImpl,\n MetricAlertsImpl,\n MetricAlertsStatusImpl,\n ScheduledQueryRulesImpl,\n VMInsightsImpl,\n PrivateLinkScopesImpl,\n PrivateLinkScopeOperationStatusImpl,\n PrivateLinkResourcesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkScopedResourcesImpl,\n ActivityLogAlertsImpl,\n DataCollectionEndpointsImpl,\n DataCollectionRuleAssociationsImpl,\n DataCollectionRulesImpl,\n} from \"./operations/index.js\";\nimport {\n MetricNamespaces,\n MetricDefinitions,\n MetricsOperations,\n AzureMonitorWorkspaces,\n MonitorOperations,\n AutoscaleSettings,\n PredictiveMetric,\n Operations,\n AlertRuleIncidents,\n AlertRules,\n LogProfiles,\n DiagnosticSettings,\n DiagnosticSettingsCategory,\n ActionGroups,\n TenantActionGroups,\n ActivityLogs,\n EventCategories,\n TenantActivityLogs,\n Baselines,\n MetricAlerts,\n MetricAlertsStatus,\n ScheduledQueryRules,\n VMInsights,\n PrivateLinkScopes,\n PrivateLinkScopeOperationStatus,\n PrivateLinkResources,\n PrivateEndpointConnections,\n PrivateLinkScopedResources,\n ActivityLogAlerts,\n DataCollectionEndpoints,\n DataCollectionRuleAssociations,\n DataCollectionRules,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MonitorClientOptionalParams,\n TenantNotificationRequestBody,\n CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n CreateNotificationsAtTenantActionGroupResourceLevelResponse,\n GetTestNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n GetTestNotificationsAtTenantActionGroupResourceLevelResponse,\n} from \"./models/index.js\";\n\nexport class MonitorClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the MonitorClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MonitorClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: MonitorClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: MonitorClientOptionalParams | string,\n options?: MonitorClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MonitorClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-monitor/8.0.0-beta.6`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.metricNamespaces = new MetricNamespacesImpl(this);\n this.metricDefinitions = new MetricDefinitionsImpl(this);\n this.metricsOperations = new MetricsOperationsImpl(this);\n this.azureMonitorWorkspaces = new AzureMonitorWorkspacesImpl(this);\n this.monitorOperations = new MonitorOperationsImpl(this);\n this.autoscaleSettings = new AutoscaleSettingsImpl(this);\n this.predictiveMetric = new PredictiveMetricImpl(this);\n this.operations = new OperationsImpl(this);\n this.alertRuleIncidents = new AlertRuleIncidentsImpl(this);\n this.alertRules = new AlertRulesImpl(this);\n this.logProfiles = new LogProfilesImpl(this);\n this.diagnosticSettings = new DiagnosticSettingsImpl(this);\n this.diagnosticSettingsCategory = new DiagnosticSettingsCategoryImpl(this);\n this.actionGroups = new ActionGroupsImpl(this);\n this.tenantActionGroups = new TenantActionGroupsImpl(this);\n this.activityLogs = new ActivityLogsImpl(this);\n this.eventCategories = new EventCategoriesImpl(this);\n this.tenantActivityLogs = new TenantActivityLogsImpl(this);\n this.baselines = new BaselinesImpl(this);\n this.metricAlerts = new MetricAlertsImpl(this);\n this.metricAlertsStatus = new MetricAlertsStatusImpl(this);\n this.scheduledQueryRules = new ScheduledQueryRulesImpl(this);\n this.vMInsights = new VMInsightsImpl(this);\n this.privateLinkScopes = new PrivateLinkScopesImpl(this);\n this.privateLinkScopeOperationStatus =\n new PrivateLinkScopeOperationStatusImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkScopedResources = new PrivateLinkScopedResourcesImpl(this);\n this.activityLogAlerts = new ActivityLogAlertsImpl(this);\n this.dataCollectionEndpoints = new DataCollectionEndpointsImpl(this);\n this.dataCollectionRuleAssociations =\n new DataCollectionRuleAssociationsImpl(this);\n this.dataCollectionRules = new DataCollectionRulesImpl(this);\n }\n\n /**\n * Send test notifications to a set of provided receivers\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 notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationRequest: TenantNotificationRequestBody,\n options?: CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<CreateNotificationsAtTenantActionGroupResourceLevelResponse>,\n CreateNotificationsAtTenantActionGroupResourceLevelResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<CreateNotificationsAtTenantActionGroupResourceLevelResponse> => {\n return this.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationRequest,\n options,\n },\n spec: createNotificationsAtTenantActionGroupResourceLevelOperationSpec,\n });\n const poller = await createHttpPoller<\n CreateNotificationsAtTenantActionGroupResourceLevelResponse,\n OperationState<CreateNotificationsAtTenantActionGroupResourceLevelResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Send test notifications to a set of provided receivers\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 notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtTenantActionGroupResourceLevelAndWait(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationRequest: TenantNotificationRequestBody,\n options?: CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<CreateNotificationsAtTenantActionGroupResourceLevelResponse> {\n const poller =\n await this.beginCreateNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the test notifications by the notification id\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 notificationId The notification id\n * @param options The options parameters.\n */\n getTestNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationId: string,\n options?: GetTestNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<GetTestNotificationsAtTenantActionGroupResourceLevelResponse> {\n return this.sendOperationRequest(\n {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationId,\n options,\n },\n getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec,\n );\n }\n\n metricNamespaces: MetricNamespaces;\n metricDefinitions: MetricDefinitions;\n metricsOperations: MetricsOperations;\n azureMonitorWorkspaces: AzureMonitorWorkspaces;\n monitorOperations: MonitorOperations;\n autoscaleSettings: AutoscaleSettings;\n predictiveMetric: PredictiveMetric;\n operations: Operations;\n alertRuleIncidents: AlertRuleIncidents;\n alertRules: AlertRules;\n logProfiles: LogProfiles;\n diagnosticSettings: DiagnosticSettings;\n diagnosticSettingsCategory: DiagnosticSettingsCategory;\n actionGroups: ActionGroups;\n tenantActionGroups: TenantActionGroups;\n activityLogs: ActivityLogs;\n eventCategories: EventCategories;\n tenantActivityLogs: TenantActivityLogs;\n baselines: Baselines;\n metricAlerts: MetricAlerts;\n metricAlertsStatus: MetricAlertsStatus;\n scheduledQueryRules: ScheduledQueryRules;\n vMInsights: VMInsights;\n privateLinkScopes: PrivateLinkScopes;\n privateLinkScopeOperationStatus: PrivateLinkScopeOperationStatus;\n privateLinkResources: PrivateLinkResources;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkScopedResources: PrivateLinkScopedResources;\n activityLogAlerts: ActivityLogAlerts;\n dataCollectionEndpoints: DataCollectionEndpoints;\n dataCollectionRuleAssociations: DataCollectionRuleAssociations;\n dataCollectionRules: DataCollectionRules;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createNotificationsAtTenantActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/createNotifications\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 201: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 202: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 204: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseAutoGenerated3,\n },\n },\n requestBody: Parameters.notificationRequest1,\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 getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/notificationStatus/{notificationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.notificationId,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n };\n"]}
|
|
1
|
+
{"version":3,"file":"monitorClient.js","sourceRoot":"","sources":["../../src/monitorClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAE9D,8CAIyB;AACzB,6CAA6C;AAC7C,oDAiC+B;AAmC/B,2EAAqD;AACrD,qEAA+C;AAU/C,MAAa,aAAc,SAAQ,UAAU,CAAC,aAAa;IACzD,KAAK,CAAS;IACd,cAAc,CAAU;IAiBxB,YACE,WAAqC,EACrC,uBAA8D,EAC9D,OAAqC;QAErC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC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jE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,2BAA2B;SAChD;KACF;IACD,WAAW,EAAE,UAAU,CAAC,oBAAoB;IAC5C,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,qBAAqB;KACjC;IACD,gBAAgB,EAAE;QAChB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,iBAAiB;KAC7B;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACJ,MAAM,iEAAiE,GACrE;IACE,IAAI,EAAE,kLAAkL;IACxL,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,4CAA4C;SACjE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,qBAAqB;KACjC;IACD,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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"./lroImpl.js\";\nimport {\n MetricNamespacesImpl,\n MetricDefinitionsImpl,\n MetricsOperationsImpl,\n AzureMonitorWorkspacesImpl,\n MonitorOperationsImpl,\n AutoscaleSettingsImpl,\n PredictiveMetricImpl,\n OperationsImpl,\n AlertRuleIncidentsImpl,\n AlertRulesImpl,\n LogProfilesImpl,\n DiagnosticSettingsImpl,\n DiagnosticSettingsCategoryImpl,\n ActionGroupsImpl,\n TenantActionGroupsImpl,\n ActivityLogsImpl,\n EventCategoriesImpl,\n TenantActivityLogsImpl,\n BaselinesImpl,\n MetricAlertsImpl,\n MetricAlertsStatusImpl,\n ScheduledQueryRulesImpl,\n VMInsightsImpl,\n PrivateLinkScopesImpl,\n PrivateLinkScopeOperationStatusImpl,\n PrivateLinkResourcesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkScopedResourcesImpl,\n ActivityLogAlertsImpl,\n DataCollectionEndpointsImpl,\n DataCollectionRuleAssociationsImpl,\n DataCollectionRulesImpl,\n} from \"./operations/index.js\";\nimport {\n MetricNamespaces,\n MetricDefinitions,\n MetricsOperations,\n AzureMonitorWorkspaces,\n MonitorOperations,\n AutoscaleSettings,\n PredictiveMetric,\n Operations,\n AlertRuleIncidents,\n AlertRules,\n LogProfiles,\n DiagnosticSettings,\n DiagnosticSettingsCategory,\n ActionGroups,\n TenantActionGroups,\n ActivityLogs,\n EventCategories,\n TenantActivityLogs,\n Baselines,\n MetricAlerts,\n MetricAlertsStatus,\n ScheduledQueryRules,\n VMInsights,\n PrivateLinkScopes,\n PrivateLinkScopeOperationStatus,\n PrivateLinkResources,\n PrivateEndpointConnections,\n PrivateLinkScopedResources,\n ActivityLogAlerts,\n DataCollectionEndpoints,\n DataCollectionRuleAssociations,\n DataCollectionRules,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MonitorClientOptionalParams,\n TenantNotificationRequestBody,\n CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n CreateNotificationsAtTenantActionGroupResourceLevelResponse,\n GetTestNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n GetTestNotificationsAtTenantActionGroupResourceLevelResponse,\n} from \"./models/index.js\";\n\nexport class MonitorClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the MonitorClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MonitorClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: MonitorClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: MonitorClientOptionalParams | string,\n options?: MonitorClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MonitorClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-monitor/8.0.0-beta.6`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.metricNamespaces = new MetricNamespacesImpl(this);\n this.metricDefinitions = new MetricDefinitionsImpl(this);\n this.metricsOperations = new MetricsOperationsImpl(this);\n this.azureMonitorWorkspaces = new AzureMonitorWorkspacesImpl(this);\n this.monitorOperations = new MonitorOperationsImpl(this);\n this.autoscaleSettings = new AutoscaleSettingsImpl(this);\n this.predictiveMetric = new PredictiveMetricImpl(this);\n this.operations = new OperationsImpl(this);\n this.alertRuleIncidents = new AlertRuleIncidentsImpl(this);\n this.alertRules = new AlertRulesImpl(this);\n this.logProfiles = new LogProfilesImpl(this);\n this.diagnosticSettings = new DiagnosticSettingsImpl(this);\n this.diagnosticSettingsCategory = new DiagnosticSettingsCategoryImpl(this);\n this.actionGroups = new ActionGroupsImpl(this);\n this.tenantActionGroups = new TenantActionGroupsImpl(this);\n this.activityLogs = new ActivityLogsImpl(this);\n this.eventCategories = new EventCategoriesImpl(this);\n this.tenantActivityLogs = new TenantActivityLogsImpl(this);\n this.baselines = new BaselinesImpl(this);\n this.metricAlerts = new MetricAlertsImpl(this);\n this.metricAlertsStatus = new MetricAlertsStatusImpl(this);\n this.scheduledQueryRules = new ScheduledQueryRulesImpl(this);\n this.vMInsights = new VMInsightsImpl(this);\n this.privateLinkScopes = new PrivateLinkScopesImpl(this);\n this.privateLinkScopeOperationStatus =\n new PrivateLinkScopeOperationStatusImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkScopedResources = new PrivateLinkScopedResourcesImpl(this);\n this.activityLogAlerts = new ActivityLogAlertsImpl(this);\n this.dataCollectionEndpoints = new DataCollectionEndpointsImpl(this);\n this.dataCollectionRuleAssociations =\n new DataCollectionRuleAssociationsImpl(this);\n this.dataCollectionRules = new DataCollectionRulesImpl(this);\n }\n\n /**\n * Send test notifications to a set of provided receivers\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 notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationRequest: TenantNotificationRequestBody,\n options?: CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<CreateNotificationsAtTenantActionGroupResourceLevelResponse>,\n CreateNotificationsAtTenantActionGroupResourceLevelResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<CreateNotificationsAtTenantActionGroupResourceLevelResponse> => {\n return this.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationRequest,\n options,\n },\n spec: createNotificationsAtTenantActionGroupResourceLevelOperationSpec,\n });\n const poller = await createHttpPoller<\n CreateNotificationsAtTenantActionGroupResourceLevelResponse,\n OperationState<CreateNotificationsAtTenantActionGroupResourceLevelResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Send test notifications to a set of provided receivers\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 notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtTenantActionGroupResourceLevelAndWait(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationRequest: TenantNotificationRequestBody,\n options?: CreateNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<CreateNotificationsAtTenantActionGroupResourceLevelResponse> {\n const poller =\n await this.beginCreateNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the test notifications by the notification id\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 notificationId The notification id\n * @param options The options parameters.\n */\n getTestNotificationsAtTenantActionGroupResourceLevel(\n managementGroupId: string,\n tenantActionGroupName: string,\n xMsClientTenantId: string,\n notificationId: string,\n options?: GetTestNotificationsAtTenantActionGroupResourceLevelOptionalParams,\n ): Promise<GetTestNotificationsAtTenantActionGroupResourceLevelResponse> {\n return this.sendOperationRequest(\n {\n managementGroupId,\n tenantActionGroupName,\n xMsClientTenantId,\n notificationId,\n options,\n },\n getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec,\n );\n }\n\n metricNamespaces: MetricNamespaces;\n metricDefinitions: MetricDefinitions;\n metricsOperations: MetricsOperations;\n azureMonitorWorkspaces: AzureMonitorWorkspaces;\n monitorOperations: MonitorOperations;\n autoscaleSettings: AutoscaleSettings;\n predictiveMetric: PredictiveMetric;\n operations: Operations;\n alertRuleIncidents: AlertRuleIncidents;\n alertRules: AlertRules;\n logProfiles: LogProfiles;\n diagnosticSettings: DiagnosticSettings;\n diagnosticSettingsCategory: DiagnosticSettingsCategory;\n actionGroups: ActionGroups;\n tenantActionGroups: TenantActionGroups;\n activityLogs: ActivityLogs;\n eventCategories: EventCategories;\n tenantActivityLogs: TenantActivityLogs;\n baselines: Baselines;\n metricAlerts: MetricAlerts;\n metricAlertsStatus: MetricAlertsStatus;\n scheduledQueryRules: ScheduledQueryRules;\n vMInsights: VMInsights;\n privateLinkScopes: PrivateLinkScopes;\n privateLinkScopeOperationStatus: PrivateLinkScopeOperationStatus;\n privateLinkResources: PrivateLinkResources;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkScopedResources: PrivateLinkScopedResources;\n activityLogAlerts: ActivityLogAlerts;\n dataCollectionEndpoints: DataCollectionEndpoints;\n dataCollectionRuleAssociations: DataCollectionRuleAssociations;\n dataCollectionRules: DataCollectionRules;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createNotificationsAtTenantActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/createNotifications\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 201: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 202: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n 204: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n default: {\n bodyMapper: Mappers.ErrorResponseAutoGenerated3,\n },\n },\n requestBody: Parameters.notificationRequest1,\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 getTestNotificationsAtTenantActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/tenantActionGroups/{tenantActionGroupName}/notificationStatus/{notificationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponseAutoGenerated,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion7],\n urlParameters: [\n Parameters.$host,\n Parameters.notificationId,\n Parameters.managementGroupId,\n Parameters.tenantActionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.xMsClientTenantId],\n serializer,\n };\n"]}
|
|
@@ -17,6 +17,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
17
17
|
/// <reference lib="esnext.asynciterable" />
|
|
18
18
|
/** Class containing ActionGroups operations. */
|
|
19
19
|
class ActionGroupsImpl {
|
|
20
|
+
client;
|
|
20
21
|
/**
|
|
21
22
|
* Initialize a new instance of the class ActionGroups class.
|
|
22
23
|
* @param client Reference to the service client
|
|
@@ -38,39 +39,22 @@ class ActionGroupsImpl {
|
|
|
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.listBySubscriptionIdPagingPage(options, settings);
|
|
45
46
|
},
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
|
-
listBySubscriptionIdPagingPage(options, _settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
yield yield tslib_1.__await(result.value || []);
|
|
53
|
-
});
|
|
49
|
+
async *listBySubscriptionIdPagingPage(options, _settings) {
|
|
50
|
+
let result;
|
|
51
|
+
result = await this._listBySubscriptionId(options);
|
|
52
|
+
yield result.value || [];
|
|
54
53
|
}
|
|
55
|
-
listBySubscriptionIdPagingAll(options) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionIdPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
60
|
-
_c = _f.value;
|
|
61
|
-
_d = false;
|
|
62
|
-
const page = _c;
|
|
63
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
67
|
-
finally {
|
|
68
|
-
try {
|
|
69
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
70
|
-
}
|
|
71
|
-
finally { if (e_1) throw e_1.error; }
|
|
72
|
-
}
|
|
73
|
-
});
|
|
54
|
+
async *listBySubscriptionIdPagingAll(options) {
|
|
55
|
+
for await (const page of this.listBySubscriptionIdPagingPage(options)) {
|
|
56
|
+
yield* page;
|
|
57
|
+
}
|
|
74
58
|
}
|
|
75
59
|
/**
|
|
76
60
|
* Get a list of all action groups in a resource group.
|
|
@@ -87,39 +71,22 @@ class ActionGroupsImpl {
|
|
|
87
71
|
return this;
|
|
88
72
|
},
|
|
89
73
|
byPage: (settings) => {
|
|
90
|
-
if (settings
|
|
74
|
+
if (settings?.maxPageSize) {
|
|
91
75
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
92
76
|
}
|
|
93
77
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
94
78
|
},
|
|
95
79
|
};
|
|
96
80
|
}
|
|
97
|
-
listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
yield yield tslib_1.__await(result.value || []);
|
|
102
|
-
});
|
|
81
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
|
|
82
|
+
let result;
|
|
83
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
84
|
+
yield result.value || [];
|
|
103
85
|
}
|
|
104
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
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) {
|
|
109
|
-
_c = _f.value;
|
|
110
|
-
_d = false;
|
|
111
|
-
const page = _c;
|
|
112
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
116
|
-
finally {
|
|
117
|
-
try {
|
|
118
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
119
|
-
}
|
|
120
|
-
finally { if (e_2) throw e_2.error; }
|
|
121
|
-
}
|
|
122
|
-
});
|
|
86
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
87
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
88
|
+
yield* page;
|
|
89
|
+
}
|
|
123
90
|
}
|
|
124
91
|
/**
|
|
125
92
|
* Create a new action group or update an existing one.
|
|
@@ -171,14 +138,19 @@ class ActionGroupsImpl {
|
|
|
171
138
|
return this.client.sendOperationRequest(args, spec);
|
|
172
139
|
};
|
|
173
140
|
const sendOperationFn = async (args, spec) => {
|
|
174
|
-
var _a;
|
|
175
141
|
let currentRawResponse = undefined;
|
|
176
|
-
const providedCallback =
|
|
142
|
+
const providedCallback = args.options?.onResponse;
|
|
177
143
|
const callback = (rawResponse, flatResponse) => {
|
|
178
144
|
currentRawResponse = rawResponse;
|
|
179
|
-
providedCallback
|
|
145
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
146
|
+
};
|
|
147
|
+
const updatedArgs = {
|
|
148
|
+
...args,
|
|
149
|
+
options: {
|
|
150
|
+
...args.options,
|
|
151
|
+
onResponse: callback,
|
|
152
|
+
},
|
|
180
153
|
};
|
|
181
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
182
154
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
183
155
|
return {
|
|
184
156
|
flatResponse,
|
|
@@ -200,8 +172,8 @@ class ActionGroupsImpl {
|
|
|
200
172
|
spec: createNotificationsAtActionGroupResourceLevelOperationSpec,
|
|
201
173
|
});
|
|
202
174
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
203
|
-
restoreFrom: options
|
|
204
|
-
intervalInMs: options
|
|
175
|
+
restoreFrom: options?.resumeFrom,
|
|
176
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
205
177
|
resourceLocationConfig: "location",
|
|
206
178
|
});
|
|
207
179
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionGroups.js","sourceRoot":"","sources":["../../../src/operations/actionGroups.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8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ACP,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,2BAA2B,GAA6B;IAC5D,IAAI,EAAE,0IAA0I;IAChJ,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE;YACH,OAAO,EAAE,IAAI;SACd;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,aAAa;IACrC,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { ActionGroups } 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 SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n ActionGroupResource,\n ActionGroupsListBySubscriptionIdOptionalParams,\n ActionGroupsListBySubscriptionIdResponse,\n ActionGroupsListByResourceGroupOptionalParams,\n ActionGroupsListByResourceGroupResponse,\n ActionGroupsCreateOrUpdateOptionalParams,\n ActionGroupsCreateOrUpdateResponse,\n ActionGroupsGetOptionalParams,\n ActionGroupsGetResponse,\n ActionGroupsDeleteOptionalParams,\n ActionGroupPatchBody,\n ActionGroupsUpdateOptionalParams,\n ActionGroupsUpdateResponse,\n NotificationRequestBody,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse,\n ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams,\n ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse,\n EnableRequest,\n ActionGroupsEnableReceiverOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ActionGroups operations. */\nexport class ActionGroupsImpl implements ActionGroups {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class ActionGroups 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 action groups in a subscription.\n * @param options The options parameters.\n */\n public listBySubscriptionId(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): PagedAsyncIterableIterator<ActionGroupResource> {\n const iter = this.listBySubscriptionIdPagingAll(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.listBySubscriptionIdPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionIdPagingPage(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ActionGroupResource[]> {\n let result: ActionGroupsListBySubscriptionIdResponse;\n result = await this._listBySubscriptionId(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionIdPagingAll(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): AsyncIterableIterator<ActionGroupResource> {\n for await (const page of this.listBySubscriptionIdPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get a list of all action groups 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?: ActionGroupsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<ActionGroupResource> {\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?: ActionGroupsListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ActionGroupResource[]> {\n let result: ActionGroupsListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: ActionGroupsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<ActionGroupResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Create a new action group or update an existing one.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param actionGroup The action group to create or use for the update.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n actionGroupName: string,\n actionGroup: ActionGroupResource,\n options?: ActionGroupsCreateOrUpdateOptionalParams,\n ): Promise<ActionGroupsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, actionGroup, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Get an action group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n actionGroupName: string,\n options?: ActionGroupsGetOptionalParams,\n ): Promise<ActionGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Delete an action group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n actionGroupName: string,\n options?: ActionGroupsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param actionGroupPatch Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n actionGroupName: string,\n actionGroupPatch: ActionGroupPatchBody,\n options?: ActionGroupsUpdateOptionalParams,\n ): Promise<ActionGroupsUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, actionGroupPatch, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtActionGroupResourceLevel(\n resourceGroupName: string,\n actionGroupName: string,\n notificationRequest: NotificationRequestBody,\n options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n actionGroupName,\n notificationRequest,\n options,\n },\n spec: createNotificationsAtActionGroupResourceLevelOperationSpec,\n });\n const poller = await createHttpPoller<\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse,\n OperationState<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtActionGroupResourceLevelAndWait(\n resourceGroupName: string,\n actionGroupName: string,\n notificationRequest: NotificationRequestBody,\n options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse> {\n const poller =\n await this.beginCreateNotificationsAtActionGroupResourceLevel(\n resourceGroupName,\n actionGroupName,\n notificationRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the test notifications by the notification id\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationId The notification id\n * @param options The options parameters.\n */\n getTestNotificationsAtActionGroupResourceLevel(\n resourceGroupName: string,\n actionGroupName: string,\n notificationId: string,\n options?: ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, notificationId, options },\n getTestNotificationsAtActionGroupResourceLevelOperationSpec,\n );\n }\n\n /**\n * Get a list of all action groups in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscriptionId(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): Promise<ActionGroupsListBySubscriptionIdResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionIdOperationSpec,\n );\n }\n\n /**\n * Get a list of all action groups 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?: ActionGroupsListByResourceGroupOptionalParams,\n ): Promise<ActionGroupsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled.\n * This operation is only supported for Email or SMS receivers.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param enableRequest The receiver to re-enable.\n * @param options The options parameters.\n */\n enableReceiver(\n resourceGroupName: string,\n actionGroupName: string,\n enableRequest: EnableRequest,\n options?: ActionGroupsEnableReceiverOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, enableRequest, options },\n enableReceiverOperationSpec,\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/actionGroups/{actionGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n 201: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroup,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroupPatch,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/createNotifications\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 201: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 202: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 204: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.notificationRequest,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\nconst getTestNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/notificationStatus/{notificationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n Parameters.notificationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n };\nconst listBySubscriptionIdOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\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/actionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst enableReceiverOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 409: {\n isError: true,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.enableRequest,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"actionGroups.js","sourceRoot":"","sources":["../../../src/operations/actionGroups.ts"],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AC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,2BAA2B,GAA6B;IAC5D,IAAI,EAAE,0IAA0I;IAChJ,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE;YACH,OAAO,EAAE,IAAI;SACd;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,aAAa;IACrC,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { ActionGroups } 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 SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n ActionGroupResource,\n ActionGroupsListBySubscriptionIdOptionalParams,\n ActionGroupsListBySubscriptionIdResponse,\n ActionGroupsListByResourceGroupOptionalParams,\n ActionGroupsListByResourceGroupResponse,\n ActionGroupsCreateOrUpdateOptionalParams,\n ActionGroupsCreateOrUpdateResponse,\n ActionGroupsGetOptionalParams,\n ActionGroupsGetResponse,\n ActionGroupsDeleteOptionalParams,\n ActionGroupPatchBody,\n ActionGroupsUpdateOptionalParams,\n ActionGroupsUpdateResponse,\n NotificationRequestBody,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse,\n ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams,\n ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse,\n EnableRequest,\n ActionGroupsEnableReceiverOptionalParams,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ActionGroups operations. */\nexport class ActionGroupsImpl implements ActionGroups {\n private readonly client: MonitorClient;\n\n /**\n * Initialize a new instance of the class ActionGroups 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 action groups in a subscription.\n * @param options The options parameters.\n */\n public listBySubscriptionId(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): PagedAsyncIterableIterator<ActionGroupResource> {\n const iter = this.listBySubscriptionIdPagingAll(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.listBySubscriptionIdPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionIdPagingPage(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ActionGroupResource[]> {\n let result: ActionGroupsListBySubscriptionIdResponse;\n result = await this._listBySubscriptionId(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionIdPagingAll(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): AsyncIterableIterator<ActionGroupResource> {\n for await (const page of this.listBySubscriptionIdPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get a list of all action groups 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?: ActionGroupsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<ActionGroupResource> {\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?: ActionGroupsListByResourceGroupOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ActionGroupResource[]> {\n let result: ActionGroupsListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: ActionGroupsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<ActionGroupResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Create a new action group or update an existing one.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param actionGroup The action group to create or use for the update.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n actionGroupName: string,\n actionGroup: ActionGroupResource,\n options?: ActionGroupsCreateOrUpdateOptionalParams,\n ): Promise<ActionGroupsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, actionGroup, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Get an action group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n actionGroupName: string,\n options?: ActionGroupsGetOptionalParams,\n ): Promise<ActionGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Delete an action group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n actionGroupName: string,\n options?: ActionGroupsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param actionGroupPatch Parameters supplied to the operation.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n actionGroupName: string,\n actionGroupPatch: ActionGroupPatchBody,\n options?: ActionGroupsUpdateOptionalParams,\n ): Promise<ActionGroupsUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, actionGroupPatch, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtActionGroupResourceLevel(\n resourceGroupName: string,\n actionGroupName: string,\n notificationRequest: NotificationRequestBody,\n options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>,\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n actionGroupName,\n notificationRequest,\n options,\n },\n spec: createNotificationsAtActionGroupResourceLevelOperationSpec,\n });\n const poller = await createHttpPoller<\n ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse,\n OperationState<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Send test notifications to a set of provided receivers\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationRequest The notification request body which includes the contact details\n * @param options The options parameters.\n */\n async beginCreateNotificationsAtActionGroupResourceLevelAndWait(\n resourceGroupName: string,\n actionGroupName: string,\n notificationRequest: NotificationRequestBody,\n options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse> {\n const poller =\n await this.beginCreateNotificationsAtActionGroupResourceLevel(\n resourceGroupName,\n actionGroupName,\n notificationRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the test notifications by the notification id\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param notificationId The notification id\n * @param options The options parameters.\n */\n getTestNotificationsAtActionGroupResourceLevel(\n resourceGroupName: string,\n actionGroupName: string,\n notificationId: string,\n options?: ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams,\n ): Promise<ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, notificationId, options },\n getTestNotificationsAtActionGroupResourceLevelOperationSpec,\n );\n }\n\n /**\n * Get a list of all action groups in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscriptionId(\n options?: ActionGroupsListBySubscriptionIdOptionalParams,\n ): Promise<ActionGroupsListBySubscriptionIdResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionIdOperationSpec,\n );\n }\n\n /**\n * Get a list of all action groups 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?: ActionGroupsListByResourceGroupOptionalParams,\n ): Promise<ActionGroupsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled.\n * This operation is only supported for Email or SMS receivers.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param actionGroupName The name of the action group.\n * @param enableRequest The receiver to re-enable.\n * @param options The options parameters.\n */\n enableReceiver(\n resourceGroupName: string,\n actionGroupName: string,\n enableRequest: EnableRequest,\n options?: ActionGroupsEnableReceiverOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, actionGroupName, enableRequest, options },\n enableReceiverOperationSpec,\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/actionGroups/{actionGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n 201: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroup,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.actionGroupPatch,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/createNotifications\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 201: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 202: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n 204: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.notificationRequest,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\nconst getTestNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/notificationStatus/{notificationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TestNotificationDetailsResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n Parameters.notificationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n };\nconst listBySubscriptionIdOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\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/actionGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActionGroupList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst enableReceiverOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 409: {\n isError: true,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.enableRequest,\n queryParameters: [Parameters.apiVersion6],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.actionGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\n"]}
|