diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7ece47c88025..a6747d666f93 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1883,22 +1883,6 @@ packages: resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} dev: false - /@rollup/plugin-commonjs/21.1.0_rollup@2.79.1: - resolution: {integrity: sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==} - engines: {node: '>= 8.0.0'} - peerDependencies: - rollup: ^2.38.3 - dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.79.1 - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 7.2.3 - is-reference: 1.2.1 - magic-string: 0.25.9 - resolve: 1.22.1 - rollup: 2.79.1 - dev: false - /@rollup/plugin-commonjs/24.0.1_rollup@2.79.1: resolution: {integrity: sha512-15LsiWRZk4eOGqvrJyu3z3DaBu5BhXIMeWnijSRvd8irrrg9SHpQ1pH+BUK4H6Z9wL9yOxZJMTLU+Au86XHxow==} engines: {node: '>=14.0.0'} @@ -1932,15 +1916,6 @@ packages: rollup: 2.79.1 dev: false - /@rollup/plugin-json/4.1.0_rollup@2.79.1: - resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 - dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.79.1 - rollup: 2.79.1 - dev: false - /@rollup/plugin-json/6.0.0_rollup@2.79.1: resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} engines: {node: '>=14.0.0'} @@ -1954,17 +1929,6 @@ packages: rollup: 2.79.1 dev: false - /@rollup/plugin-multi-entry/4.1.0_rollup@2.79.1: - resolution: {integrity: sha512-nellK5pr50W0JA2+bDJbG8F79GBP802J40YRoC0wyfpTAeAn5mJ4eaFiB/MN+YoX9hgb/6RJoZl9leDjZnUFKw==} - engines: {node: '>=10.0.0'} - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 - dependencies: - '@rollup/plugin-virtual': 2.1.0_rollup@2.79.1 - matched: 5.0.1 - rollup: 2.79.1 - dev: false - /@rollup/plugin-multi-entry/6.0.0_rollup@2.79.1: resolution: {integrity: sha512-msBgVncGQwh/ahxeP/rc8MXVZNBOjoVCsBuDk6uqyFzDv/SZN7jksfAsu6DJ2w4r5PaBX3/OXOjVPeCxya2waA==} engines: {node: '>=14.0.0'} @@ -2028,15 +1992,6 @@ packages: typescript: 4.8.4 dev: false - /@rollup/plugin-virtual/2.1.0_rollup@2.79.1: - resolution: {integrity: sha512-CPPAtlKT53HFqC8jFHb/V5WErpU8Hrq2TyCR0A7kPQMlF2wNUf0o1xuAc+Qxj8NCZM0Z3Yvl+FbUXfJjVWqDwA==} - engines: {node: '>=8.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0 - dependencies: - rollup: 2.79.1 - dev: false - /@rollup/plugin-virtual/3.0.1_rollup@2.79.1: resolution: {integrity: sha512-fK8O0IL5+q+GrsMLuACVNk2x21g3yaw+sG2qn16SnUd3IlBsQyvWxLMGHmCmXRMecPjGRSZ/1LmZB4rjQm68og==} engines: {node: '>=14.0.0'} @@ -2258,7 +2213,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/chai-as-promised/7.1.5: @@ -2280,7 +2235,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/cookie/0.4.1: @@ -2290,7 +2245,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/debug/4.1.7: @@ -2302,7 +2257,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/eslint/8.4.10: @@ -2323,7 +2278,7 @@ packages: /@types/express-serve-static-core/4.17.33: resolution: {integrity: sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2340,13 +2295,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/inquirer/8.2.6: @@ -2359,7 +2314,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/json-schema/7.0.11: @@ -2373,13 +2328,13 @@ packages: /@types/jsonwebtoken/9.0.1: resolution: {integrity: sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/linkify-it/3.0.2: @@ -2426,7 +2381,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 form-data: 3.0.1 dev: false @@ -2473,7 +2428,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/semaphore/1.1.1: @@ -2488,7 +2443,7 @@ packages: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/sinon/10.0.13: @@ -2510,13 +2465,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/tough-cookie/4.0.2: @@ -2530,13 +2485,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/underscore/1.11.4: @@ -2554,19 +2509,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false /@types/yargs-parser/21.0.0: @@ -2583,7 +2538,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.38 + '@types/node': 18.15.3 dev: false optional: true @@ -3653,7 +3608,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3942,7 +3897,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.38 + '@types/node': 18.15.3 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4966,7 +4921,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -6261,12 +6216,6 @@ packages: engines: {node: '>=12'} dev: false - /magic-string/0.25.9: - resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} - dependencies: - sourcemap-codec: 1.4.8 - dev: false - /magic-string/0.27.0: resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} engines: {node: '>=12'} @@ -7370,7 +7319,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.38 + '@types/node': 18.15.3 long: 5.2.1 dev: false @@ -8129,11 +8078,6 @@ packages: engines: {node: '>= 8'} dev: false - /sourcemap-codec/1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - deprecated: Please use @jridgewell/sourcemap-codec instead - dev: false - /spawn-command/0.0.2-1: resolution: {integrity: sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==} dev: false @@ -13188,17 +13132,18 @@ packages: dev: false file:projects/arm-monitor.tgz: - resolution: {integrity: sha512-+kZIZf57UFBgwXnvVzcfdy4T/7PaWYW5y7CDPvZDRlR/zzXN/040MHiissaJwQ41X+wf3puS0fdAIbl+Q2U7Kw==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-yCef88EkJoQ4WFA5Ttj0wpICuC0PzfyP7SE3PCWOtVoGJeVdSv5Vhxq+qSlcPLXXFkefil40dZpJuFkBFNvEEg==, tarball: file:projects/arm-monitor.tgz} name: '@rush-temp/arm-monitor' version: 0.0.0 dependencies: + '@azure-tools/test-recorder': 2.0.0 '@azure/arm-operationalinsights': 8.0.1 '@azure/arm-storage': 17.2.1 '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.4_@types+node@14.18.38 - '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 - '@rollup/plugin-json': 4.1.0_rollup@2.79.1 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 + '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 + '@rollup/plugin-json': 6.0.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 '@types/node': 14.18.38 @@ -13214,6 +13159,7 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: + - encoding - supports-color dev: false diff --git a/sdk/monitor/arm-monitor/CHANGELOG.md b/sdk/monitor/arm-monitor/CHANGELOG.md index e77c8b42362d..84c7e9cfe815 100644 --- a/sdk/monitor/arm-monitor/CHANGELOG.md +++ b/sdk/monitor/arm-monitor/CHANGELOG.md @@ -1,56 +1,11 @@ # Release History - -## 8.0.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 8.0.0-beta.4 (2023-02-13) + +## 8.0.0 (2023-03-20) **Features** - Added operation group AzureMonitorWorkspaces - - Added operation group MetricsOperations - Added operation group MonitorOperations - - Added operation group PredictiveMetric - - Added operation ActionGroups.beginCreateNotificationsAtActionGroupResourceLevel - - Added operation ActionGroups.beginCreateNotificationsAtActionGroupResourceLevelAndWait - - Added operation ActionGroups.beginCreateNotificationsAtResourceGroupLevel - - Added operation ActionGroups.beginCreateNotificationsAtResourceGroupLevelAndWait - - Added operation ActionGroups.getTestNotificationsAtActionGroupResourceLevel - - Added operation ActionGroups.getTestNotificationsAtResourceGroupLevel - - Added operation DataCollectionRuleAssociations.listByDataCollectionEndpoint - - Added Interface AccessModeSettings - - Added Interface AccessModeSettingsExclusion - - Added Interface ActionGroup - - Added Interface ActionGroupResource - - Added Interface ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders - - Added Interface ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams - - Added Interface ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders - - Added Interface ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams - - Added Interface ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams - - Added Interface ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams - - Added Interface ActionGroupsPostTestNotificationsHeaders - - Added Interface ActionList - - Added Interface Actions - - Added Interface ActivityLogAlertResource - - Added Interface ActivityLogAlertsListByResourceGroupNextOptionalParams - - Added Interface ActivityLogAlertsListBySubscriptionIdNextOptionalParams - - Added Interface AlertRuleAllOfCondition - - Added Interface AlertRuleAnyOfOrLeafCondition - - Added Interface AlertRuleLeafCondition - - Added Interface AlertRuleList - - Added Interface AlertRulePatchObject - - Added Interface AlertRuleResource - - Added Interface AutoscaleErrorResponse - - Added Interface AutoscaleErrorResponseError - - Added Interface AutoscaleSettingResource - - Added Interface AzureMonitorPrivateLinkScope - Added Interface AzureMonitorWorkspace - Added Interface AzureMonitorWorkspaceDefaultIngestionSettings - Added Interface AzureMonitorWorkspaceMetrics @@ -66,97 +21,19 @@ - Added Interface AzureMonitorWorkspacesListBySubscriptionNextOptionalParams - Added Interface AzureMonitorWorkspacesListBySubscriptionOptionalParams - Added Interface AzureMonitorWorkspacesUpdateOptionalParams - - Added Interface AzureResourceAutoGenerated - - Added Interface ColumnDefinition - - Added Interface Condition - - Added Interface ConditionFailingPeriods - - Added Interface DataCollectionEndpointConfigurationAccess - - Added Interface DataCollectionEndpointLogsIngestion - - Added Interface DataCollectionEndpointNetworkAcls - - Added Interface DataCollectionEndpointResourceProperties - - Added Interface DataCollectionEndpointResourceSystemData - - Added Interface DataCollectionRuleAssociationMetadata - - Added Interface DataCollectionRuleAssociationProxyOnlyResourceProperties - - Added Interface DataCollectionRuleAssociationProxyOnlyResourceSystemData - - Added Interface DataCollectionRuleAssociationsListByDataCollectionEndpointNextOptionalParams - - Added Interface DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams - - Added Interface DataCollectionRuleDataSources - - Added Interface DataCollectionRuleDestinations - - Added Interface DataCollectionRuleMetadata - - Added Interface DataCollectionRuleResourceProperties - - Added Interface DataCollectionRuleResourceSystemData - - Added Interface DefaultErrorResponse - - Added Interface DestinationsSpecAzureMonitorMetrics - - Added Interface DiagnosticSettingsCategoryResource - - Added Interface DiagnosticSettingsResource - - Added Interface DynamicMetricCriteria - - Added Interface ErrorDetailAutoGenerated - - Added Interface ErrorResponseAdditionalInfo - - Added Interface ErrorResponseAutoGenerated - - Added Interface ErrorResponseAutoGenerated2 - - Added Interface ErrorResponseDetails - - Added Interface Identity - - Added Interface IisLogsDataSource - Added Interface IngestionSettings - - Added Interface LocationThresholdRuleCondition - - Added Interface LogFilesDataSource - - Added Interface LogFilesDataSourceSettings - - Added Interface LogFileSettings - - Added Interface LogFileSettingsText - - Added Interface LogFileTextSettings - - Added Interface LogProfileResource - - Added Interface ManagementEventRuleCondition - - Added Interface Metadata - - Added Interface MetricAlertMultipleResourceMultipleMetricCriteria - - Added Interface MetricAlertResource - - Added Interface MetricAlertSingleResourceMultipleMetricCriteria - - Added Interface MetricCriteria - Added Interface Metrics - Added Interface MonitorOperationsListNextOptionalParams - Added Interface MonitorOperationsListOptionalParams - - Added Interface OperationAutoGenerated - - Added Interface OperationDisplayAutoGenerated - - Added Interface OperationListResultAutoGenerated - - Added Interface PredictiveAutoscalePolicy - - Added Interface PredictiveMetricGetOptionalParams - - Added Interface PredictiveResponse - - Added Interface PredictiveValue - Added Interface PrivateEndpoint - Added Interface PrivateEndpointConnection - - Added Interface PrivateLinkResource + - Added Interface PrivateEndpointConnectionProperties + - Added Interface PrivateEndpointConnectionPropertiesAutoGenerated + - Added Interface PrivateEndpointConnectionPropertiesPrivateEndpoint + - Added Interface PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState - Added Interface PrivateLinkServiceConnectionState - - Added Interface ProxyResourceAutoGenerated - - Added Interface ResourceAutoGenerated2 - - Added Interface ResourceAutoGenerated3 - - Added Interface ResourceAutoGenerated4 - - Added Interface ResourceAutoGenerated5 - - Added Interface RuleEmailAction - - Added Interface RuleManagementEventDataSource - - Added Interface RuleMetricDataSource - - Added Interface RuleResolveConfiguration - - Added Interface RuleWebhookAction - - Added Interface ScheduledQueryRuleCriteria - - Added Interface ScheduledQueryRuleResource - - Added Interface ScheduledQueryRuleResourceCollection - - Added Interface ScheduledQueryRuleResourcePatch - - Added Interface ScheduledQueryRulesListByResourceGroupNextOptionalParams - - Added Interface ScheduledQueryRulesListBySubscriptionNextOptionalParams - - Added Interface ScopedResource - - Added Interface StreamDeclaration - - Added Interface ThresholdRuleCondition - Added Interface TrackedResource - - Added Interface TrackedResourceAutoGenerated - - Added Interface UserIdentityProperties - - Added Interface VMInsightsOnboardingStatus - - Added Interface WebtestLocationAvailabilityCriteria - - Added Type Alias AccessMode - - Added Type Alias ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse - - Added Type Alias ActionGroupsCreateNotificationsAtResourceGroupLevelResponse - - Added Type Alias ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse - - Added Type Alias ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse - Added Type Alias ActionType - - Added Type Alias ActivityLogAlertsListByResourceGroupNextResponse - - Added Type Alias ActivityLogAlertsListBySubscriptionIdNextResponse - Added Type Alias AzureMonitorWorkspacesCreateResponse - Added Type Alias AzureMonitorWorkspacesGetResponse - Added Type Alias AzureMonitorWorkspacesListByResourceGroupNextResponse @@ -164,83 +41,119 @@ - Added Type Alias AzureMonitorWorkspacesListBySubscriptionNextResponse - Added Type Alias AzureMonitorWorkspacesListBySubscriptionResponse - Added Type Alias AzureMonitorWorkspacesUpdateResponse - - Added Type Alias DataCollectionRuleAssociationsListByDataCollectionEndpointNextResponse - - Added Type Alias DataCollectionRuleAssociationsListByDataCollectionEndpointResponse - - Added Type Alias DimensionOperator - - Added Type Alias IdentityType - - Added Type Alias Kind - - Added Type Alias KnownColumnDefinitionType - - Added Type Alias KnownLogFilesDataSourceFormat - - Added Type Alias KnownLogFileTextSettingsRecordStartTimestampFormat - Added Type Alias MonitorOperationsListNextResponse - Added Type Alias MonitorOperationsListResponse - Added Type Alias Origin - - Added Type Alias PredictiveAutoscalePolicyScaleMode - - Added Type Alias PredictiveMetricGetResponse - - Added Type Alias PrivateEndpointConnectionProvisioningState - - Added Type Alias PrivateEndpointServiceConnectionStatus - Added Type Alias PublicNetworkAccess - - Added Type Alias ScheduledQueryRulesListByResourceGroupNextResponse - - Added Type Alias ScheduledQueryRulesListBySubscriptionNextResponse - - Added Type Alias TimeAggregation - - Interface AutoscaleSettingResourcePatch has a new optional parameter predictiveAutoscalePolicy - - Interface DataCollectionRule has a new optional parameter dataCollectionEndpointId - - Interface DataCollectionRule has a new optional parameter metadata - - Interface DataCollectionRule has a new optional parameter streamDeclarations - - Interface DataCollectionRuleAssociation has a new optional parameter metadata - - Interface DataCollectionRuleAssociationProxyOnlyResource has a new optional parameter metadata - - Interface DataCollectionRuleResource has a new optional parameter dataCollectionEndpointId - - Interface DataCollectionRuleResource has a new optional parameter metadata - - Interface DataCollectionRuleResource has a new optional parameter streamDeclarations - - Interface DataFlow has a new optional parameter outputStream - - Interface DataFlow has a new optional parameter transformKql - - Interface DataSourcesSpec has a new optional parameter iisLogs - - Interface DataSourcesSpec has a new optional parameter logFiles - - Interface LogSettings has a new optional parameter categoryGroup + - Added Type Alias Status + - Interface ErrorResponse has a new optional parameter error + - Interface MonitorClientOptionalParams has a new optional parameter apiVersion + - Interface Operation has a new optional parameter actionType + - Interface Operation has a new optional parameter isDataAction + - Interface Operation has a new optional parameter origin + - Interface OperationDisplay has a new optional parameter description - Interface Resource has a new optional parameter systemData - - Added Enum KnownAccessMode - Added Enum KnownActionType - - Added Enum KnownCategoryType - - Added Enum KnownDimensionOperator - - Added Enum KnownKind - - Added Enum KnownKnownColumnDefinitionType - - Added Enum KnownKnownLogFilesDataSourceFormat - - Added Enum KnownKnownLogFileTextSettingsRecordStartTimestampFormat - Added Enum KnownOrigin - - Added Enum KnownPrivateEndpointConnectionProvisioningState - - Added Enum KnownPrivateEndpointServiceConnectionStatus - Added Enum KnownPublicNetworkAccess - - Added Enum KnownTimeAggregation + - Added Enum KnownStatus - Enum KnownProvisioningState has a new value Creating - Enum KnownProvisioningState has a new value Deleting - Added function getContinuationToken **Breaking Changes** + - Removed operation group ActionGroups + - Removed operation group ActivityLogAlerts + - Removed operation group ActivityLogs + - Removed operation group AlertRuleIncidents + - Removed operation group AlertRules + - Removed operation group AutoscaleSettings + - Removed operation group Baselines + - Removed operation group DataCollectionEndpoints + - Removed operation group DataCollectionRuleAssociations + - Removed operation group DataCollectionRules + - Removed operation group DiagnosticSettings + - Removed operation group DiagnosticSettingsCategory + - Removed operation group EventCategories + - Removed operation group LogProfiles + - Removed operation group MetricAlerts + - Removed operation group MetricAlertsStatus + - Removed operation group MetricDefinitions + - Removed operation group MetricNamespaces - Removed operation group Metrics - - Operation ActivityLogAlerts.update has a new signature - - Operation ScheduledQueryRules.createOrUpdate has a new signature - - Operation ScheduledQueryRules.update has a new signature - - Interface ActivityLogsListNextOptionalParams no longer has parameter select - - Interface AzureResource no longer has parameter identity - - Interface AzureResource no longer has parameter kind - - Interface PrivateEndpointConnectionListResult no longer has parameter nextLink - - Interface PrivateLinkResourceListResult no longer has parameter nextLink - - Interface ResourceAutoGenerated no longer has parameter etag - - Interface ResourceAutoGenerated no longer has parameter kind - - Interface ScheduledQueryRulesListByResourceGroupOptionalParams no longer has parameter filter - - Interface ScheduledQueryRulesListBySubscriptionOptionalParams no longer has parameter filter - - Interface TenantActivityLogsListNextOptionalParams no longer has parameter filter - - Interface TenantActivityLogsListNextOptionalParams no longer has parameter select - - Type of parameter operator of interface Dimension is changed from Operator to DimensionOperator - - Type of parameter error of interface ErrorContract is changed from ErrorResponse to ErrorResponseDetails - - Type of parameter error of interface OperationStatus is changed from ErrorResponseCommon to ErrorDetail + - Removed operation group Operations + - Removed operation group PrivateEndpointConnections + - Removed operation group PrivateLinkResources + - Removed operation group PrivateLinkScopedResources + - Removed operation group PrivateLinkScopeOperationStatus + - Removed operation group PrivateLinkScopes + - Removed operation group ScheduledQueryRules + - Removed operation group TenantActivityLogs + - Removed operation group VMInsights + - Interface ErrorResponse no longer has parameter code + - Interface ErrorResponse no longer has parameter message + - Interface Resource no longer has parameter location + - Interface Resource no longer has parameter tags + - Class MonitorClient no longer has parameter actionGroups + - Class MonitorClient no longer has parameter activityLogAlerts + - Class MonitorClient no longer has parameter activityLogs + - Class MonitorClient no longer has parameter alertRuleIncidents + - Class MonitorClient no longer has parameter alertRules + - Class MonitorClient no longer has parameter autoscaleSettings + - Class MonitorClient no longer has parameter baselines + - Class MonitorClient no longer has parameter dataCollectionEndpoints + - Class MonitorClient no longer has parameter dataCollectionRuleAssociations + - Class MonitorClient no longer has parameter dataCollectionRules + - Class MonitorClient no longer has parameter diagnosticSettings + - Class MonitorClient no longer has parameter diagnosticSettingsCategory + - Class MonitorClient no longer has parameter eventCategories + - Class MonitorClient no longer has parameter logProfiles + - Class MonitorClient no longer has parameter metricAlerts + - Class MonitorClient no longer has parameter metricAlertsStatus + - Class MonitorClient no longer has parameter metricDefinitions + - Class MonitorClient no longer has parameter metricNamespaces - Class MonitorClient no longer has parameter metrics + - Class MonitorClient no longer has parameter operations + - Class MonitorClient no longer has parameter privateEndpointConnections + - Class MonitorClient no longer has parameter privateLinkResources + - Class MonitorClient no longer has parameter privateLinkScopedResources + - Class MonitorClient no longer has parameter privateLinkScopeOperationStatus + - Class MonitorClient no longer has parameter privateLinkScopes + - Class MonitorClient no longer has parameter scheduledQueryRules + - Class MonitorClient no longer has parameter tenantActivityLogs + - Class MonitorClient no longer has parameter vMInsights + - Removed Enum KnownAggregationTypeEnum + - Removed Enum KnownAlertSeverity + - Removed Enum KnownBaselineSensitivity - Removed Enum KnownConditionalOperator + - Removed Enum KnownCriterionType + - Removed Enum KnownDataStatus + - Removed Enum KnownDynamicThresholdOperator + - Removed Enum KnownDynamicThresholdSensitivity - Removed Enum KnownEnabled + - Removed Enum KnownKnownDataCollectionEndpointProvisioningState + - Removed Enum KnownKnownDataCollectionEndpointResourceKind + - Removed Enum KnownKnownDataCollectionRuleAssociationProvisioningState + - Removed Enum KnownKnownDataCollectionRuleProvisioningState + - Removed Enum KnownKnownDataCollectionRuleResourceKind + - Removed Enum KnownKnownDataFlowStreams + - Removed Enum KnownKnownExtensionDataSourceStreams + - Removed Enum KnownKnownPerfCounterDataSourceStreams + - Removed Enum KnownKnownPublicNetworkAccessOptions + - Removed Enum KnownKnownSyslogDataSourceFacilityNames + - Removed Enum KnownKnownSyslogDataSourceLogLevels + - Removed Enum KnownKnownSyslogDataSourceStreams + - Removed Enum KnownKnownWindowsEventLogDataSourceStreams + - Removed Enum KnownMetricClass - Removed Enum KnownMetricTriggerType + - Removed Enum KnownMetricUnit + - Removed Enum KnownNamespaceClassification + - Removed Enum KnownOdatatype + - Removed Enum KnownOnboardingStatus + - Removed Enum KnownOperator - Removed Enum KnownQueryType - - Enum KnownOperator no longer has value Include + - Removed Enum KnownScaleRuleMetricDimensionOperationType - Enum KnownProvisioningState no longer has value Deploying diff --git a/sdk/monitor/arm-monitor/README.md b/sdk/monitor/arm-monitor/README.md index bc2cd93fe890..1892a0c34952 100644 --- a/sdk/monitor/arm-monitor/README.md +++ b/sdk/monitor/arm-monitor/README.md @@ -6,7 +6,7 @@ Monitor Management Client [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-monitor) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-monitor?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-monitor) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/monitor/arm-monitor/_meta.json b/sdk/monitor/arm-monitor/_meta.json index 1a33dff7f205..1ccf5d3ca66e 100644 --- a/sdk/monitor/arm-monitor/_meta.json +++ b/sdk/monitor/arm-monitor/_meta.json @@ -1,8 +1,8 @@ { - "commit": "dcf548aea9f776d166e8c53f8ecb8eff9beef2a5", + "commit": "28c27c58c9102f08d8a148d54cb5b0f341a93bb6", "readme": "specification/monitor/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\monitor\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.8 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/monitor/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.9", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.0-rc.8" + "use": "@autorest/typescript@6.0.0-rc.9" } \ No newline at end of file diff --git a/sdk/monitor/arm-monitor/package.json b/sdk/monitor/arm-monitor/package.json index b5b8dae89660..783dda697427 100644 --- a/sdk/monitor/arm-monitor/package.json +++ b/sdk/monitor/arm-monitor/package.json @@ -3,13 +3,11 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MonitorClient.", - "version": "8.0.0-beta.5", + "version": "8.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", - "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", @@ -29,9 +27,9 @@ "types": "./types/arm-monitor.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", + "@rollup/plugin-commonjs": "^24.0.0", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", "mkdirp": "^2.1.2", "rollup": "^2.66.1", @@ -41,18 +39,14 @@ "rimraf": "^3.0.0", "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-eventhub": "^5.0.0", - "@azure/arm-logic": "^8.0.0", - "@azure/arm-operationalinsights": "^8.0.0", - "@azure/arm-storage": "^17.0.0" + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -115,13 +109,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-monitor?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor" +} \ No newline at end of file diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_create_parameters_for_diagnosticsettings.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_create_parameters_for_diagnosticsettings.json deleted file mode 100644 index 76f9e271a65c..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_create_parameters_for_diagnosticsettings.json +++ /dev/null @@ -1,1915 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx?api-version=2019-05-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "252", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-logic/8.2.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "56ca967a-2729-4bda-a8f4-05e2f3bcdb1e" - }, - "RequestBody": { - "location": "eastus", - "properties": { - "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "triggers": {}, - "actions": {}, - "outputs": {} - } - } - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1816", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:16:40 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f147f1ed-c6f7-4e64-bb02-f1c22ba3c207", - "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-request-id": "eastus:7243b70f-732d-482f-83ab-8c1374bde91c", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031640Z:f147f1ed-c6f7-4e64-bb02-f1c22ba3c207" - }, - "ResponseBody": { - "properties": { - "provisioningState": "Succeeded", - "createdTime": "2023-02-13T03:16:39.1301561Z", - "changedTime": "2023-02-13T03:16:39.1160723Z", - "state": "Enabled", - "version": "08585253486863865397", - "accessEndpoint": "https://prod-30.eastus.logic.azure.com:443/workflows/a627cbb4679a4cec810ac2c6807ebf86", - "definition": { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "triggers": {}, - "actions": {}, - "outputs": {} - }, - "parameters": {}, - "endpointsConfiguration": { - "workflow": { - "outgoingIpAddresses": [ - { - "address": "13.92.98.111" - }, - { - "address": "40.121.91.41" - }, - { - "address": "40.114.82.191" - }, - { - "address": "23.101.139.153" - }, - { - "address": "23.100.29.190" - }, - { - "address": "23.101.136.201" - }, - { - "address": "104.45.153.81" - }, - { - "address": "23.101.132.208" - }, - { - "address": "52.226.216.197" - }, - { - "address": "52.226.216.187" - }, - { - "address": "40.76.151.25" - }, - { - "address": "40.76.148.50" - }, - { - "address": "20.84.29.29" - }, - { - "address": "20.84.29.18" - }, - { - "address": "40.76.174.83" - }, - { - "address": "40.76.174.39" - } - ], - "accessEndpointIpAddresses": [ - { - "address": "137.135.106.54" - }, - { - "address": "40.117.99.79" - }, - { - "address": "40.117.100.228" - }, - { - "address": "137.116.126.165" - }, - { - "address": "52.226.216.209" - }, - { - "address": "40.76.151.124" - }, - { - "address": "20.84.29.150" - }, - { - "address": "40.76.174.148" - } - ] - }, - "connector": { - "outgoingIpAddresses": [ - { - "address": "40.71.249.139" - }, - { - "address": "40.71.249.205" - }, - { - "address": "40.114.40.132" - }, - { - "address": "40.71.11.80/28" - }, - { - "address": "40.71.15.160/27" - }, - { - "address": "52.188.157.160" - }, - { - "address": "20.88.153.176/28" - }, - { - "address": "20.88.153.192/27" - }, - { - "address": "52.151.221.184" - }, - { - "address": "52.151.221.119" - } - ] - } - } - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx", - "name": "myworkflowxxx", - "type": "Microsoft.Logic/workflows", - "location": "eastus" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy?api-version=2021-09-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "274", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-storage/17.2.1 core-rest-pipeline/1.10.1 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5e446ee7-aece-4840-89a2-751d67052638" - }, - "RequestBody": { - "sku": { - "name": "Standard_GRS" - }, - "kind": "StorageV2", - "location": "eastus", - "tags": { - "key1": "value1", - "key2": "value2" - }, - "properties": { - "encryption": { - "services": { - "blob": { - "enabled": true, - "keyType": "Account" - }, - "file": { - "enabled": true, - "keyType": "Account" - } - }, - "keySource": "Microsoft.Storage" - } - } - }, - "StatusCode": 202, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Content-Type": "text/plain; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:16:44 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/5e968ead-6e66-458b-b8fe-215019b94614?monitor=true\u0026api-version=2021-09-01", - "Pragma": "no-cache", - "Retry-After": "17", - "Server": "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "46c9ec00-ab3e-4fb3-9361-24a712ceff8f", - "x-ms-ratelimit-remaining-subscription-writes": "1198", - "x-ms-request-id": "5e968ead-6e66-458b-b8fe-215019b94614", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031644Z:46c9ec00-ab3e-4fb3-9361-24a712ceff8f" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/5e968ead-6e66-458b-b8fe-215019b94614?monitor=true\u0026api-version=2021-09-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-storage/17.2.1 core-rest-pipeline/1.10.1 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c5716e25-e038-455d-87cb-ff0955492efa" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Content-Type": "text/plain; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:16:44 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/5e968ead-6e66-458b-b8fe-215019b94614?monitor=true\u0026api-version=2021-09-01", - "Pragma": "no-cache", - "Retry-After": "17", - "Server": "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f4234993-c8b6-44c7-96a1-a76218b829e5", - "x-ms-ratelimit-remaining-subscription-reads": "11999", - "x-ms-request-id": "f1d2e956-4e7f-45e6-afd8-0db3682635e9", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031645Z:f4234993-c8b6-44c7-96a1-a76218b829e5" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/5e968ead-6e66-458b-b8fe-215019b94614?monitor=true\u0026api-version=2021-09-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-storage/17.2.1 core-rest-pipeline/1.10.1 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "0de64294-43a4-4f06-a560-9d6df56c54f3" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Content-Type": "text/plain; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:16:45 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/5e968ead-6e66-458b-b8fe-215019b94614?monitor=true\u0026api-version=2021-09-01", - "Pragma": "no-cache", - "Retry-After": "17", - "Server": "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c3b8b52c-ee56-4912-84ba-5eb46cb4f5de", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "1807aa4a-1c94-4765-9d92-e56aff5a3d27", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031645Z:c3b8b52c-ee56-4912-84ba-5eb46cb4f5de" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Storage/locations/eastus/asyncoperations/5e968ead-6e66-458b-b8fe-215019b94614?monitor=true\u0026api-version=2021-09-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-storage/17.2.1 core-rest-pipeline/1.10.1 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "89772e35-1c7b-4fb4-bd0f-7d15ddb7702e" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json", - "Date": "Mon, 13 Feb 2023 03:17:02 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "11a1120c-8e0e-4ae2-b51d-2cfce555d578", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "270b4380-a5d0-4cf8-af31-8f436d6da493", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031702Z:11a1120c-8e0e-4ae2-b51d-2cfce555d578" - }, - "ResponseBody": { - "sku": { - "name": "Standard_GRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "name": "mystorageaccountyyy", - "type": "Microsoft.Storage/storageAccounts", - "location": "eastus", - "tags": { - "key1": "value1", - "key2": "value2" - }, - "properties": { - "keyCreationTime": { - "key1": "2023-02-13T03:16:43.1645826Z", - "key2": "2023-02-13T03:16:43.1645826Z" - }, - "privateEndpointConnections": [], - "minimumTlsVersion": "TLS1_0", - "allowBlobPublicAccess": true, - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "keyType": "Account", - "enabled": true, - "lastEnabledTime": "2023-02-13T03:16:43.1802245Z" - }, - "blob": { - "keyType": "Account", - "enabled": true, - "lastEnabledTime": "2023-02-13T03:16:43.1802245Z" - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot", - "provisioningState": "Succeeded", - "creationTime": "2023-02-13T03:16:43.0083723Z", - "primaryEndpoints": { - "dfs": "https://mystorageaccountyyy.dfs.core.windows.net/", - "web": "https://mystorageaccountyyy.z13.web.core.windows.net/", - "blob": "https://mystorageaccountyyy.blob.core.windows.net/", - "queue": "https://mystorageaccountyyy.queue.core.windows.net/", - "table": "https://mystorageaccountyyy.table.core.windows.net/", - "file": "https://mystorageaccountyyy.file.core.windows.net/" - }, - "primaryLocation": "eastus", - "statusOfPrimary": "available", - "secondaryLocation": "westus", - "statusOfSecondary": "available" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "106", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "f1c38985-b1bd-4e24-bc56-9c2ef34b62a1" - }, - "RequestBody": { - "location": "eastus", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:07 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "95d26ac3-be68-4deb-a2b6-a48445b121ff", - "x-ms-ratelimit-remaining-subscription-resource-requests": "49", - "x-ms-request-id": "bac82c4c-1ee2-4020-b3af-a9ff7304ad47_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031707Z:95d26ac3-be68-4deb-a2b6-a48445b121ff" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cdcfbd5c-c30a-4780-b06a-06493a83758d" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:07 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "94c0cec7-dc87-411c-80c9-b6376af0c686", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "dd140320-eb44-40dd-8e57-dbd8ecb753b4_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031708Z:94c0cec7-dc87-411c-80c9-b6376af0c686" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "79b0e41f-951d-4ebc-a84c-f2f78d1bcf33" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:08 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e3c986af-d4b4-4463-8be9-b4b937454d1c", - "x-ms-ratelimit-remaining-subscription-reads": "11995", - "x-ms-request-id": "cf4b1c39-b934-4a8d-8e66-0356cc44ea54_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031709Z:e3c986af-d4b4-4463-8be9-b4b937454d1c" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "0974423b-c983-470f-82f9-b03fe72f4d8e" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:11 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f3aa6707-31a1-4a51-9a2a-0a7f2a6b4693", - "x-ms-ratelimit-remaining-subscription-reads": "11994", - "x-ms-request-id": "611b28d1-9408-4925-a033-2bb758565b1d_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031711Z:f3aa6707-31a1-4a51-9a2a-0a7f2a6b4693" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "bdad2a96-8ba3-4da0-ba59-3867b345a8d4" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:13 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c4606729-cf9a-4859-a2a2-2db5a6d5556b", - "x-ms-ratelimit-remaining-subscription-reads": "11993", - "x-ms-request-id": "d02a4cbf-c76e-4ebf-9643-a3bab181f96e_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031714Z:c4606729-cf9a-4859-a2a2-2db5a6d5556b" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "61da840c-7bfe-4f70-b2d3-ef04706c125f" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:16 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4a988c8e-a8ad-44dc-814d-e4d2f6c8c2df", - "x-ms-ratelimit-remaining-subscription-reads": "11992", - "x-ms-request-id": "46d0e325-2048-403c-8c57-92ddc298dfd8_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031717Z:4a988c8e-a8ad-44dc-814d-e4d2f6c8c2df" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cd3bd62e-b15e-4b1b-a22e-36d0c20b4f7c" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:19 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d9515426-97ab-4a43-94c4-ab4d8ecac153", - "x-ms-ratelimit-remaining-subscription-reads": "11991", - "x-ms-request-id": "040937ca-e048-4e5f-91d1-059185be44da_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031719Z:d9515426-97ab-4a43-94c4-ab4d8ecac153" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "f95bf964-52bb-421a-afc1-bdf03c6f0050" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:21 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4c1f5747-daee-43ce-ba21-7be85a1024ec", - "x-ms-ratelimit-remaining-subscription-reads": "11990", - "x-ms-request-id": "f2548ba3-4730-489d-add7-8341da9b5f98_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031722Z:4c1f5747-daee-43ce-ba21-7be85a1024ec" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "d28c36b2-06af-4741-a623-134eb4e65d43" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:25 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e869c20f-ab6c-400b-93c9-2fbdfb66dc4f", - "x-ms-ratelimit-remaining-subscription-reads": "11989", - "x-ms-request-id": "3e56cc72-0a68-4b6c-bdbc-c0da90a55be6_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031726Z:e869c20f-ab6c-400b-93c9-2fbdfb66dc4f" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "8bb404ef-1151-4669-9e79-de91896cca89" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:27 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c776e520-4421-4184-a848-4f5ceb9c0162", - "x-ms-ratelimit-remaining-subscription-reads": "11988", - "x-ms-request-id": "00b76657-0a26-429d-b863-58ba463716cd_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031728Z:c776e520-4421-4184-a848-4f5ceb9c0162" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5453bb75-fc1a-42d7-8277-24c7ab77ad61" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:31 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "bd62a37d-e5f9-4bc1-84d5-3965962b95f3", - "x-ms-ratelimit-remaining-subscription-reads": "11987", - "x-ms-request-id": "2eac7144-92dd-4d0a-9076-127cfb85ec44_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031731Z:bd62a37d-e5f9-4bc1-84d5-3965962b95f3" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ae526062-d6dd-43f4-b39b-7fae42e7083c" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:34 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9cfb3df2-6eea-45b2-99cb-282acff59744", - "x-ms-ratelimit-remaining-subscription-reads": "11986", - "x-ms-request-id": "fb1fe79f-535e-4cf9-bbd0-69cc2a3411d4_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031734Z:9cfb3df2-6eea-45b2-99cb-282acff59744" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7bf0881c-8269-4601-bb79-cfbd27bb4185" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:36 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c7eb4b97-b4a9-4fc9-977a-8dbca7954a7e", - "x-ms-ratelimit-remaining-subscription-reads": "11985", - "x-ms-request-id": "9f421275-e304-4fa1-ae22-9a9efc4dfa97_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031736Z:c7eb4b97-b4a9-4fc9-977a-8dbca7954a7e" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "29218200-fc5b-4b42-b6d1-824f87c38877" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:39 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "fd305722-2793-4aa5-a86c-8b390d742b7f", - "x-ms-ratelimit-remaining-subscription-reads": "11984", - "x-ms-request-id": "cfa11e90-0e6d-477c-b5e5-4bba550f99b3_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031739Z:fd305722-2793-4aa5-a86c-8b390d742b7f" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cd3df8b7-f5ad-459b-b855-5d68b69232cd" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:42 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d6ea64ad-adf5-4ba7-8c26-c3ce51203bde", - "x-ms-ratelimit-remaining-subscription-reads": "11983", - "x-ms-request-id": "069fcfc4-56b1-420b-8bde-9d766979c3cd_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031742Z:d6ea64ad-adf5-4ba7-8c26-c3ce51203bde" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "de0f02d3-3867-4ecd-acc7-0e6fd3bdb742" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:44 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7758da39-23e8-4926-b4a0-3448056a39c5", - "x-ms-ratelimit-remaining-subscription-reads": "11982", - "x-ms-request-id": "a0bfa0f1-a82c-467d-9d85-31e54f62c4d3_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031744Z:7758da39-23e8-4926-b4a0-3448056a39c5" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "93cb2887-186f-4b25-af1d-4fa7bf267fc5" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:47 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d538fac9-b12f-43c4-b462-3a8ed8799d21", - "x-ms-ratelimit-remaining-subscription-reads": "11981", - "x-ms-request-id": "301d81ba-e9bd-4c78-8085-ac189d12889f_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031747Z:d538fac9-b12f-43c4-b462-3a8ed8799d21" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a771f882-6814-44f9-a422-a05b1a4cc183" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:50 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "0fd877cc-0ff9-4384-80d3-cbe479eb04db", - "x-ms-ratelimit-remaining-subscription-reads": "11980", - "x-ms-request-id": "a0f80110-97ee-4f9a-89b6-40c21d857c82_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031750Z:0fd877cc-0ff9-4384-80d3-cbe479eb04db" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "415ad79a-cdb1-442f-9916-ccc678bb7442" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:53 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e9a3961c-12c0-4565-bd0c-b8675103828c", - "x-ms-ratelimit-remaining-subscription-reads": "11979", - "x-ms-request-id": "310c16bd-1e50-4a18-8e04-6251bb1b0798_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031753Z:e9a3961c-12c0-4565-bd0c-b8675103828c" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Created", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:05.337Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Activating" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "32f5188f-2173-49d6-a652-56404d4dae98" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:17:55 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/SN1", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/SN1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "46e587d8-578d-4bb1-b50f-2f0af3e4ecf2", - "x-ms-ratelimit-remaining-subscription-reads": "11978", - "x-ms-request-id": "826e04ba-7571-4cfa-a899-57623c9f76d3_M11SN1_M11SN1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031756Z:46e587d8-578d-4bb1-b50f-2f0af3e4ecf2" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Succeeded", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:17:54.25Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Active" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/authorizationRules/myauthorizationRulexxx?api-version=2021-11-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "52", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "3887e5c1-c542-402f-a47c-7fa982dc67a5" - }, - "RequestBody": { - "properties": { - "rights": [ - "Listen", - "Send", - "Manage" - ] - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:04 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "cf3857ac-d053-490d-86ef-1d052d594d1a", - "x-ms-ratelimit-remaining-subscription-writes": "1197", - "x-ms-request-id": "cf3857ac-d053-490d-86ef-1d052d594d1a", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031804Z:cf3857ac-d053-490d-86ef-1d052d594d1a" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/authorizationRules/myauthorizationRulexxx", - "name": "myauthorizationRulexxx", - "type": "Microsoft.EventHub/Namespaces/AuthorizationRules", - "location": "eastus", - "properties": { - "rights": [ - "Listen", - "Send", - "Manage" - ] - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/eventhubs/myeventhubxxx?api-version=2021-11-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "546", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "8c5880ea-1e52-4fcc-962d-ca243af8d372" - }, - "RequestBody": { - "properties": { - "messageRetentionInDays": 4, - "partitionCount": 4, - "status": "Active", - "captureDescription": { - "enabled": true, - "encoding": "Avro", - "intervalInSeconds": 120, - "sizeLimitInBytes": 10485763, - "destination": { - "name": "EventHubArchive.AzureBlockBlob", - "properties": { - "storageAccountResourceId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "blobContainer": "container", - "archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}" - } - } - } - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:06 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "49501027-f9cf-46c2-9bc6-2735827c5042", - "x-ms-ratelimit-remaining-subscription-writes": "1196", - "x-ms-request-id": "49501027-f9cf-46c2-9bc6-2735827c5042", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031807Z:49501027-f9cf-46c2-9bc6-2735827c5042" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/eventhubs/myeventhubxxx", - "name": "myeventhubxxx", - "type": "Microsoft.EventHub/namespaces/eventhubs", - "location": "eastus", - "properties": { - "messageRetentionInDays": 4, - "partitionCount": 4, - "status": "Active", - "createdAt": "2023-02-13T03:18:06.607Z", - "updatedAt": "2023-02-13T03:18:06.95Z", - "partitionIds": [ - "0", - "1", - "2", - "3" - ], - "captureDescription": { - "enabled": true, - "encoding": "Avro", - "destination": { - "name": "EventHubArchive.AzureBlockBlob", - "properties": { - "storageAccountResourceId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "blobContainer": "container", - "archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}" - } - }, - "intervalInSeconds": 120, - "sizeLimitInBytes": 10485763 - } - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/Microsoft.OperationalInsights/workspaces/myworkspacexxx?api-version=2021-06-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "107", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-operationalinsights/8.0.1 core-rest-pipeline/1.10.1 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "155a2358-ae16-4c5f-b9d6-d34a08525f42" - }, - "RequestBody": { - "tags": { - "tag1": "value1" - }, - "location": "eastus", - "properties": { - "sku": { - "name": "PerNode" - }, - "retentionInDays": 30 - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "Access-Control-Allow-Origin": "*", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json", - "Date": "Mon, 13 Feb 2023 03:18:12 GMT", - "Pragma": "no-cache", - "Request-Context": "appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a52b9f72-51a7-4a24-a57b-9a1d31f761d9", - "x-ms-ratelimit-remaining-subscription-writes": "1195", - "x-ms-request-id": "c285062f-78b8-431f-960c-5b6cfb2cd486", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031813Z:a52b9f72-51a7-4a24-a57b-9a1d31f761d9", - "X-Powered-By": [ - "ASP.NET", - "ASP.NET" - ] - }, - "ResponseBody": { - "properties": { - "source": "Azure", - "customerId": "fb7c7b05-2efb-4adf-b304-a6de55ef8436", - "provisioningState": "Succeeded", - "sku": { - "name": "pergb2018", - "lastSkuUpdate": "Sun, 29 Jan 2023 08:04:29 GMT" - }, - "retentionInDays": 30, - "features": { - "legacy": 0, - "searchVersion": 1, - "enableLogAccessUsingOnlyResourcePermissions": true - }, - "workspaceCapping": { - "dailyQuotaGb": -1.0, - "quotaNextResetTime": "Mon, 13 Feb 2023 12:00:00 GMT", - "dataIngestionStatus": "RespectQuota" - }, - "publicNetworkAccessForIngestion": "Enabled", - "publicNetworkAccessForQuery": "Enabled", - "createdDate": "Sun, 29 Jan 2023 08:04:29 GMT", - "modifiedDate": "Sun, 29 Jan 2023 08:25:39 GMT" - }, - "id": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.operationalinsights/workspaces/myworkspacexxx", - "name": "myworkspacexxx", - "type": "Microsoft.OperationalInsights/workspaces", - "location": "eastus", - "tags": { - "tag1": "value1" - } - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_delete_parameters_for_diagnosticsettings.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_delete_parameters_for_diagnosticsettings.json deleted file mode 100644 index 9f293af6f1f9..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_delete_parameters_for_diagnosticsettings.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx?api-version=2019-05-01", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-logic/8.2.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "fe435ef1-7fe1-45a1-ad58-11838d2aa07a" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 13 Feb 2023 03:18:36 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d58aedea-4983-4bc0-98fd-8b910d318449", - "x-ms-ratelimit-remaining-subscription-deletes": "14998", - "x-ms-request-id": "eastus:f206ede3-53ba-47fa-912f-286351e67353", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031837Z:d58aedea-4983-4bc0-98fd-8b910d318449" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy?api-version=2021-09-01", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-storage/17.2.1 core-rest-pipeline/1.10.1 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "345a554e-8d4f-4721-a869-7afb90fdb0d4" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Content-Type": "text/plain; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:43 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "14636c65-549c-40f0-9cae-65fbf679f03d", - "x-ms-ratelimit-remaining-subscription-deletes": "14997", - "x-ms-request-id": "00f8dbf1-1a34-42a6-8975-f0fa165cf7f0", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031843Z:14636c65-549c-40f0-9cae-65fbf679f03d" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "27af8b52-b47c-44f1-b97e-f6c3a5c677f4" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 13 Feb 2023 03:18:46 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx?api-version=2021-11-01", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/CH3", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/CH3", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "0b86c4d5-7321-4587-a350-9d05f1379c6f", - "x-ms-ratelimit-remaining-subscription-deletes": "14996", - "x-ms-request-id": "be32b58b-54bc-45a7-9864-818b1b21ca54_M2CH3_M2CH3", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031846Z:0b86c4d5-7321-4587-a350-9d05f1379c6f" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "f8b6eeca-7d5e-4ba0-868b-8d9dc7ae7360" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "698", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:47 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx?api-version=2021-11-01", - "Pragma": "no-cache", - "Retry-After": "48", - "Server": [ - "Service-Bus-Resource-Provider/CH3", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/CH3", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9c6be69d-9dea-4924-871a-b6f1b2385cf4", - "x-ms-ratelimit-remaining-subscription-reads": "11973", - "x-ms-request-id": "50acf2a8-0d7c-4dea-81df-d86ba6a0c4d8_M2CH3_M2CH3", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031847Z:9c6be69d-9dea-4924-871a-b6f1b2385cf4" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Succeeded", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:18:46.087Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Removing" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "08c543ed-9663-4060-a74c-a075cae91c75" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "698", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:47 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx?api-version=2021-11-01", - "Pragma": "no-cache", - "Retry-After": "34", - "Server": [ - "Service-Bus-Resource-Provider/CH3", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/CH3", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "3382234e-dd83-4f04-936f-002e5b23eb8b", - "x-ms-ratelimit-remaining-subscription-reads": "11972", - "x-ms-request-id": "fd79fd2e-ecd0-41e3-b6ae-f21f4b2c23da_M2CH3_M2CH3", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031847Z:3382234e-dd83-4f04-936f-002e5b23eb8b" - }, - "ResponseBody": { - "sku": { - "name": "Standard", - "tier": "Standard", - "capacity": 1 - }, - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx", - "name": "mynamespacexxx", - "type": "Microsoft.EventHub/Namespaces", - "location": "East US", - "tags": { - "tag1": "value1", - "tag2": "value2" - }, - "properties": { - "disableLocalAuth": false, - "zoneRedundant": false, - "isAutoInflateEnabled": false, - "maximumThroughputUnits": 0, - "kafkaEnabled": true, - "provisioningState": "Succeeded", - "metricId": "azure_subscription_id:mynamespacexxx", - "createdAt": "2023-02-13T03:17:05.337Z", - "updatedAt": "2023-02-13T03:18:46.087Z", - "serviceBusEndpoint": "https://mynamespacexxx.servicebus.windows.net:443/", - "status": "Removing" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/operationresults/mynamespacexxx?api-version=2021-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-eventhub/5.1.1 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "dcd13a7e-99fb-4261-bdbc-fd39cfd15953" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 13 Feb 2023 03:19:21 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": [ - "Service-Bus-Resource-Provider/CH3", - "Microsoft-HTTPAPI/2.0" - ], - "Server-SB": "Service-Bus-Resource-Provider/CH3", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "0cae64fb-e253-45bb-85b0-d9701458ff49", - "x-ms-ratelimit-remaining-subscription-reads": "11971", - "x-ms-request-id": "df85f407-6901-4a86-b058-16929d8482ae_M2CH3_M2CH3", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031922Z:0cae64fb-e253-45bb-85b0-d9701458ff49" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/Microsoft.OperationalInsights/workspaces/myworkspacexxx?api-version=2021-06-01", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-operationalinsights/8.0.1 core-rest-pipeline/1.10.1 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "89f26b93-2dd8-4800-8ed2-06d10fd916ec" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Access-Control-Allow-Origin": "*", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 13 Feb 2023 03:19:29 GMT", - "Pragma": "no-cache", - "Request-Context": "appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "26c251b2-412f-4957-90b5-3a821cbc0efd", - "x-ms-ratelimit-remaining-subscription-deletes": "14995", - "x-ms-request-id": "910ba725-08ef-46d3-9bf5-59d6ea905c29", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031929Z:26c251b2-412f-4957-90b5-3a821cbc0efd", - "X-Powered-By": [ - "ASP.NET", - "ASP.NET" - ] - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_create_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_create_test.json deleted file mode 100644 index e159382e12f2..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_create_test.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx/providers/Microsoft.Insights/diagnosticSettings/mydiagnosticxxxx?api-version=2021-05-01-preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "639", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "49e182b6-0c73-48da-b5ac-6baff34f63d3" - }, - "RequestBody": { - "properties": { - "storageAccountId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "eventHubAuthorizationRuleId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/authorizationRules/myauthorizationRulexxx", - "eventHubName": "myeventhubxxx", - "metrics": [], - "logs": [ - { - "category": "WorkflowRuntime", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ], - "workspaceId": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.operationalinsights/workspaces/myworkspacexxx" - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:18 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7fa5d1dd-d167-43b8-b43f-1e2d5c3b862b", - "x-ms-ratelimit-remaining-subscription-resource-requests": "149", - "x-ms-request-id": "24ba9da1-e808-49e6-a690-b9e42d68b681", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031819Z:7fa5d1dd-d167-43b8-b43f-1e2d5c3b862b" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.logic/workflows/myworkflowxxx/providers/microsoft.insights/diagnosticSettings/mydiagnosticxxxx", - "type": "Microsoft.Insights/diagnosticSettings", - "name": "mydiagnosticxxxx", - "location": null, - "kind": null, - "tags": null, - "properties": { - "storageAccountId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "serviceBusRuleId": null, - "workspaceId": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.operationalinsights/workspaces/myworkspacexxx", - "eventHubAuthorizationRuleId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/authorizationRules/myauthorizationRulexxx", - "eventHubName": "myeventhubxxx", - "metrics": [], - "logs": [ - { - "category": "WorkflowRuntime", - "categoryGroup": null, - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ], - "logAnalyticsDestinationType": null - }, - "identity": null - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_delete_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_delete_test.json deleted file mode 100644 index e50f9bb98f28..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_delete_test.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx/providers/Microsoft.Insights/diagnosticSettings/mydiagnosticxxxx?api-version=2021-05-01-preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "3baf1cd2-ce54-40a3-93e9-3838e8eb98f5" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 13 Feb 2023 03:18:22 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "51e56189-a0cd-4003-9e57-fe9d6cdc3a91", - "x-ms-ratelimit-remaining-subscription-deletes": "14999", - "x-ms-request-id": "9fd57e3e-c312-4b3c-a824-38ffe8fe1266", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031823Z:51e56189-a0cd-4003-9e57-fe9d6cdc3a91" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_get_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_get_test.json deleted file mode 100644 index 251c0aecc54f..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_get_test.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Logic/workflows/myworkflowxxx/providers/Microsoft.Insights/diagnosticSettings/mydiagnosticxxxx?api-version=2021-05-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7d7021a6-f73e-4094-af01-815c45a2b3b9" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:19 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b09d9617-420a-4f9a-aeca-445b3e3e9749", - "x-ms-ratelimit-remaining-subscription-reads": "11977", - "x-ms-request-id": "fbf932d1-6e1b-4918-886a-375c5217a877", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031820Z:b09d9617-420a-4f9a-aeca-445b3e3e9749" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.logic/workflows/myworkflowxxx/providers/microsoft.insights/diagnosticSettings/mydiagnosticxxxx", - "type": "Microsoft.Insights/diagnosticSettings", - "name": "mydiagnosticxxxx", - "location": null, - "kind": null, - "tags": null, - "properties": { - "storageAccountId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "serviceBusRuleId": null, - "workspaceId": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.operationalinsights/workspaces/myworkspacexxx", - "eventHubAuthorizationRuleId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.EventHub/namespaces/mynamespacexxx/authorizationRules/myauthorizationRulexxx", - "eventHubName": "myeventhubxxx", - "metrics": [ - { - "category": "AllMetrics", - "enabled": false, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ], - "logs": [ - { - "category": "WorkflowRuntime", - "categoryGroup": null, - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ], - "logAnalyticsDestinationType": null - }, - "identity": null - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_list_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_list_test.json deleted file mode 100644 index f721723386d8..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_diagnosticsettings_list_test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Entries": [], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_create_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_create_test.json deleted file mode 100644 index dea762ce20c9..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_create_test.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles?api-version=2016-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "b2b0eed7-2bb0-4c9c-bfad-e1f220463244" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:23 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ac92f551-8004-4efd-83a1-93db6948cdc3", - "x-ms-ratelimit-remaining-subscription-reads": "11976", - "x-ms-request-id": "0ac0e91f-3c34-454d-8246-98b08554727f", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031824Z:ac92f551-8004-4efd-83a1-93db6948cdc3" - }, - "ResponseBody": { - "value": [] - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles/mylogProfilexxx?api-version=2016-03-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "284", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "507c5992-e7d7-4c67-abe4-fa2a4ff826f3" - }, - "RequestBody": { - "location": "", - "properties": { - "storageAccountId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "locations": [ - "global" - ], - "categories": [ - "Write", - "Delete", - "Action" - ], - "retentionPolicy": { - "enabled": true, - "days": 3 - } - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:26 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "061a1f29-aec7-43a6-9f4d-6b59f674136f", - "x-ms-ratelimit-remaining-subscription-writes": "1194", - "x-ms-request-id": "6fd43295-31de-4012-905b-284ace981681", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031827Z:061a1f29-aec7-43a6-9f4d-6b59f674136f" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/microsoft.insights/logprofiles/mylogProfilexxx", - "type": null, - "name": "mylogProfilexxx", - "location": "", - "kind": null, - "tags": null, - "properties": { - "storageAccountId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "serviceBusRuleId": null, - "locations": [ - "global" - ], - "categories": [ - "Write", - "Delete", - "Action" - ], - "retentionPolicy": { - "enabled": true, - "days": 3 - } - }, - "identity": null - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_delete_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_delete_test.json deleted file mode 100644 index 2c2f3ce9f963..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_delete_test.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles/mylogProfilexxx?api-version=2016-03-01", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "57cbd746-e85d-42aa-8d52-c598e1f39647" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 13 Feb 2023 03:19:31 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "bf9e98c7-5bde-4b42-bdc8-16ac2bdbfe16", - "x-ms-ratelimit-remaining-subscription-deletes": "14994", - "x-ms-request-id": "40a511e7-33ae-497e-a4d3-17fd8c4b0523", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031931Z:bf9e98c7-5bde-4b42-bdc8-16ac2bdbfe16" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles?api-version=2016-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "381b3d5e-9272-44dd-a7ec-6ebb782a5dfe" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:19:31 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d14307b2-b8fe-4d6d-9b67-60c949fc8a6d", - "x-ms-ratelimit-remaining-subscription-reads": "11970", - "x-ms-request-id": "33412f1e-1bbe-4e1e-ba15-cbada8eb2c26", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031932Z:d14307b2-b8fe-4d6d-9b67-60c949fc8a6d" - }, - "ResponseBody": { - "value": [ - { - "id": "/subscriptions/azure_subscription_id/providers/microsoft.insights/logprofiles/mylogprofilexxx", - "type": null, - "name": "mylogprofilexxx", - "location": null, - "kind": null, - "tags": null, - "properties": { - "storageAccountId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "serviceBusRuleId": null, - "locations": [ - "global" - ], - "categories": [ - "Write", - "Delete", - "Action" - ], - "retentionPolicy": { - "enabled": true, - "days": 3 - } - }, - "identity": null - } - ] - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_get_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_get_test.json deleted file mode 100644 index e6bed7f55b0f..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_get_test.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles/mylogProfilexxx?api-version=2016-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "fdb94995-94a8-4778-8f8f-2f40b941856e" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:27 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2ae5a5a2-f472-46f1-9f04-00958a0e2e3d", - "x-ms-ratelimit-remaining-subscription-reads": "11975", - "x-ms-request-id": "d8256c6c-191f-4531-989a-dfd05ba85b07", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031828Z:2ae5a5a2-f472-46f1-9f04-00958a0e2e3d" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/microsoft.insights/logprofiles/mylogProfilexxx", - "type": null, - "name": "mylogProfilexxx", - "location": null, - "kind": null, - "tags": null, - "properties": { - "storageAccountId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "serviceBusRuleId": null, - "locations": [ - "global" - ], - "categories": [ - "Write", - "Delete", - "Action" - ], - "retentionPolicy": { - "enabled": true, - "days": 3 - } - }, - "identity": null - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_list_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_list_test.json deleted file mode 100644 index f89cc775519a..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_logprofiles_list_test.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.Insights/logprofiles?api-version=2016-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "50a850fe-e8d4-48d9-a6e6-5be05c344748" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 13 Feb 2023 03:18:28 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ca8dede3-34a8-4b84-90f4-eb4697bc8a1a", - "x-ms-ratelimit-remaining-subscription-reads": "11974", - "x-ms-request-id": "e35a0a72-3d6a-4fbf-83a8-968e19ef200c", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230213T031829Z:ca8dede3-34a8-4b84-90f4-eb4697bc8a1a" - }, - "ResponseBody": { - "value": [ - { - "id": "/subscriptions/azure_subscription_id/providers/microsoft.insights/logprofiles/mylogprofilexxx", - "type": null, - "name": "mylogprofilexxx", - "location": null, - "kind": null, - "tags": null, - "properties": { - "storageAccountId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Storage/storageAccounts/mystorageaccountyyy", - "serviceBusRuleId": null, - "locations": [ - "global" - ], - "categories": [ - "Write", - "Delete", - "Action" - ], - "retentionPolicy": { - "enabled": true, - "days": 3 - } - }, - "identity": null - } - ] - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_create_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_create_test.json deleted file mode 100644 index b31ab64df104..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_create_test.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Monitor/accounts/myAzureMonitorWorkspace?api-version=2021-06-03-preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "21", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.3 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5c30bed4-7f27-45f8-84f0-6086b1d40e0e" - }, - "RequestBody": { - "location": "eastus" - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-06-01-preview, 2021-06-03-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 07 Mar 2023 08:50:57 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Request-Context": "appId=cid-v1:74683e7d-3ee8-4856-bfe7-e63c83b6737e", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "79de32e0-acf7-4b38-aa81-2ddd8fe9f597", - "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-request-id": "79de32e0-acf7-4b38-aa81-2ddd8fe9f597", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230307T085057Z:79de32e0-acf7-4b38-aa81-2ddd8fe9f597" - }, - "ResponseBody": { - "properties": { - "accountId": "469d1399-c0ea-4aed-acca-a8d765eed6fa", - "metrics": { - "prometheusQueryEndpoint": "https://myazuremonitorworkspace-4thn.eastus.prometheus.monitor.azure.com", - "internalId": "mac_469d1399-c0ea-4aed-acca-a8d765eed6fa" - }, - "provisioningState": "Succeeded", - "defaultIngestionSettings": { - "dataCollectionRuleResourceId": "/subscriptions/azure_subscription_id/resourceGroups/MA_myazuremonitorworkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionRules/myazuremonitorworkspace", - "dataCollectionEndpointResourceId": "/subscriptions/azure_subscription_id/resourceGroups/MA_myazuremonitorworkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionEndpoints/myazuremonitorworkspace" - }, - "publicNetworkAccess": "Enabled" - }, - "location": "eastus", - "id": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.monitor/accounts/myazuremonitorworkspace", - "name": "myAzureMonitorWorkspace", - "type": "Microsoft.Monitor/accounts", - "etag": "\u0022c000066c-0000-0100-0000-6406faef0000\u0022", - "systemData": { - "createdBy": "azure_client_id", - "createdByType": "Application", - "createdAt": "2023-03-07T08:50:46.3984724Z", - "lastModifiedBy": "azure_client_id", - "lastModifiedByType": "Application", - "lastModifiedAt": "2023-03-07T08:50:46.3984724Z" - } - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_delete_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_delete_test.json deleted file mode 100644 index 1ef841df228f..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_delete_test.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Monitor/accounts/myAzureMonitorWorkspace?api-version=2021-06-03-preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.3 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "0b8ca247-0ce4-4527-a093-d4f1304388bc" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-06-01-preview, 2021-06-03-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Tue, 07 Mar 2023 08:52:26 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Request-Context": "appId=cid-v1:74683e7d-3ee8-4856-bfe7-e63c83b6737e", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "828e09ae-b014-4cd2-8a4a-34792084ce66", - "x-ms-ratelimit-remaining-subscription-deletes": "14998", - "x-ms-request-id": "828e09ae-b014-4cd2-8a4a-34792084ce66", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230307T085226Z:828e09ae-b014-4cd2-8a4a-34792084ce66" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Monitor/accounts?api-version=2021-06-03-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.3 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "49931f00-9d74-4e0f-bcab-577536a1e440" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "12", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 07 Mar 2023 08:52:26 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Vary": "Accept-Encoding", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "61657585-eaca-4f45-87a6-5337130374b2", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "61657585-eaca-4f45-87a6-5337130374b2", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230307T085226Z:61657585-eaca-4f45-87a6-5337130374b2" - }, - "ResponseBody": { - "value": [] - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_get_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_get_test.json deleted file mode 100644 index ed42355ebcbe..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_get_test.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Monitor/accounts/myAzureMonitorWorkspace?api-version=2021-06-03-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.3 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "66b00649-81fc-47b1-81cc-19a2e854e5d5" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-06-01-preview, 2021-06-03-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 07 Mar 2023 08:50:58 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Request-Context": "appId=cid-v1:74683e7d-3ee8-4856-bfe7-e63c83b6737e", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b68b1484-c78e-457b-9a5e-fabe073b97e9", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "b68b1484-c78e-457b-9a5e-fabe073b97e9", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230307T085059Z:b68b1484-c78e-457b-9a5e-fabe073b97e9" - }, - "ResponseBody": { - "properties": { - "accountId": "469d1399-c0ea-4aed-acca-a8d765eed6fa", - "metrics": { - "prometheusQueryEndpoint": "https://myazuremonitorworkspace-4thn.eastus.prometheus.monitor.azure.com", - "internalId": "mac_469d1399-c0ea-4aed-acca-a8d765eed6fa" - }, - "provisioningState": "Succeeded", - "defaultIngestionSettings": { - "dataCollectionRuleResourceId": "/subscriptions/azure_subscription_id/resourceGroups/MA_myazuremonitorworkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionRules/myazuremonitorworkspace", - "dataCollectionEndpointResourceId": "/subscriptions/azure_subscription_id/resourceGroups/MA_myazuremonitorworkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionEndpoints/myazuremonitorworkspace" - }, - "publicNetworkAccess": "Enabled" - }, - "location": "eastus", - "id": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.monitor/accounts/myazuremonitorworkspace", - "name": "myAzureMonitorWorkspace", - "type": "Microsoft.Monitor/accounts", - "etag": "\u0022c000066c-0000-0100-0000-6406faef0000\u0022", - "systemData": { - "createdBy": "azure_client_id", - "createdByType": "Application", - "createdAt": "2023-03-07T08:50:46.3984724Z", - "lastModifiedBy": "azure_client_id", - "lastModifiedByType": "Application", - "lastModifiedAt": "2023-03-07T08:50:46.3984724Z" - } - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_list_test.json b/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_list_test.json deleted file mode 100644 index 973b9ce40781..000000000000 --- a/sdk/monitor/arm-monitor/recordings/node/monitor_test/recording_workspace_list_test.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Monitor/accounts?api-version=2021-06-03-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-monitor/8.0.0-beta.4 core-rest-pipeline/1.10.3 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "906726e2-4e50-4d0c-a7b2-8f8d8bfa68b2" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-06-01-preview, 2021-06-03-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 07 Mar 2023 08:51:00 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Request-Context": "appId=cid-v1:74683e7d-3ee8-4856-bfe7-e63c83b6737e", - "Server": "Microsoft-HTTPAPI/2.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "3935d163-7338-4d00-b876-3256e927749b", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "3935d163-7338-4d00-b876-3256e927749b", - "x-ms-routing-request-id": "SOUTHEASTASIA:20230307T085100Z:3935d163-7338-4d00-b876-3256e927749b" - }, - "ResponseBody": { - "value": [ - { - "properties": { - "accountId": "469d1399-c0ea-4aed-acca-a8d765eed6fa", - "metrics": { - "prometheusQueryEndpoint": "https://myazuremonitorworkspace-4thn.eastus.prometheus.monitor.azure.com", - "internalId": "mac_469d1399-c0ea-4aed-acca-a8d765eed6fa" - }, - "provisioningState": "Succeeded", - "defaultIngestionSettings": { - "dataCollectionRuleResourceId": "/subscriptions/azure_subscription_id/resourceGroups/MA_myazuremonitorworkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionRules/myazuremonitorworkspace", - "dataCollectionEndpointResourceId": "/subscriptions/azure_subscription_id/resourceGroups/MA_myazuremonitorworkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionEndpoints/myazuremonitorworkspace" - }, - "publicNetworkAccess": "Enabled" - }, - "location": "eastus", - "id": "/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/microsoft.monitor/accounts/myazuremonitorworkspace", - "name": "myAzureMonitorWorkspace", - "type": "Microsoft.Monitor/accounts", - "etag": "\u0022c000066c-0000-0100-0000-6406faef0000\u0022", - "systemData": { - "createdBy": "azure_client_id", - "createdByType": "Application", - "createdAt": "2023-03-07T08:50:46.3984724Z", - "lastModifiedBy": "azure_client_id", - "lastModifiedByType": "Application", - "lastModifiedAt": "2023-03-07T08:50:46.3984724Z" - } - } - ], - "nextLink": null - } - } - ], - "Variables": {} -} diff --git a/sdk/monitor/arm-monitor/review/arm-monitor.api.md b/sdk/monitor/arm-monitor/review/arm-monitor.api.md index fd3bea84ffb9..3ebef1672eda 100644 --- a/sdk/monitor/arm-monitor/review/arm-monitor.api.md +++ b/sdk/monitor/arm-monitor/review/arm-monitor.api.md @@ -6,3573 +6,341 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; -import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { SimplePollerLike } from '@azure/core-lro'; // @public -export type AccessMode = string; - -// @public -export interface AccessModeSettings { - exclusions?: AccessModeSettingsExclusion[]; - ingestionAccessMode: AccessMode; - queryAccessMode: AccessMode; -} +export type ActionType = string; // @public -export interface AccessModeSettingsExclusion { - ingestionAccessMode?: AccessMode; - privateEndpointConnectionName?: string; - queryAccessMode?: AccessMode; +export interface AzureMonitorWorkspace { + readonly accountId?: string; + readonly defaultIngestionSettings?: AzureMonitorWorkspaceDefaultIngestionSettings; + readonly metrics?: AzureMonitorWorkspaceMetrics; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + readonly provisioningState?: ProvisioningState; + readonly publicNetworkAccess?: PublicNetworkAccess; } // @public -export interface ActionDetail { - detail?: string; - mechanismType?: string; - name?: string; - sendTime?: string; - status?: string; - subState?: string; +export interface AzureMonitorWorkspaceDefaultIngestionSettings extends IngestionSettings { } // @public -export interface ActionGroup { - actionGroupId: string; - webhookProperties?: { - [propertyName: string]: string; - }; +export interface AzureMonitorWorkspaceMetrics extends Metrics { } // @public -export interface ActionGroupList { - nextLink?: string; - value?: ActionGroupResource[]; +export interface AzureMonitorWorkspaceResource extends TrackedResource { + readonly accountId?: string; + readonly defaultIngestionSettings?: AzureMonitorWorkspaceDefaultIngestionSettings; + readonly etag?: string; + readonly metrics?: AzureMonitorWorkspaceMetrics; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + readonly provisioningState?: ProvisioningState; + readonly publicNetworkAccess?: PublicNetworkAccess; } // @public -export interface ActionGroupPatchBody { - enabled?: boolean; +export interface AzureMonitorWorkspaceResourceForUpdate { tags?: { [propertyName: string]: string; }; } // @public -export interface ActionGroupResource extends AzureResource { - armRoleReceivers?: ArmRoleReceiver[]; - automationRunbookReceivers?: AutomationRunbookReceiver[]; - azureAppPushReceivers?: AzureAppPushReceiver[]; - azureFunctionReceivers?: AzureFunctionReceiver[]; - emailReceivers?: EmailReceiver[]; - enabled?: boolean; - eventHubReceivers?: EventHubReceiver[]; - groupShortName?: string; - itsmReceivers?: ItsmReceiver[]; - logicAppReceivers?: LogicAppReceiver[]; - smsReceivers?: SmsReceiver[]; - voiceReceivers?: VoiceReceiver[]; - webhookReceivers?: WebhookReceiver[]; -} - -// @public -export interface ActionGroups { - beginCreateNotificationsAtActionGroupResourceLevel(resourceGroupName: string, actionGroupName: string, notificationRequest: NotificationRequestBody, options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams): Promise, ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse>>; - beginCreateNotificationsAtActionGroupResourceLevelAndWait(resourceGroupName: string, actionGroupName: string, notificationRequest: NotificationRequestBody, options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams): Promise; - beginCreateNotificationsAtResourceGroupLevel(resourceGroupName: string, notificationRequest: NotificationRequestBody, options?: ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams): Promise, ActionGroupsCreateNotificationsAtResourceGroupLevelResponse>>; - beginCreateNotificationsAtResourceGroupLevelAndWait(resourceGroupName: string, notificationRequest: NotificationRequestBody, options?: ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams): Promise; - beginPostTestNotifications(notificationRequest: NotificationRequestBody, options?: ActionGroupsPostTestNotificationsOptionalParams): Promise, ActionGroupsPostTestNotificationsResponse>>; - beginPostTestNotificationsAndWait(notificationRequest: NotificationRequestBody, options?: ActionGroupsPostTestNotificationsOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, actionGroupName: string, actionGroup: ActionGroupResource, options?: ActionGroupsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, actionGroupName: string, options?: ActionGroupsDeleteOptionalParams): Promise; - enableReceiver(resourceGroupName: string, actionGroupName: string, enableRequest: EnableRequest, options?: ActionGroupsEnableReceiverOptionalParams): Promise; - get(resourceGroupName: string, actionGroupName: string, options?: ActionGroupsGetOptionalParams): Promise; - getTestNotifications(notificationId: string, options?: ActionGroupsGetTestNotificationsOptionalParams): Promise; - getTestNotificationsAtActionGroupResourceLevel(resourceGroupName: string, actionGroupName: string, notificationId: string, options?: ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams): Promise; - getTestNotificationsAtResourceGroupLevel(resourceGroupName: string, notificationId: string, options?: ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ActionGroupsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscriptionId(options?: ActionGroupsListBySubscriptionIdOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, actionGroupName: string, actionGroupPatch: ActionGroupPatchBody, options?: ActionGroupsUpdateOptionalParams): Promise; -} - -// @public -export interface ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders { - location?: string; -} - -// @public -export interface ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse = TestNotificationDetailsResponse; - -// @public -export interface ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders { - location?: string; -} - -// @public -export interface ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ActionGroupsCreateNotificationsAtResourceGroupLevelResponse = TestNotificationDetailsResponse; - -// @public -export interface ActionGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ActionGroupsCreateOrUpdateResponse = ActionGroupResource; - -// @public -export interface ActionGroupsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ActionGroupsEnableReceiverOptionalParams extends coreClient.OperationOptions { +export interface AzureMonitorWorkspaceResourceListResult { + nextLink?: string; + value: AzureMonitorWorkspaceResource[]; } // @public -export interface ActionGroupsGetOptionalParams extends coreClient.OperationOptions { +export interface AzureMonitorWorkspaceResourceProperties extends AzureMonitorWorkspace { } // @public -export type ActionGroupsGetResponse = ActionGroupResource; - -// @public -export interface ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams extends coreClient.OperationOptions { +export interface AzureMonitorWorkspaces { + create(resourceGroupName: string, azureMonitorWorkspaceName: string, azureMonitorWorkspaceProperties: AzureMonitorWorkspaceResource, options?: AzureMonitorWorkspacesCreateOptionalParams): Promise; + delete(resourceGroupName: string, azureMonitorWorkspaceName: string, options?: AzureMonitorWorkspacesDeleteOptionalParams): Promise; + get(resourceGroupName: string, azureMonitorWorkspaceName: string, options?: AzureMonitorWorkspacesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: AzureMonitorWorkspacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AzureMonitorWorkspacesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, azureMonitorWorkspaceName: string, options?: AzureMonitorWorkspacesUpdateOptionalParams): Promise; } // @public -export type ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse = TestNotificationDetailsResponse; - -// @public -export interface ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams extends coreClient.OperationOptions { +export interface AzureMonitorWorkspacesCreateOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse = TestNotificationDetailsResponse; +export type AzureMonitorWorkspacesCreateResponse = AzureMonitorWorkspaceResource; // @public -export interface ActionGroupsGetTestNotificationsOptionalParams extends coreClient.OperationOptions { +export interface AzureMonitorWorkspacesDeleteOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsGetTestNotificationsResponse = TestNotificationDetailsResponse; - -// @public -export interface ActionGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface AzureMonitorWorkspacesGetOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsListByResourceGroupResponse = ActionGroupList; +export type AzureMonitorWorkspacesGetResponse = AzureMonitorWorkspaceResource; // @public -export interface ActionGroupsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions { +export interface AzureMonitorWorkspacesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsListBySubscriptionIdResponse = ActionGroupList; - -// @public -export interface ActionGroupsPostTestNotificationsHeaders { - location?: string; -} +export type AzureMonitorWorkspacesListByResourceGroupNextResponse = AzureMonitorWorkspaceResourceListResult; // @public -export interface ActionGroupsPostTestNotificationsOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface AzureMonitorWorkspacesListByResourceGroupOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsPostTestNotificationsResponse = TestNotificationDetailsResponse; +export type AzureMonitorWorkspacesListByResourceGroupResponse = AzureMonitorWorkspaceResourceListResult; // @public -export interface ActionGroupsUpdateOptionalParams extends coreClient.OperationOptions { +export interface AzureMonitorWorkspacesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionGroupsUpdateResponse = ActionGroupResource; - -// @public -export interface ActionList { - actionGroups?: ActionGroup[]; -} +export type AzureMonitorWorkspacesListBySubscriptionNextResponse = AzureMonitorWorkspaceResourceListResult; // @public -export interface Actions { - actionGroups?: string[]; - customProperties?: { - [propertyName: string]: string; - }; +export interface AzureMonitorWorkspacesListBySubscriptionOptionalParams extends coreClient.OperationOptions { } // @public -export type ActionType = string; - -// @public -export interface ActivityLogAlertResource extends AzureResourceAutoGenerated { - actions?: ActionList; - condition?: AlertRuleAllOfCondition; - description?: string; - enabled?: boolean; - scopes?: string[]; -} +export type AzureMonitorWorkspacesListBySubscriptionResponse = AzureMonitorWorkspaceResourceListResult; // @public -export interface ActivityLogAlerts { - createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRule: ActivityLogAlertResource, options?: ActivityLogAlertsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, activityLogAlertName: string, options?: ActivityLogAlertsDeleteOptionalParams): Promise; - get(resourceGroupName: string, activityLogAlertName: string, options?: ActivityLogAlertsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ActivityLogAlertsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscriptionId(options?: ActivityLogAlertsListBySubscriptionIdOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRulePatch: AlertRulePatchObject, options?: ActivityLogAlertsUpdateOptionalParams): Promise; +export interface AzureMonitorWorkspacesUpdateOptionalParams extends coreClient.OperationOptions { + azureMonitorWorkspaceProperties?: AzureMonitorWorkspaceResourceForUpdate; } // @public -export interface ActivityLogAlertsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} +export type AzureMonitorWorkspacesUpdateResponse = AzureMonitorWorkspaceResource; // @public -export type ActivityLogAlertsCreateOrUpdateResponse = ActivityLogAlertResource; +export type CreatedByType = string; // @public -export interface ActivityLogAlertsDeleteOptionalParams extends coreClient.OperationOptions { +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; } // @public -export interface ActivityLogAlertsGetOptionalParams extends coreClient.OperationOptions { +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; } // @public -export type ActivityLogAlertsGetResponse = ActivityLogAlertResource; - -// @public -export interface ActivityLogAlertsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface ErrorResponse { + error?: ErrorDetail; } // @public -export type ActivityLogAlertsListByResourceGroupNextResponse = AlertRuleList; +export function getContinuationToken(page: unknown): string | undefined; // @public -export interface ActivityLogAlertsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface IngestionSettings { + readonly dataCollectionEndpointResourceId?: string; + readonly dataCollectionRuleResourceId?: string; } // @public -export type ActivityLogAlertsListByResourceGroupResponse = AlertRuleList; - -// @public -export interface ActivityLogAlertsListBySubscriptionIdNextOptionalParams extends coreClient.OperationOptions { +export enum KnownActionType { + Internal = "Internal" } // @public -export type ActivityLogAlertsListBySubscriptionIdNextResponse = AlertRuleList; - -// @public -export interface ActivityLogAlertsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions { +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" } // @public -export type ActivityLogAlertsListBySubscriptionIdResponse = AlertRuleList; - -// @public -export interface ActivityLogAlertsUpdateOptionalParams extends coreClient.OperationOptions { +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" } // @public -export type ActivityLogAlertsUpdateResponse = ActivityLogAlertResource; - -// @public -export interface ActivityLogs { - list(filter: string, options?: ActivityLogsListOptionalParams): PagedAsyncIterableIterator; +export enum KnownProvisioningState { + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded" } // @public -export interface ActivityLogsListNextOptionalParams extends coreClient.OperationOptions { +export enum KnownPublicNetworkAccess { + Disabled = "Disabled", + Enabled = "Enabled" } // @public -export type ActivityLogsListNextResponse = EventDataCollection; - -// @public -export interface ActivityLogsListOptionalParams extends coreClient.OperationOptions { - select?: string; +export enum KnownStatus { + Approved = "Approved", + Rejected = "Rejected", + Removed = "Removed" } // @public -export type ActivityLogsListResponse = EventDataCollection; - -// @public -export type AggregationType = "None" | "Average" | "Count" | "Minimum" | "Maximum" | "Total"; - -// @public -export type AggregationTypeEnum = string; - -// @public -export interface AlertRuleAllOfCondition { - allOf: AlertRuleAnyOfOrLeafCondition[]; +export interface Metrics { + readonly internalId?: string; + readonly prometheusQueryEndpoint?: string; } -// @public -export interface AlertRuleAnyOfOrLeafCondition extends AlertRuleLeafCondition { - anyOf?: AlertRuleLeafCondition[]; +// @public (undocumented) +export class MonitorClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MonitorClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + azureMonitorWorkspaces: AzureMonitorWorkspaces; + // (undocumented) + monitorOperations: MonitorOperations; + // (undocumented) + subscriptionId: string; } // @public -export interface AlertRuleIncidents { - get(resourceGroupName: string, ruleName: string, incidentName: string, options?: AlertRuleIncidentsGetOptionalParams): Promise; - listByAlertRule(resourceGroupName: string, ruleName: string, options?: AlertRuleIncidentsListByAlertRuleOptionalParams): PagedAsyncIterableIterator; +export interface MonitorClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; } // @public -export interface AlertRuleIncidentsGetOptionalParams extends coreClient.OperationOptions { +export interface MonitorOperations { + list(options?: MonitorOperationsListOptionalParams): PagedAsyncIterableIterator; } // @public -export type AlertRuleIncidentsGetResponse = Incident; - -// @public -export interface AlertRuleIncidentsListByAlertRuleOptionalParams extends coreClient.OperationOptions { +export interface MonitorOperationsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type AlertRuleIncidentsListByAlertRuleResponse = IncidentListResult; +export type MonitorOperationsListNextResponse = OperationListResult; // @public -export interface AlertRuleLeafCondition { - containsAny?: string[]; - equals?: string; - field?: string; +export interface MonitorOperationsListOptionalParams extends coreClient.OperationOptions { } // @public -export interface AlertRuleList { - nextLink?: string; - value?: ActivityLogAlertResource[]; -} +export type MonitorOperationsListResponse = OperationListResult; // @public -export interface AlertRulePatchObject { - enabled?: boolean; - tags?: { - [propertyName: string]: string; - }; +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; } // @public -export interface AlertRuleResource extends ResourceAutoGenerated { - action?: RuleActionUnion; - actions?: RuleActionUnion[]; - condition: RuleConditionUnion; - description?: string; - isEnabled: boolean; - readonly lastUpdatedTime?: Date; - namePropertiesName: string; - provisioningState?: string; +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; } // @public -export interface AlertRuleResourceCollection { - value?: AlertRuleResource[]; +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; } // @public -export interface AlertRuleResourcePatch { - action?: RuleActionUnion; - actions?: RuleActionUnion[]; - condition?: RuleConditionUnion; - description?: string; - isEnabled?: boolean; - readonly lastUpdatedTime?: Date; - name?: string; - provisioningState?: string; - tags?: { - [propertyName: string]: string; - }; -} +export type Origin = string; // @public -export interface AlertRules { - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: AlertRuleResource, options?: AlertRulesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, ruleName: string, options?: AlertRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, ruleName: string, options?: AlertRulesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: AlertRulesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: AlertRulesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, ruleName: string, alertRulesResource: AlertRuleResourcePatch, options?: AlertRulesUpdateOptionalParams): Promise; +export interface PrivateEndpoint { + readonly id?: string; } // @public -export interface AlertRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface PrivateEndpointConnection { + readonly id?: string; + readonly name?: string; + readonly properties?: PrivateEndpointConnectionProperties; + readonly type?: string; } // @public -export type AlertRulesCreateOrUpdateResponse = AlertRuleResource; - -// @public -export interface AlertRulesDeleteOptionalParams extends coreClient.OperationOptions { +export interface PrivateEndpointConnectionProperties extends PrivateEndpointConnectionPropertiesAutoGenerated { } // @public -export interface AlertRulesGetOptionalParams extends coreClient.OperationOptions { +export interface PrivateEndpointConnectionPropertiesAutoGenerated { + readonly groupIds?: string[]; + readonly privateEndpoint?: PrivateEndpointConnectionPropertiesPrivateEndpoint; + readonly privateLinkServiceConnectionState?: PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState; + readonly provisioningState?: ProvisioningState; } // @public -export type AlertRulesGetResponse = AlertRuleResource; - -// @public -export interface AlertRulesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface PrivateEndpointConnectionPropertiesPrivateEndpoint extends PrivateEndpoint { } // @public -export type AlertRulesListByResourceGroupResponse = AlertRuleResourceCollection; - -// @public -export interface AlertRulesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +export interface PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState extends PrivateLinkServiceConnectionState { } // @public -export type AlertRulesListBySubscriptionResponse = AlertRuleResourceCollection; - -// @public -export interface AlertRulesUpdateOptionalParams extends coreClient.OperationOptions { +export interface PrivateLinkServiceConnectionState { + readonly actionsRequired?: string; + readonly description?: string; + readonly status?: Status; } // @public -export type AlertRulesUpdateResponse = AlertRuleResource; - -// @public -export type AlertSeverity = number; - -// @public -export interface ArmRoleReceiver { - name: string; - roleId: string; - useCommonAlertSchema?: boolean; -} +export type ProvisioningState = string; // @public -export interface AutomationRunbookReceiver { - automationAccountId: string; - isGlobalRunbook: boolean; - name?: string; - runbookName: string; - serviceUri?: string; - useCommonAlertSchema?: boolean; - webhookResourceId: string; -} +export type PublicNetworkAccess = string; // @public -export interface AutoscaleErrorResponse { - error?: AutoscaleErrorResponseError; +export interface Resource { + readonly id?: string; + readonly name?: string; readonly systemData?: SystemData; + readonly type?: string; } // @public -export interface AutoscaleErrorResponseError { - code?: string; - details?: string; - message?: string; - target?: string; -} - -// @public -export interface AutoscaleNotification { - email?: EmailNotification; - operation: "Scale"; - webhooks?: WebhookNotification[]; -} - -// @public -export interface AutoscaleProfile { - capacity: ScaleCapacity; - fixedDate?: TimeWindow; - name: string; - recurrence?: Recurrence; - rules: ScaleRule[]; -} - -// @public -export interface AutoscaleSettingResource extends Resource { - enabled?: boolean; - namePropertiesName?: string; - notifications?: AutoscaleNotification[]; - predictiveAutoscalePolicy?: PredictiveAutoscalePolicy; - profiles: AutoscaleProfile[]; - targetResourceLocation?: string; - targetResourceUri?: string; -} +export type Status = string; // @public -export interface AutoscaleSettingResourceCollection { - nextLink?: string; - value: AutoscaleSettingResource[]; +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; } // @public -export interface AutoscaleSettingResourcePatch { - enabled?: boolean; - name?: string; - notifications?: AutoscaleNotification[]; - predictiveAutoscalePolicy?: PredictiveAutoscalePolicy; - profiles?: AutoscaleProfile[]; +export interface TrackedResource extends Resource { + location: string; tags?: { [propertyName: string]: string; }; - targetResourceLocation?: string; - targetResourceUri?: string; -} - -// @public -export interface AutoscaleSettings { - createOrUpdate(resourceGroupName: string, autoscaleSettingName: string, parameters: AutoscaleSettingResource, options?: AutoscaleSettingsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, autoscaleSettingName: string, options?: AutoscaleSettingsDeleteOptionalParams): Promise; - get(resourceGroupName: string, autoscaleSettingName: string, options?: AutoscaleSettingsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: AutoscaleSettingsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: AutoscaleSettingsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, autoscaleSettingName: string, autoscaleSettingResource: AutoscaleSettingResourcePatch, options?: AutoscaleSettingsUpdateOptionalParams): Promise; -} - -// @public -export interface AutoscaleSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AutoscaleSettingsCreateOrUpdateResponse = AutoscaleSettingResource; - -// @public -export interface AutoscaleSettingsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface AutoscaleSettingsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AutoscaleSettingsGetResponse = AutoscaleSettingResource; - -// @public -export interface AutoscaleSettingsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AutoscaleSettingsListByResourceGroupNextResponse = AutoscaleSettingResourceCollection; - -// @public -export interface AutoscaleSettingsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AutoscaleSettingsListByResourceGroupResponse = AutoscaleSettingResourceCollection; - -// @public -export interface AutoscaleSettingsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AutoscaleSettingsListBySubscriptionNextResponse = AutoscaleSettingResourceCollection; - -// @public -export interface AutoscaleSettingsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AutoscaleSettingsListBySubscriptionResponse = AutoscaleSettingResourceCollection; - -// @public -export interface AutoscaleSettingsUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AutoscaleSettingsUpdateResponse = AutoscaleSettingResource; - -// @public -export interface AzureAppPushReceiver { - emailAddress: string; - name: string; -} - -// @public -export interface AzureFunctionReceiver { - functionAppResourceId: string; - functionName: string; - httpTriggerUrl: string; - name: string; - useCommonAlertSchema?: boolean; -} - -// @public -export interface AzureMonitorMetricsDestination { - name?: string; -} - -// @public -export interface AzureMonitorPrivateLinkScope extends TrackedResource { - accessModeSettings: AccessModeSettings; - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - readonly provisioningState?: string; - readonly systemData?: SystemData; -} - -// @public -export interface AzureMonitorPrivateLinkScopeListResult { - nextLink?: string; - value: AzureMonitorPrivateLinkScope[]; -} - -// @public -export interface AzureMonitorWorkspace { - readonly accountId?: string; - readonly defaultIngestionSettings?: AzureMonitorWorkspaceDefaultIngestionSettings; - readonly metrics?: AzureMonitorWorkspaceMetrics; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface AzureMonitorWorkspaceDefaultIngestionSettings extends IngestionSettings { -} - -// @public -export interface AzureMonitorWorkspaceMetrics extends Metrics { -} - -// @public -export interface AzureMonitorWorkspaceResource extends TrackedResourceAutoGenerated { - readonly accountId?: string; - readonly defaultIngestionSettings?: AzureMonitorWorkspaceDefaultIngestionSettings; - readonly etag?: string; - readonly metrics?: AzureMonitorWorkspaceMetrics; - readonly provisioningState?: ProvisioningState; -} - -// @public -export interface AzureMonitorWorkspaceResourceForUpdate { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface AzureMonitorWorkspaceResourceListResult { - nextLink?: string; - value: AzureMonitorWorkspaceResource[]; -} - -// @public -export interface AzureMonitorWorkspaceResourceProperties extends AzureMonitorWorkspace { -} - -// @public -export interface AzureMonitorWorkspaces { - create(resourceGroupName: string, azureMonitorWorkspaceName: string, azureMonitorWorkspaceProperties: AzureMonitorWorkspaceResource, options?: AzureMonitorWorkspacesCreateOptionalParams): Promise; - delete(resourceGroupName: string, azureMonitorWorkspaceName: string, options?: AzureMonitorWorkspacesDeleteOptionalParams): Promise; - get(resourceGroupName: string, azureMonitorWorkspaceName: string, options?: AzureMonitorWorkspacesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: AzureMonitorWorkspacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: AzureMonitorWorkspacesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, azureMonitorWorkspaceName: string, options?: AzureMonitorWorkspacesUpdateOptionalParams): Promise; -} - -// @public -export interface AzureMonitorWorkspacesCreateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureMonitorWorkspacesCreateResponse = AzureMonitorWorkspaceResource; - -// @public -export interface AzureMonitorWorkspacesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface AzureMonitorWorkspacesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureMonitorWorkspacesGetResponse = AzureMonitorWorkspaceResource; - -// @public -export interface AzureMonitorWorkspacesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureMonitorWorkspacesListByResourceGroupNextResponse = AzureMonitorWorkspaceResourceListResult; - -// @public -export interface AzureMonitorWorkspacesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureMonitorWorkspacesListByResourceGroupResponse = AzureMonitorWorkspaceResourceListResult; - -// @public -export interface AzureMonitorWorkspacesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureMonitorWorkspacesListBySubscriptionNextResponse = AzureMonitorWorkspaceResourceListResult; - -// @public -export interface AzureMonitorWorkspacesListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AzureMonitorWorkspacesListBySubscriptionResponse = AzureMonitorWorkspaceResourceListResult; - -// @public -export interface AzureMonitorWorkspacesUpdateOptionalParams extends coreClient.OperationOptions { - azureMonitorWorkspaceProperties?: AzureMonitorWorkspaceResourceForUpdate; -} - -// @public -export type AzureMonitorWorkspacesUpdateResponse = AzureMonitorWorkspaceResource; - -// @public -export interface AzureResource { - readonly id?: string; - location: string; - readonly name?: string; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface AzureResourceAutoGenerated { - readonly id?: string; - location?: string; - readonly name?: string; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface BaselineMetadata { - name: string; - value: string; -} - -// @public -export interface Baselines { - list(resourceUri: string, options?: BaselinesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export type BaselineSensitivity = string; - -// @public -export interface BaselinesListOptionalParams extends coreClient.OperationOptions { - aggregation?: string; - filter?: string; - interval?: string; - metricnames?: string; - metricnamespace?: string; - resultType?: ResultType; - sensitivities?: string; - timespan?: string; -} - -// @public -export type BaselinesListResponse = MetricBaselinesResponse; - -// @public -export type CategoryType = string; - -// @public -export interface ColumnDefinition { - name?: string; - type?: KnownColumnDefinitionType; -} - -// @public -export type ComparisonOperationType = "Equals" | "NotEquals" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual"; - -// @public -export interface Condition { - dimensions?: Dimension[]; - failingPeriods?: ConditionFailingPeriods; - metricMeasureColumn?: string; - metricName?: string; - operator?: ConditionOperator; - query?: string; - resourceIdColumn?: string; - threshold?: number; - timeAggregation?: TimeAggregation; -} - -// @public -export interface ConditionFailingPeriods { - minFailingPeriodsToAlert?: number; - numberOfEvaluationPeriods?: number; -} - -// @public -export type ConditionOperator = "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "Equals"; - -// @public -export interface ConfigurationAccessEndpointSpec { - readonly endpoint?: string; -} - -// @public -export interface Context { - contextType?: string; - notificationSource?: string; -} - -// @public -export type CreatedByType = string; - -// @public -export type CriterionType = string; - -// @public -export interface DataCollectionEndpoint { - configurationAccess?: DataCollectionEndpointConfigurationAccess; - description?: string; - immutableId?: string; - logsIngestion?: DataCollectionEndpointLogsIngestion; - networkAcls?: DataCollectionEndpointNetworkAcls; - readonly provisioningState?: KnownDataCollectionEndpointProvisioningState; -} - -// @public -export interface DataCollectionEndpointConfigurationAccess extends ConfigurationAccessEndpointSpec { -} - -// @public -export interface DataCollectionEndpointLogsIngestion extends LogsIngestionEndpointSpec { -} - -// @public -export interface DataCollectionEndpointNetworkAcls extends NetworkRuleSet { -} - -// @public -export interface DataCollectionEndpointResource { - configurationAccess?: DataCollectionEndpointConfigurationAccess; - description?: string; - readonly etag?: string; - readonly id?: string; - immutableId?: string; - kind?: KnownDataCollectionEndpointResourceKind; - location: string; - logsIngestion?: DataCollectionEndpointLogsIngestion; - readonly name?: string; - networkAcls?: DataCollectionEndpointNetworkAcls; - readonly provisioningState?: KnownDataCollectionEndpointProvisioningState; - readonly systemData?: DataCollectionEndpointResourceSystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface DataCollectionEndpointResourceListResult { - nextLink?: string; - value: DataCollectionEndpointResource[]; -} - -// @public -export interface DataCollectionEndpointResourceProperties extends DataCollectionEndpoint { -} - -// @public -export interface DataCollectionEndpointResourceSystemData extends SystemData { -} - -// @public -export interface DataCollectionEndpoints { - create(resourceGroupName: string, dataCollectionEndpointName: string, options?: DataCollectionEndpointsCreateOptionalParams): Promise; - delete(resourceGroupName: string, dataCollectionEndpointName: string, options?: DataCollectionEndpointsDeleteOptionalParams): Promise; - get(resourceGroupName: string, dataCollectionEndpointName: string, options?: DataCollectionEndpointsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: DataCollectionEndpointsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: DataCollectionEndpointsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, dataCollectionEndpointName: string, options?: DataCollectionEndpointsUpdateOptionalParams): Promise; -} - -// @public -export interface DataCollectionEndpointsCreateOptionalParams extends coreClient.OperationOptions { - body?: DataCollectionEndpointResource; -} - -// @public -export type DataCollectionEndpointsCreateResponse = DataCollectionEndpointResource; - -// @public -export interface DataCollectionEndpointsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DataCollectionEndpointsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionEndpointsGetResponse = DataCollectionEndpointResource; - -// @public -export interface DataCollectionEndpointsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionEndpointsListByResourceGroupNextResponse = DataCollectionEndpointResourceListResult; - -// @public -export interface DataCollectionEndpointsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionEndpointsListByResourceGroupResponse = DataCollectionEndpointResourceListResult; - -// @public -export interface DataCollectionEndpointsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionEndpointsListBySubscriptionNextResponse = DataCollectionEndpointResourceListResult; - -// @public -export interface DataCollectionEndpointsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionEndpointsListBySubscriptionResponse = DataCollectionEndpointResourceListResult; - -// @public -export interface DataCollectionEndpointsUpdateOptionalParams extends coreClient.OperationOptions { - body?: ResourceForUpdate; -} - -// @public -export type DataCollectionEndpointsUpdateResponse = DataCollectionEndpointResource; - -// @public -export interface DataCollectionRule { - dataCollectionEndpointId?: string; - dataFlows?: DataFlow[]; - dataSources?: DataCollectionRuleDataSources; - description?: string; - destinations?: DataCollectionRuleDestinations; - readonly immutableId?: string; - readonly metadata?: DataCollectionRuleMetadata; - readonly provisioningState?: KnownDataCollectionRuleProvisioningState; - streamDeclarations?: { - [propertyName: string]: StreamDeclaration; - }; -} - -// @public -export interface DataCollectionRuleAssociation { - dataCollectionEndpointId?: string; - dataCollectionRuleId?: string; - description?: string; - readonly metadata?: DataCollectionRuleAssociationMetadata; - readonly provisioningState?: KnownDataCollectionRuleAssociationProvisioningState; -} - -// @public -export interface DataCollectionRuleAssociationMetadata extends Metadata { -} - -// @public -export interface DataCollectionRuleAssociationProxyOnlyResource { - dataCollectionEndpointId?: string; - dataCollectionRuleId?: string; - description?: string; - readonly etag?: string; - readonly id?: string; - readonly metadata?: DataCollectionRuleAssociationMetadata; - readonly name?: string; - readonly provisioningState?: KnownDataCollectionRuleAssociationProvisioningState; - readonly systemData?: DataCollectionRuleAssociationProxyOnlyResourceSystemData; - readonly type?: string; -} - -// @public -export interface DataCollectionRuleAssociationProxyOnlyResourceListResult { - nextLink?: string; - value: DataCollectionRuleAssociationProxyOnlyResource[]; -} - -// @public -export interface DataCollectionRuleAssociationProxyOnlyResourceProperties extends DataCollectionRuleAssociation { -} - -// @public -export interface DataCollectionRuleAssociationProxyOnlyResourceSystemData extends SystemData { -} - -// @public -export interface DataCollectionRuleAssociations { - create(resourceUri: string, associationName: string, options?: DataCollectionRuleAssociationsCreateOptionalParams): Promise; - delete(resourceUri: string, associationName: string, options?: DataCollectionRuleAssociationsDeleteOptionalParams): Promise; - get(resourceUri: string, associationName: string, options?: DataCollectionRuleAssociationsGetOptionalParams): Promise; - listByDataCollectionEndpoint(resourceGroupName: string, dataCollectionEndpointName: string, options?: DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams): PagedAsyncIterableIterator; - listByResource(resourceUri: string, options?: DataCollectionRuleAssociationsListByResourceOptionalParams): PagedAsyncIterableIterator; - listByRule(resourceGroupName: string, dataCollectionRuleName: string, options?: DataCollectionRuleAssociationsListByRuleOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface DataCollectionRuleAssociationsCreateOptionalParams extends coreClient.OperationOptions { - body?: DataCollectionRuleAssociationProxyOnlyResource; -} - -// @public -export type DataCollectionRuleAssociationsCreateResponse = DataCollectionRuleAssociationProxyOnlyResource; - -// @public -export interface DataCollectionRuleAssociationsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DataCollectionRuleAssociationsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRuleAssociationsGetResponse = DataCollectionRuleAssociationProxyOnlyResource; - -// @public -export interface DataCollectionRuleAssociationsListByDataCollectionEndpointNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRuleAssociationsListByDataCollectionEndpointNextResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -// @public -export interface DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRuleAssociationsListByDataCollectionEndpointResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -// @public -export interface DataCollectionRuleAssociationsListByResourceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRuleAssociationsListByResourceNextResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -// @public -export interface DataCollectionRuleAssociationsListByResourceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRuleAssociationsListByResourceResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -// @public -export interface DataCollectionRuleAssociationsListByRuleNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRuleAssociationsListByRuleNextResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -// @public -export interface DataCollectionRuleAssociationsListByRuleOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRuleAssociationsListByRuleResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -// @public -export interface DataCollectionRuleDataSources extends DataSourcesSpec { -} - -// @public -export interface DataCollectionRuleDestinations extends DestinationsSpec { -} - -// @public -export interface DataCollectionRuleMetadata extends Metadata { -} - -// @public -export interface DataCollectionRuleResource { - dataCollectionEndpointId?: string; - dataFlows?: DataFlow[]; - dataSources?: DataCollectionRuleDataSources; - description?: string; - destinations?: DataCollectionRuleDestinations; - readonly etag?: string; - readonly id?: string; - readonly immutableId?: string; - kind?: KnownDataCollectionRuleResourceKind; - location: string; - readonly metadata?: DataCollectionRuleMetadata; - readonly name?: string; - readonly provisioningState?: KnownDataCollectionRuleProvisioningState; - streamDeclarations?: { - [propertyName: string]: StreamDeclaration; - }; - readonly systemData?: DataCollectionRuleResourceSystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface DataCollectionRuleResourceListResult { - nextLink?: string; - value: DataCollectionRuleResource[]; -} - -// @public -export interface DataCollectionRuleResourceProperties extends DataCollectionRule { -} - -// @public -export interface DataCollectionRuleResourceSystemData extends SystemData { -} - -// @public -export interface DataCollectionRules { - create(resourceGroupName: string, dataCollectionRuleName: string, options?: DataCollectionRulesCreateOptionalParams): Promise; - delete(resourceGroupName: string, dataCollectionRuleName: string, options?: DataCollectionRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, dataCollectionRuleName: string, options?: DataCollectionRulesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: DataCollectionRulesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: DataCollectionRulesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, dataCollectionRuleName: string, options?: DataCollectionRulesUpdateOptionalParams): Promise; -} - -// @public -export interface DataCollectionRulesCreateOptionalParams extends coreClient.OperationOptions { - body?: DataCollectionRuleResource; -} - -// @public -export type DataCollectionRulesCreateResponse = DataCollectionRuleResource; - -// @public -export interface DataCollectionRulesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DataCollectionRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRulesGetResponse = DataCollectionRuleResource; - -// @public -export interface DataCollectionRulesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRulesListByResourceGroupNextResponse = DataCollectionRuleResourceListResult; - -// @public -export interface DataCollectionRulesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRulesListByResourceGroupResponse = DataCollectionRuleResourceListResult; - -// @public -export interface DataCollectionRulesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRulesListBySubscriptionNextResponse = DataCollectionRuleResourceListResult; - -// @public -export interface DataCollectionRulesListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataCollectionRulesListBySubscriptionResponse = DataCollectionRuleResourceListResult; - -// @public -export interface DataCollectionRulesUpdateOptionalParams extends coreClient.OperationOptions { - body?: ResourceForUpdate; -} - -// @public -export type DataCollectionRulesUpdateResponse = DataCollectionRuleResource; - -// @public -export interface DataContainer { - workspace: WorkspaceInfo; -} - -// @public -export interface DataFlow { - destinations?: string[]; - outputStream?: string; - streams?: KnownDataFlowStreams[]; - transformKql?: string; -} - -// @public -export interface DataSourcesSpec { - extensions?: ExtensionDataSource[]; - iisLogs?: IisLogsDataSource[]; - logFiles?: LogFilesDataSource[]; - performanceCounters?: PerfCounterDataSource[]; - syslog?: SyslogDataSource[]; - windowsEventLogs?: WindowsEventLogDataSource[]; -} - -// @public -export type DataStatus = string; - -// @public -export interface DefaultErrorResponse { - error?: ErrorDetail; -} - -// @public -export interface DestinationsSpec { - azureMonitorMetrics?: DestinationsSpecAzureMonitorMetrics; - logAnalytics?: LogAnalyticsDestination[]; -} - -// @public -export interface DestinationsSpecAzureMonitorMetrics extends AzureMonitorMetricsDestination { -} - -// @public -export interface DiagnosticSettings { - createOrUpdate(resourceUri: string, name: string, parameters: DiagnosticSettingsResource, options?: DiagnosticSettingsCreateOrUpdateOptionalParams): Promise; - delete(resourceUri: string, name: string, options?: DiagnosticSettingsDeleteOptionalParams): Promise; - get(resourceUri: string, name: string, options?: DiagnosticSettingsGetOptionalParams): Promise; - list(resourceUri: string, options?: DiagnosticSettingsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface DiagnosticSettingsCategory { - get(resourceUri: string, name: string, options?: DiagnosticSettingsCategoryGetOptionalParams): Promise; - list(resourceUri: string, options?: DiagnosticSettingsCategoryListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface DiagnosticSettingsCategoryGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticSettingsCategoryGetResponse = DiagnosticSettingsCategoryResource; - -// @public -export interface DiagnosticSettingsCategoryListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticSettingsCategoryListResponse = DiagnosticSettingsCategoryResourceCollection; - -// @public -export interface DiagnosticSettingsCategoryResource extends ResourceAutoGenerated3 { - categoryGroups?: string[]; - categoryType?: CategoryType; - readonly systemData?: SystemData; -} - -// @public -export interface DiagnosticSettingsCategoryResourceCollection { - value?: DiagnosticSettingsCategoryResource[]; -} - -// @public -export interface DiagnosticSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticSettingsCreateOrUpdateResponse = DiagnosticSettingsResource; - -// @public -export interface DiagnosticSettingsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DiagnosticSettingsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticSettingsGetResponse = DiagnosticSettingsResource; - -// @public -export interface DiagnosticSettingsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticSettingsListResponse = DiagnosticSettingsResourceCollection; - -// @public -export interface DiagnosticSettingsResource extends ResourceAutoGenerated3 { - eventHubAuthorizationRuleId?: string; - eventHubName?: string; - logAnalyticsDestinationType?: string; - logs?: LogSettings[]; - marketplacePartnerId?: string; - metrics?: MetricSettings[]; - serviceBusRuleId?: string; - storageAccountId?: string; - readonly systemData?: SystemData; - workspaceId?: string; -} - -// @public -export interface DiagnosticSettingsResourceCollection { - value?: DiagnosticSettingsResource[]; -} - -// @public -export interface Dimension { - name: string; - operator: DimensionOperator; - values: string[]; -} - -// @public -export type DimensionOperator = string; - -// @public -export interface DynamicMetricCriteria extends MultiMetricCriteria { - alertSensitivity: DynamicThresholdSensitivity; - criterionType: "DynamicThresholdCriterion"; - failingPeriods: DynamicThresholdFailingPeriods; - ignoreDataBefore?: Date; - operator: DynamicThresholdOperator; -} - -// @public -export interface DynamicThresholdFailingPeriods { - minFailingPeriodsToAlert: number; - numberOfEvaluationPeriods: number; -} - -// @public -export type DynamicThresholdOperator = string; - -// @public -export type DynamicThresholdSensitivity = string; - -// @public -export interface EmailNotification { - customEmails?: string[]; - sendToSubscriptionAdministrator?: boolean; - sendToSubscriptionCoAdministrators?: boolean; -} - -// @public -export interface EmailReceiver { - emailAddress: string; - name: string; - readonly status?: ReceiverStatus; - useCommonAlertSchema?: boolean; -} - -// @public -export interface EnableRequest { - receiverName: string; -} - -// @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; -} - -// @public -export interface ErrorContract { - error?: ErrorResponseDetails; -} - -// @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; -} - -// @public -export interface ErrorDetailAutoGenerated { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetailAutoGenerated[]; - readonly message?: string; - readonly target?: string; -} - -// @public -export interface ErrorModel { - code: string; - message?: string; -} - -// @public -export interface ErrorResponse { - code?: string; - message?: string; -} - -// @public -export interface ErrorResponseAdditionalInfo { - readonly info?: Record; - readonly type?: string; -} - -// @public -export interface ErrorResponseAutoGenerated { - readonly code?: string; - readonly message?: string; -} - -// @public -export interface ErrorResponseAutoGenerated2 { - error?: ErrorDetailAutoGenerated; -} - -// @public -export interface ErrorResponseCommonV2 { - error?: ErrorDetail; -} - -// @public -export interface ErrorResponseDetails { - readonly additionalInfo?: ErrorResponseAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorResponseDetails[]; - readonly message?: string; - readonly target?: string; -} - -// @public -export interface EventCategories { - list(options?: EventCategoriesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface EventCategoriesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EventCategoriesListResponse = EventCategoryCollection; - -// @public -export interface EventCategoryCollection { - value: LocalizableString[]; -} - -// @public -export interface EventData { - readonly authorization?: SenderAuthorization; - readonly caller?: string; - readonly category?: LocalizableString; - readonly claims?: { - [propertyName: string]: string; - }; - readonly correlationId?: string; - readonly description?: string; - readonly eventDataId?: string; - readonly eventName?: LocalizableString; - readonly eventTimestamp?: Date; - readonly httpRequest?: HttpRequestInfo; - readonly id?: string; - readonly level?: EventLevel; - readonly operationId?: string; - readonly operationName?: LocalizableString; - readonly properties?: { - [propertyName: string]: string; - }; - readonly resourceGroupName?: string; - readonly resourceId?: string; - readonly resourceProviderName?: LocalizableString; - readonly resourceType?: LocalizableString; - readonly status?: LocalizableString; - readonly submissionTimestamp?: Date; - readonly subscriptionId?: string; - readonly subStatus?: LocalizableString; - readonly tenantId?: string; -} - -// @public -export interface EventDataCollection { - nextLink?: string; - value: EventData[]; -} - -// @public -export interface EventHubReceiver { - eventHubName: string; - eventHubNameSpace: string; - name: string; - subscriptionId: string; - tenantId?: string; - useCommonAlertSchema?: boolean; -} - -// @public -export type EventLevel = "Critical" | "Error" | "Warning" | "Informational" | "Verbose"; - -// @public -export interface ExtensionDataSource { - extensionName: string; - extensionSettings?: Record; - inputDataSources?: string[]; - name?: string; - streams?: KnownExtensionDataSourceStreams[]; -} - -// @public -export function getContinuationToken(page: unknown): string | undefined; - -// @public -export interface HttpRequestInfo { - clientIpAddress?: string; - clientRequestId?: string; - method?: string; - uri?: string; -} - -// @public -export interface Identity { - readonly principalId?: string; - readonly tenantId?: string; - type: IdentityType; - userAssignedIdentities?: { - [propertyName: string]: UserIdentityProperties; - }; -} - -// @public -export type IdentityType = "SystemAssigned" | "UserAssigned" | "None"; - -// @public -export interface IisLogsDataSource { - logDirectories?: string[]; - name?: string; - streams: string[]; -} - -// @public -export interface Incident { - readonly activatedTime?: Date; - readonly isActive?: boolean; - readonly name?: string; - readonly resolvedTime?: Date; - readonly ruleName?: string; -} - -// @public -export interface IncidentListResult { - value?: Incident[]; -} - -// @public -export interface IngestionSettings { - readonly dataCollectionEndpointResourceId?: string; - readonly dataCollectionRuleResourceId?: string; -} - -// @public -export interface ItsmReceiver { - connectionId: string; - name: string; - region: string; - ticketConfiguration: string; - workspaceId: string; -} - -// @public -export type Kind = string; - -// @public -export enum KnownAccessMode { - Open = "Open", - PrivateOnly = "PrivateOnly" -} - -// @public -export enum KnownActionType { - Internal = "Internal" -} - -// @public -export enum KnownAggregationTypeEnum { - Average = "Average", - Count = "Count", - Maximum = "Maximum", - Minimum = "Minimum", - Total = "Total" -} - -// @public -export enum KnownAlertSeverity { - Four = 4, - One = 1, - Three = 3, - Two = 2, - Zero = 0 -} - -// @public -export enum KnownBaselineSensitivity { - High = "High", - Low = "Low", - Medium = "Medium" -} - -// @public -export enum KnownCategoryType { - Logs = "Logs", - Metrics = "Metrics" -} - -// @public -export type KnownColumnDefinitionType = string; - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" -} - -// @public -export enum KnownCriterionType { - DynamicThresholdCriterion = "DynamicThresholdCriterion", - StaticThresholdCriterion = "StaticThresholdCriterion" -} - -// @public -export type KnownDataCollectionEndpointProvisioningState = string; - -// @public -export type KnownDataCollectionEndpointResourceKind = string; - -// @public -export type KnownDataCollectionRuleAssociationProvisioningState = string; - -// @public -export type KnownDataCollectionRuleProvisioningState = string; - -// @public -export type KnownDataCollectionRuleResourceKind = string; - -// @public -export type KnownDataFlowStreams = string; - -// @public -export enum KnownDataStatus { - NotPresent = "notPresent", - Present = "present" -} - -// @public -export enum KnownDimensionOperator { - Exclude = "Exclude", - Include = "Include" -} - -// @public -export enum KnownDynamicThresholdOperator { - GreaterOrLessThan = "GreaterOrLessThan", - GreaterThan = "GreaterThan", - LessThan = "LessThan" -} - -// @public -export enum KnownDynamicThresholdSensitivity { - High = "High", - Low = "Low", - Medium = "Medium" -} - -// @public -export type KnownExtensionDataSourceStreams = string; - -// @public -export enum KnownKind { - LogAlert = "LogAlert", - LogToMetric = "LogToMetric" -} - -// @public -export enum KnownKnownColumnDefinitionType { - Boolean = "boolean", - Datetime = "datetime", - Dynamic = "dynamic", - Int = "int", - Long = "long", - Real = "real", - String = "string" -} - -// @public -export enum KnownKnownDataCollectionEndpointProvisioningState { - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownKnownDataCollectionEndpointResourceKind { - Linux = "Linux", - Windows = "Windows" -} - -// @public -export enum KnownKnownDataCollectionRuleAssociationProvisioningState { - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownKnownDataCollectionRuleProvisioningState { - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownKnownDataCollectionRuleResourceKind { - Linux = "Linux", - Windows = "Windows" -} - -// @public -export enum KnownKnownDataFlowStreams { - MicrosoftEvent = "Microsoft-Event", - MicrosoftInsightsMetrics = "Microsoft-InsightsMetrics", - MicrosoftPerf = "Microsoft-Perf", - MicrosoftSyslog = "Microsoft-Syslog", - MicrosoftWindowsEvent = "Microsoft-WindowsEvent" -} - -// @public -export enum KnownKnownExtensionDataSourceStreams { - MicrosoftEvent = "Microsoft-Event", - MicrosoftInsightsMetrics = "Microsoft-InsightsMetrics", - MicrosoftPerf = "Microsoft-Perf", - MicrosoftSyslog = "Microsoft-Syslog", - MicrosoftWindowsEvent = "Microsoft-WindowsEvent" -} - -// @public -export enum KnownKnownLogFilesDataSourceFormat { - Text = "text" -} - -// @public -export enum KnownKnownLogFileTextSettingsRecordStartTimestampFormat { - DdMMMYyyyHHMmSsZzz = "dd/MMM/yyyy:HH:mm:ss zzz", - DdMMyyHHMmSs = "ddMMyy HH:mm:ss", - ISO8601 = "ISO 8601", - MDYyyyHHMMSSAMPM = "M/D/YYYY HH:MM:SS AM/PM", - MMMDHhMmSs = "MMM d hh:mm:ss", - MonDDYyyyHHMMSS = "Mon DD, YYYY HH:MM:SS", - YyMMddHHMmSs = "yyMMdd HH:mm:ss", - YyyyMMDDHHMMSS = "YYYY-MM-DD HH:MM:SS", - YyyyMMDdTHHMmSsK = "yyyy-MM-ddTHH:mm:ssK" -} - -// @public -export enum KnownKnownPerfCounterDataSourceStreams { - MicrosoftInsightsMetrics = "Microsoft-InsightsMetrics", - MicrosoftPerf = "Microsoft-Perf" -} - -// @public -export enum KnownKnownPublicNetworkAccessOptions { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownKnownSyslogDataSourceFacilityNames { - Asterisk = "*", - Auth = "auth", - Authpriv = "authpriv", - Cron = "cron", - Daemon = "daemon", - Kern = "kern", - Local0 = "local0", - Local1 = "local1", - Local2 = "local2", - Local3 = "local3", - Local4 = "local4", - Local5 = "local5", - Local6 = "local6", - Local7 = "local7", - Lpr = "lpr", - Mail = "mail", - Mark = "mark", - News = "news", - Syslog = "syslog", - User = "user", - Uucp = "uucp" -} - -// @public -export enum KnownKnownSyslogDataSourceLogLevels { - Alert = "Alert", - Asterisk = "*", - Critical = "Critical", - Debug = "Debug", - Emergency = "Emergency", - Error = "Error", - Info = "Info", - Notice = "Notice", - Warning = "Warning" -} - -// @public -export enum KnownKnownSyslogDataSourceStreams { - MicrosoftSyslog = "Microsoft-Syslog" -} - -// @public -export enum KnownKnownWindowsEventLogDataSourceStreams { - MicrosoftEvent = "Microsoft-Event", - MicrosoftWindowsEvent = "Microsoft-WindowsEvent" -} - -// @public -export type KnownLogFilesDataSourceFormat = string; - -// @public -export type KnownLogFileTextSettingsRecordStartTimestampFormat = string; - -// @public -export enum KnownMetricClass { - Availability = "Availability", - Errors = "Errors", - Latency = "Latency", - Saturation = "Saturation", - Transactions = "Transactions" -} - -// @public -export enum KnownMetricUnit { - BitsPerSecond = "BitsPerSecond", - Bytes = "Bytes", - ByteSeconds = "ByteSeconds", - BytesPerSecond = "BytesPerSecond", - Cores = "Cores", - Count = "Count", - CountPerSecond = "CountPerSecond", - MilliCores = "MilliCores", - MilliSeconds = "MilliSeconds", - NanoCores = "NanoCores", - Percent = "Percent", - Seconds = "Seconds", - Unspecified = "Unspecified" -} - -// @public -export enum KnownNamespaceClassification { - Custom = "Custom", - Platform = "Platform", - Qos = "Qos" -} - -// @public -export enum KnownOdatatype { - MicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - MicrosoftAzureMonitorSingleResourceMultipleMetricCriteria = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", - MicrosoftAzureMonitorWebtestLocationAvailabilityCriteria = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" -} - -// @public -export enum KnownOnboardingStatus { - NotOnboarded = "notOnboarded", - Onboarded = "onboarded", - Unknown = "unknown" -} - -// @public -export enum KnownOperator { - Equals = "Equals", - GreaterThan = "GreaterThan", - GreaterThanOrEqual = "GreaterThanOrEqual", - LessThan = "LessThan", - LessThanOrEqual = "LessThanOrEqual" -} - -// @public -export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" -} - -// @public -export type KnownPerfCounterDataSourceStreams = string; - -// @public -export enum KnownPrivateEndpointConnectionProvisioningState { - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded" -} - -// @public -export enum KnownPrivateEndpointServiceConnectionStatus { - Approved = "Approved", - Pending = "Pending", - Rejected = "Rejected" -} - -// @public -export enum KnownProvisioningState { - Canceled = "Canceled", - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded" -} - -// @public -export enum KnownPublicNetworkAccess { - Disabled = "Disabled", - Enabled = "Enabled", - SecuredByPerimeter = "SecuredByPerimeter" -} - -// @public -export type KnownPublicNetworkAccessOptions = string; - -// @public -export enum KnownScaleRuleMetricDimensionOperationType { - Equals = "Equals", - NotEquals = "NotEquals" -} - -// @public -export type KnownSyslogDataSourceFacilityNames = string; - -// @public -export type KnownSyslogDataSourceLogLevels = string; - -// @public -export type KnownSyslogDataSourceStreams = string; - -// @public -export enum KnownTimeAggregation { - Average = "Average", - Count = "Count", - Maximum = "Maximum", - Minimum = "Minimum", - Total = "Total" -} - -// @public -export type KnownWindowsEventLogDataSourceStreams = string; - -// @public -export interface LocalizableString { - localizedValue?: string; - value: string; -} - -// @public -export interface LocationThresholdRuleCondition extends RuleCondition { - failedLocationCount: number; - odataType: "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"; - windowSize?: string; -} - -// @public -export interface LogAnalyticsDestination { - name?: string; - readonly workspaceId?: string; - workspaceResourceId?: string; -} - -// @public -export interface LogFilesDataSource { - filePatterns: string[]; - format: KnownLogFilesDataSourceFormat; - name?: string; - settings?: LogFilesDataSourceSettings; - streams: string[]; -} - -// @public -export interface LogFilesDataSourceSettings extends LogFileSettings { -} - -// @public -export interface LogFileSettings { - text?: LogFileSettingsText; -} - -// @public -export interface LogFileSettingsText extends LogFileTextSettings { -} - -// @public -export interface LogFileTextSettings { - recordStartTimestampFormat: KnownLogFileTextSettingsRecordStartTimestampFormat; -} - -// @public -export interface LogicAppReceiver { - callbackUrl: string; - name: string; - resourceId: string; - useCommonAlertSchema?: boolean; -} - -// @public -export interface LogProfileCollection { - value: LogProfileResource[]; -} - -// @public -export interface LogProfileResource extends ResourceAutoGenerated2 { - categories: string[]; - locations: string[]; - retentionPolicy: RetentionPolicy; - serviceBusRuleId?: string; - storageAccountId?: string; -} - -// @public -export interface LogProfileResourcePatch { - categories?: string[]; - locations?: string[]; - retentionPolicy?: RetentionPolicy; - serviceBusRuleId?: string; - storageAccountId?: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface LogProfiles { - createOrUpdate(logProfileName: string, parameters: LogProfileResource, options?: LogProfilesCreateOrUpdateOptionalParams): Promise; - delete(logProfileName: string, options?: LogProfilesDeleteOptionalParams): Promise; - get(logProfileName: string, options?: LogProfilesGetOptionalParams): Promise; - list(options?: LogProfilesListOptionalParams): PagedAsyncIterableIterator; - update(logProfileName: string, logProfilesResource: LogProfileResourcePatch, options?: LogProfilesUpdateOptionalParams): Promise; -} - -// @public -export interface LogProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LogProfilesCreateOrUpdateResponse = LogProfileResource; - -// @public -export interface LogProfilesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface LogProfilesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LogProfilesGetResponse = LogProfileResource; - -// @public -export interface LogProfilesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LogProfilesListResponse = LogProfileCollection; - -// @public -export interface LogProfilesUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LogProfilesUpdateResponse = LogProfileResource; - -// @public -export interface LogSettings { - category?: string; - categoryGroup?: string; - enabled: boolean; - retentionPolicy?: RetentionPolicy; -} - -// @public -export interface LogsIngestionEndpointSpec { - readonly endpoint?: string; -} - -// @public -export interface ManagementEventAggregationCondition { - operator?: ConditionOperator; - threshold?: number; - windowSize?: string; -} - -// @public -export interface ManagementEventRuleCondition extends RuleCondition { - aggregation?: ManagementEventAggregationCondition; - odataType: "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"; -} - -// @public -export interface Metadata { - readonly provisionedBy?: string; -} - -// @public -export interface MetadataValue { - name?: LocalizableString; - value?: string; -} - -// @public -export interface Metric { - displayDescription?: string; - errorCode?: string; - errorMessage?: string; - id: string; - name: LocalizableString; - timeseries: TimeSeriesElement[]; - type: string; - unit: MetricUnit; -} - -// @public -export interface MetricAlertAction { - actionGroupId?: string; - webHookProperties?: { - [propertyName: string]: string; - }; -} - -// @public -export interface MetricAlertCriteria { - [property: string]: any; - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" | "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" | "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"; -} - -// @public (undocumented) -export type MetricAlertCriteriaUnion = MetricAlertCriteria | MetricAlertSingleResourceMultipleMetricCriteria | WebtestLocationAvailabilityCriteria | MetricAlertMultipleResourceMultipleMetricCriteria; - -// @public -export interface MetricAlertMultipleResourceMultipleMetricCriteria extends MetricAlertCriteria { - allOf?: MultiMetricCriteriaUnion[]; - odataType: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"; -} - -// @public -export interface MetricAlertResource extends ResourceAutoGenerated4 { - actions?: MetricAlertAction[]; - autoMitigate?: boolean; - criteria: MetricAlertCriteriaUnion; - description?: string; - enabled: boolean; - evaluationFrequency: string; - readonly isMigrated?: boolean; - readonly lastUpdatedTime?: Date; - scopes: string[]; - severity: number; - targetResourceRegion?: string; - targetResourceType?: string; - windowSize: string; -} - -// @public -export interface MetricAlertResourceCollection { - value?: MetricAlertResource[]; -} - -// @public -export interface MetricAlertResourcePatch { - actions?: MetricAlertAction[]; - autoMitigate?: boolean; - criteria?: MetricAlertCriteriaUnion; - description?: string; - enabled?: boolean; - evaluationFrequency?: string; - readonly isMigrated?: boolean; - readonly lastUpdatedTime?: Date; - scopes?: string[]; - severity?: number; - tags?: { - [propertyName: string]: string; - }; - targetResourceRegion?: string; - targetResourceType?: string; - windowSize?: string; -} - -// @public -export interface MetricAlerts { - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: MetricAlertResource, options?: MetricAlertsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, ruleName: string, options?: MetricAlertsDeleteOptionalParams): Promise; - get(resourceGroupName: string, ruleName: string, options?: MetricAlertsGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: MetricAlertsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: MetricAlertsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, ruleName: string, parameters: MetricAlertResourcePatch, options?: MetricAlertsUpdateOptionalParams): Promise; -} - -// @public -export interface MetricAlertsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MetricAlertsCreateOrUpdateResponse = MetricAlertResource; - -// @public -export interface MetricAlertsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface MetricAlertsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MetricAlertsGetResponse = MetricAlertResource; - -// @public -export interface MetricAlertSingleResourceMultipleMetricCriteria extends MetricAlertCriteria { - allOf?: MetricCriteria[]; - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"; -} - -// @public -export interface MetricAlertsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MetricAlertsListByResourceGroupResponse = MetricAlertResourceCollection; - -// @public -export interface MetricAlertsListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MetricAlertsListBySubscriptionResponse = MetricAlertResourceCollection; - -// @public -export interface MetricAlertsStatus { - list(resourceGroupName: string, ruleName: string, options?: MetricAlertsStatusListOptionalParams): Promise; - listByName(resourceGroupName: string, ruleName: string, statusName: string, options?: MetricAlertsStatusListByNameOptionalParams): Promise; -} - -// @public -export interface MetricAlertsStatusListByNameOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MetricAlertsStatusListByNameResponse = MetricAlertStatusCollection; - -// @public -export interface MetricAlertsStatusListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MetricAlertsStatusListResponse = MetricAlertStatusCollection; - -// @public -export interface MetricAlertStatus { - id?: string; - name?: string; - properties?: MetricAlertStatusProperties; - type?: string; -} - -// @public -export interface MetricAlertStatusCollection { - value?: MetricAlertStatus[]; -} - -// @public -export interface MetricAlertStatusProperties { - dimensions?: { - [propertyName: string]: string; - }; - status?: string; - timestamp?: Date; -} - -// @public -export interface MetricAlertsUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MetricAlertsUpdateResponse = MetricAlertResource; - -// @public -export interface MetricAvailability { - retention?: string; - timeGrain?: string; -} - -// @public -export interface MetricBaselinesResponse { - value?: SingleMetricBaseline[]; -} - -// @public -export type MetricClass = string; - -// @public -export interface MetricCriteria extends MultiMetricCriteria { - criterionType: "StaticThresholdCriterion"; - operator: Operator; - threshold: number; -} - -// @public -export interface MetricDefinition { - category?: string; - dimensions?: LocalizableString[]; - displayDescription?: string; - id?: string; - isDimensionRequired?: boolean; - metricAvailabilities?: MetricAvailability[]; - metricClass?: MetricClass; - name?: LocalizableString; - namespace?: string; - primaryAggregationType?: AggregationType; - resourceId?: string; - supportedAggregationTypes?: AggregationType[]; - unit?: MetricUnit; -} - -// @public -export interface MetricDefinitionCollection { - value: MetricDefinition[]; -} - -// @public -export interface MetricDefinitions { - list(resourceUri: string, options?: MetricDefinitionsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface MetricDefinitionsListOptionalParams extends coreClient.OperationOptions { - metricnamespace?: string; -} - -// @public -export type MetricDefinitionsListResponse = MetricDefinitionCollection; - -// @public -export interface MetricDimension { - name: string; - operator: string; - values: string[]; -} - -// @public -export interface MetricNamespace { - classification?: NamespaceClassification; - id?: string; - name?: string; - properties?: MetricNamespaceName; - type?: string; -} - -// @public -export interface MetricNamespaceCollection { - value: MetricNamespace[]; -} - -// @public -export interface MetricNamespaceName { - metricNamespaceName?: string; -} - -// @public -export interface MetricNamespaces { - list(resourceUri: string, options?: MetricNamespacesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface MetricNamespacesListOptionalParams extends coreClient.OperationOptions { - startTime?: string; -} - -// @public -export type MetricNamespacesListResponse = MetricNamespaceCollection; - -// @public -export interface Metrics { - readonly internalId?: string; - readonly prometheusQueryEndpoint?: string; -} - -// @public -export interface MetricSettings { - category?: string; - enabled: boolean; - retentionPolicy?: RetentionPolicy; - timeGrain?: string; -} - -// @public -export interface MetricSingleDimension { - name: string; - value: string; -} - -// @public -export interface MetricsListOptionalParams extends coreClient.OperationOptions { - aggregation?: string; - filter?: string; - interval?: string; - metricnames?: string; - metricnamespace?: string; - orderby?: string; - resultType?: ResultType; - timespan?: string; - top?: number; -} - -// @public -export type MetricsListResponse = Response_2; - -// @public -export interface MetricsOperations { - list(resourceUri: string, options?: MetricsListOptionalParams): Promise; -} - -// @public -export type MetricStatisticType = "Average" | "Min" | "Max" | "Sum" | "Count"; - -// @public -export interface MetricTrigger { - dimensions?: ScaleRuleMetricDimension[]; - dividePerInstance?: boolean; - metricName: string; - metricNamespace?: string; - metricResourceLocation?: string; - metricResourceUri: string; - operator: ComparisonOperationType; - statistic: MetricStatisticType; - threshold: number; - timeAggregation: TimeAggregationType; - timeGrain: string; - timeWindow: string; -} - -// @public -export type MetricUnit = string; - -// @public -export interface MetricValue { - average?: number; - count?: number; - maximum?: number; - minimum?: number; - timeStamp: Date; - total?: number; -} - -// @public (undocumented) -export class MonitorClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MonitorClientOptionalParams); - // (undocumented) - actionGroups: ActionGroups; - // (undocumented) - activityLogAlerts: ActivityLogAlerts; - // (undocumented) - activityLogs: ActivityLogs; - // (undocumented) - alertRuleIncidents: AlertRuleIncidents; - // (undocumented) - alertRules: AlertRules; - // (undocumented) - autoscaleSettings: AutoscaleSettings; - // (undocumented) - azureMonitorWorkspaces: AzureMonitorWorkspaces; - // (undocumented) - baselines: Baselines; - // (undocumented) - dataCollectionEndpoints: DataCollectionEndpoints; - // (undocumented) - dataCollectionRuleAssociations: DataCollectionRuleAssociations; - // (undocumented) - dataCollectionRules: DataCollectionRules; - // (undocumented) - diagnosticSettings: DiagnosticSettings; - // (undocumented) - diagnosticSettingsCategory: DiagnosticSettingsCategory; - // (undocumented) - eventCategories: EventCategories; - // (undocumented) - logProfiles: LogProfiles; - // (undocumented) - metricAlerts: MetricAlerts; - // (undocumented) - metricAlertsStatus: MetricAlertsStatus; - // (undocumented) - metricDefinitions: MetricDefinitions; - // (undocumented) - metricNamespaces: MetricNamespaces; - // (undocumented) - metricsOperations: MetricsOperations; - // (undocumented) - monitorOperations: MonitorOperations; - // (undocumented) - operations: Operations; - // (undocumented) - predictiveMetric: PredictiveMetric; - // (undocumented) - privateEndpointConnections: PrivateEndpointConnections; - // (undocumented) - privateLinkResources: PrivateLinkResources; - // (undocumented) - privateLinkScopedResources: PrivateLinkScopedResources; - // (undocumented) - privateLinkScopeOperationStatus: PrivateLinkScopeOperationStatus; - // (undocumented) - privateLinkScopes: PrivateLinkScopes; - // (undocumented) - scheduledQueryRules: ScheduledQueryRules; - // (undocumented) - subscriptionId: string; - // (undocumented) - tenantActivityLogs: TenantActivityLogs; - // (undocumented) - vMInsights: VMInsights; -} - -// @public -export interface MonitorClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - endpoint?: string; -} - -// @public -export interface MonitorOperations { - list(options?: MonitorOperationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface MonitorOperationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MonitorOperationsListNextResponse = OperationListResultAutoGenerated; - -// @public -export interface MonitorOperationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type MonitorOperationsListResponse = OperationListResultAutoGenerated; - -// @public -export interface MultiMetricCriteria { - [property: string]: any; - criterionType: "StaticThresholdCriterion" | "DynamicThresholdCriterion"; - dimensions?: MetricDimension[]; - metricName: string; - metricNamespace?: string; - name: string; - skipMetricValidation?: boolean; - timeAggregation: AggregationTypeEnum; -} - -// @public (undocumented) -export type MultiMetricCriteriaUnion = MultiMetricCriteria | MetricCriteria | DynamicMetricCriteria; - -// @public -export type NamespaceClassification = string; - -// @public -export interface NetworkRuleSet { - publicNetworkAccess?: KnownPublicNetworkAccessOptions; -} - -// @public -export interface NotificationRequestBody { - alertType: string; - armRoleReceivers?: ArmRoleReceiver[]; - automationRunbookReceivers?: AutomationRunbookReceiver[]; - azureAppPushReceivers?: AzureAppPushReceiver[]; - azureFunctionReceivers?: AzureFunctionReceiver[]; - emailReceivers?: EmailReceiver[]; - eventHubReceivers?: EventHubReceiver[]; - itsmReceivers?: ItsmReceiver[]; - logicAppReceivers?: LogicAppReceiver[]; - smsReceivers?: SmsReceiver[]; - voiceReceivers?: VoiceReceiver[]; - webhookReceivers?: WebhookReceiver[]; -} - -// @public -export type Odatatype = string; - -// @public -export type OnboardingStatus = string; - -// @public -export interface Operation { - display?: OperationDisplay; - name?: string; -} - -// @public -export interface OperationAutoGenerated { - readonly actionType?: ActionType; - display?: OperationDisplayAutoGenerated; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; -} - -// @public -export interface OperationDisplay { - operation?: string; - provider?: string; - resource?: string; -} - -// @public -export interface OperationDisplayAutoGenerated { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; -} - -// @public -export interface OperationListResult { - nextLink?: string; - value?: Operation[]; -} - -// @public -export interface OperationListResultAutoGenerated { - readonly nextLink?: string; - readonly value?: OperationAutoGenerated[]; -} - -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): Promise; -} - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListResponse = OperationListResult; - -// @public -export interface OperationStatus { - endTime?: Date; - error?: ErrorDetail; - id?: string; - name?: string; - startTime?: Date; - status?: string; -} - -// @public -export type Operator = string; - -// @public -export type Origin = string; - -// @public -export interface PerfCounterDataSource { - counterSpecifiers?: string[]; - name?: string; - samplingFrequencyInSeconds?: number; - streams?: KnownPerfCounterDataSourceStreams[]; -} - -// @public -export interface PredictiveAutoscalePolicy { - scaleLookAheadTime?: string; - scaleMode: PredictiveAutoscalePolicyScaleMode; -} - -// @public -export type PredictiveAutoscalePolicyScaleMode = "Disabled" | "ForecastOnly" | "Enabled"; - -// @public -export interface PredictiveMetric { - get(resourceGroupName: string, autoscaleSettingName: string, timespan: string, interval: string, metricNamespace: string, metricName: string, aggregation: string, options?: PredictiveMetricGetOptionalParams): Promise; -} - -// @public -export interface PredictiveMetricGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PredictiveMetricGetResponse = PredictiveResponse; - -// @public -export interface PredictiveResponse { - data?: PredictiveValue[]; - interval?: string; - metricName?: string; - targetResourceId?: string; - timespan?: string; -} - -// @public -export interface PredictiveValue { - timeStamp: Date; - value: number; -} - -// @public -export interface PrivateEndpoint { - readonly id?: string; -} - -// @public -export interface PrivateEndpointConnection extends ResourceAutoGenerated3 { - privateEndpoint?: PrivateEndpoint; - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - readonly provisioningState?: PrivateEndpointConnectionProvisioningState; -} - -// @public -export interface PrivateEndpointConnectionListResult { - value?: PrivateEndpointConnection[]; -} - -// @public -export type PrivateEndpointConnectionProvisioningState = string; - -// @public -export interface PrivateEndpointConnections { - beginCreateOrUpdate(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; - get(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; - listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams): Promise; -} - -// @public -export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; - -// @public -export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; - -// @public -export interface PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateEndpointConnectionsListByPrivateLinkScopeResponse = PrivateEndpointConnectionListResult; - -// @public -export type PrivateEndpointServiceConnectionStatus = string; - -// @public -export interface PrivateLinkResource extends ResourceAutoGenerated3 { - readonly groupId?: string; - readonly requiredMembers?: string[]; - requiredZoneNames?: string[]; -} - -// @public -export interface PrivateLinkResourceListResult { - value?: PrivateLinkResource[]; -} - -// @public -export interface PrivateLinkResources { - get(resourceGroupName: string, scopeName: string, groupName: string, options?: PrivateLinkResourcesGetOptionalParams): Promise; - listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams): Promise; -} - -// @public -export interface PrivateLinkResourcesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkResourcesGetResponse = PrivateLinkResource; - -// @public -export interface PrivateLinkResourcesListByPrivateLinkScopeOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkResourcesListByPrivateLinkScopeResponse = PrivateLinkResourceListResult; - -// @public -export interface PrivateLinkScopedResources { - beginCreateOrUpdate(resourceGroupName: string, scopeName: string, name: string, parameters: ScopedResource, options?: PrivateLinkScopedResourcesCreateOrUpdateOptionalParams): Promise, PrivateLinkScopedResourcesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, scopeName: string, name: string, parameters: ScopedResource, options?: PrivateLinkScopedResourcesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, scopeName: string, name: string, options?: PrivateLinkScopedResourcesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, scopeName: string, name: string, options?: PrivateLinkScopedResourcesDeleteOptionalParams): Promise; - get(resourceGroupName: string, scopeName: string, name: string, options?: PrivateLinkScopedResourcesGetOptionalParams): Promise; - listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface PrivateLinkScopedResourcesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type PrivateLinkScopedResourcesCreateOrUpdateResponse = ScopedResource; - -// @public -export interface PrivateLinkScopedResourcesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PrivateLinkScopedResourcesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopedResourcesGetResponse = ScopedResource; - -// @public -export interface PrivateLinkScopedResourcesListByPrivateLinkScopeNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopedResourcesListByPrivateLinkScopeNextResponse = ScopedResourceListResult; - -// @public -export interface PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopedResourcesListByPrivateLinkScopeResponse = ScopedResourceListResult; - -// @public -export interface PrivateLinkScopeOperationStatus { - get(asyncOperationId: string, resourceGroupName: string, options?: PrivateLinkScopeOperationStatusGetOptionalParams): Promise; -} - -// @public -export interface PrivateLinkScopeOperationStatusGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopeOperationStatusGetResponse = OperationStatus; - -// @public -export interface PrivateLinkScopes { - beginDelete(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, scopeName: string, azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope, options?: PrivateLinkScopesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, scopeName: string, options?: PrivateLinkScopesGetOptionalParams): Promise; - list(options?: PrivateLinkScopesListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: PrivateLinkScopesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, scopeName: string, privateLinkScopeTags: TagsResource, options?: PrivateLinkScopesUpdateTagsOptionalParams): Promise; -} - -// @public -export interface PrivateLinkScopesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopesCreateOrUpdateResponse = AzureMonitorPrivateLinkScope; - -// @public -export interface PrivateLinkScopesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface PrivateLinkScopesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopesGetResponse = AzureMonitorPrivateLinkScope; - -// @public -export interface PrivateLinkScopesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopesListByResourceGroupNextResponse = AzureMonitorPrivateLinkScopeListResult; - -// @public -export interface PrivateLinkScopesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopesListByResourceGroupResponse = AzureMonitorPrivateLinkScopeListResult; - -// @public -export interface PrivateLinkScopesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopesListNextResponse = AzureMonitorPrivateLinkScopeListResult; - -// @public -export interface PrivateLinkScopesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopesListResponse = AzureMonitorPrivateLinkScopeListResult; - -// @public -export interface PrivateLinkScopesUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type PrivateLinkScopesUpdateTagsResponse = AzureMonitorPrivateLinkScope; - -// @public -export interface PrivateLinkServiceConnectionState { - actionsRequired?: string; - description?: string; - status?: PrivateEndpointServiceConnectionStatus; -} - -// @public -export type ProvisioningState = string; - -// @public -export interface ProxyResource { - readonly id?: string; - readonly name?: string; - readonly type?: string; -} - -// @public -export interface ProxyResourceAutoGenerated extends ResourceAutoGenerated3 { -} - -// @public -export type PublicNetworkAccess = string; - -// @public -export type ReceiverStatus = "NotSpecified" | "Enabled" | "Disabled"; - -// @public -export interface Recurrence { - frequency: RecurrenceFrequency; - schedule: RecurrentSchedule; -} - -// @public -export type RecurrenceFrequency = "None" | "Second" | "Minute" | "Hour" | "Day" | "Week" | "Month" | "Year"; - -// @public -export interface RecurrentSchedule { - days: string[]; - hours: number[]; - minutes: number[]; - timeZone: string; -} - -// @public -export interface Resource { - readonly id?: string; - location: string; - readonly name?: string; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface ResourceAutoGenerated { - readonly id?: string; - location: string; - readonly name?: string; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface ResourceAutoGenerated2 { - readonly id?: string; - location: string; - readonly name?: string; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface ResourceAutoGenerated3 { - readonly id?: string; - readonly name?: string; - readonly type?: string; -} - -// @public -export interface ResourceAutoGenerated4 { - readonly id?: string; - location: string; - readonly name?: string; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface ResourceAutoGenerated5 { - readonly id?: string; - readonly name?: string; - readonly systemData?: SystemData; - readonly type?: string; -} - -// @public -export interface ResourceForUpdate { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -interface Response_2 { - cost?: number; - interval?: string; - namespace?: string; - resourceregion?: string; - timespan: string; - value: Metric[]; -} -export { Response_2 as Response } - -// @public -export interface ResponseWithError { - error: ErrorModel; -} - -// @public -export type ResultType = "Data" | "Metadata"; - -// @public -export interface RetentionPolicy { - days: number; - enabled: boolean; -} - -// @public -export interface RuleAction { - odataType: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" | "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"; -} - -// @public (undocumented) -export type RuleActionUnion = RuleAction | RuleEmailAction | RuleWebhookAction; - -// @public -export interface RuleCondition { - dataSource?: RuleDataSourceUnion; - odataType: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" | "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" | "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"; -} - -// @public (undocumented) -export type RuleConditionUnion = RuleCondition | ThresholdRuleCondition | LocationThresholdRuleCondition | ManagementEventRuleCondition; - -// @public -export interface RuleDataSource { - legacyResourceId?: string; - metricNamespace?: string; - odataType: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" | "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"; - resourceLocation?: string; - resourceUri?: string; -} - -// @public (undocumented) -export type RuleDataSourceUnion = RuleDataSource | RuleMetricDataSource | RuleManagementEventDataSource; - -// @public -export interface RuleEmailAction extends RuleAction { - customEmails?: string[]; - odataType: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction"; - sendToServiceOwners?: boolean; -} - -// @public -export interface RuleManagementEventClaimsDataSource { - emailAddress?: string; -} - -// @public -export interface RuleManagementEventDataSource extends RuleDataSource { - claims?: RuleManagementEventClaimsDataSource; - eventName?: string; - eventSource?: string; - level?: string; - odataType: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"; - operationName?: string; - resourceGroupName?: string; - resourceProviderName?: string; - status?: string; - subStatus?: string; -} - -// @public -export interface RuleMetricDataSource extends RuleDataSource { - metricName?: string; - odataType: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"; -} - -// @public -export interface RuleResolveConfiguration { - autoResolved?: boolean; - timeToResolve?: string; -} - -// @public -export interface RuleWebhookAction extends RuleAction { - odataType: "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"; - properties?: { - [propertyName: string]: string; - }; - serviceUri?: string; -} - -// @public -export interface ScaleAction { - cooldown: string; - direction: ScaleDirection; - type: ScaleType; - value?: string; -} - -// @public -export interface ScaleCapacity { - default: string; - maximum: string; - minimum: string; -} - -// @public -export type ScaleDirection = "None" | "Increase" | "Decrease"; - -// @public -export interface ScaleRule { - metricTrigger: MetricTrigger; - scaleAction: ScaleAction; -} - -// @public -export interface ScaleRuleMetricDimension { - dimensionName: string; - operator: ScaleRuleMetricDimensionOperationType; - values: string[]; -} - -// @public -export type ScaleRuleMetricDimensionOperationType = string; - -// @public -export type ScaleType = "ChangeCount" | "PercentChangeCount" | "ExactCount" | "ServiceAllowedNextValue"; - -// @public -export interface ScheduledQueryRuleCriteria { - allOf?: Condition[]; -} - -// @public -export interface ScheduledQueryRuleResource { - actions?: Actions; - autoMitigate?: boolean; - checkWorkspaceAlertsStorageConfigured?: boolean; - readonly createdWithApiVersion?: string; - criteria?: ScheduledQueryRuleCriteria; - description?: string; - displayName?: string; - enabled?: boolean; - readonly etag?: string; - evaluationFrequency?: string; - readonly id?: string; - identity?: Identity; - readonly isLegacyLogAnalyticsRule?: boolean; - readonly isWorkspaceAlertsStorageConfigured?: boolean; - kind?: Kind; - location: string; - muteActionsDuration?: string; - readonly name?: string; - overrideQueryTimeRange?: string; - publicNetworkAccess?: PublicNetworkAccess; - ruleResolveConfiguration?: RuleResolveConfiguration; - scopes?: string[]; - severity?: AlertSeverity; - skipQueryValidation?: boolean; - readonly systemData?: SystemData; - tags?: { - [propertyName: string]: string; - }; - targetResourceTypes?: string[]; - readonly type?: string; - windowSize?: string; -} - -// @public -export interface ScheduledQueryRuleResourceCollection { - readonly nextLink?: string; - value?: ScheduledQueryRuleResource[]; -} - -// @public -export interface ScheduledQueryRuleResourcePatch { - actions?: Actions; - autoMitigate?: boolean; - checkWorkspaceAlertsStorageConfigured?: boolean; - readonly createdWithApiVersion?: string; - criteria?: ScheduledQueryRuleCriteria; - description?: string; - displayName?: string; - enabled?: boolean; - evaluationFrequency?: string; - identity?: Identity; - readonly isLegacyLogAnalyticsRule?: boolean; - readonly isWorkspaceAlertsStorageConfigured?: boolean; - muteActionsDuration?: string; - overrideQueryTimeRange?: string; - publicNetworkAccess?: PublicNetworkAccess; - ruleResolveConfiguration?: RuleResolveConfiguration; - scopes?: string[]; - severity?: AlertSeverity; - skipQueryValidation?: boolean; - tags?: { - [propertyName: string]: string; - }; - targetResourceTypes?: string[]; - windowSize?: string; -} - -// @public -export interface ScheduledQueryRules { - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: ScheduledQueryRuleResource, options?: ScheduledQueryRulesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, ruleName: string, options?: ScheduledQueryRulesDeleteOptionalParams): Promise; - get(resourceGroupName: string, ruleName: string, options?: ScheduledQueryRulesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: ScheduledQueryRulesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: ScheduledQueryRulesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, ruleName: string, parameters: ScheduledQueryRuleResourcePatch, options?: ScheduledQueryRulesUpdateOptionalParams): Promise; -} - -// @public -export interface ScheduledQueryRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScheduledQueryRulesCreateOrUpdateResponse = ScheduledQueryRuleResource; - -// @public -export interface ScheduledQueryRulesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ScheduledQueryRulesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScheduledQueryRulesGetResponse = ScheduledQueryRuleResource; - -// @public -export interface ScheduledQueryRulesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScheduledQueryRulesListByResourceGroupNextResponse = ScheduledQueryRuleResourceCollection; - -// @public -export interface ScheduledQueryRulesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScheduledQueryRulesListByResourceGroupResponse = ScheduledQueryRuleResourceCollection; - -// @public -export interface ScheduledQueryRulesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScheduledQueryRulesListBySubscriptionNextResponse = ScheduledQueryRuleResourceCollection; - -// @public -export interface ScheduledQueryRulesListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScheduledQueryRulesListBySubscriptionResponse = ScheduledQueryRuleResourceCollection; - -// @public -export interface ScheduledQueryRulesUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ScheduledQueryRulesUpdateResponse = ScheduledQueryRuleResource; - -// @public -export interface ScopedResource extends ProxyResourceAutoGenerated { - linkedResourceId?: string; - readonly provisioningState?: string; - readonly systemData?: SystemData; -} - -// @public -export interface ScopedResourceListResult { - readonly nextLink?: string; - readonly value?: ScopedResource[]; -} - -// @public -export interface SenderAuthorization { - action?: string; - role?: string; - scope?: string; -} - -// @public -export interface SingleBaseline { - highThresholds: number[]; - lowThresholds: number[]; - sensitivity: BaselineSensitivity; -} - -// @public -export interface SingleMetricBaseline { - baselines: TimeSeriesBaseline[]; - id: string; - interval: string; - name: string; - namespace?: string; - timespan: string; - type: string; -} - -// @public -export interface SmsReceiver { - countryCode: string; - name: string; - phoneNumber: string; - readonly status?: ReceiverStatus; -} - -// @public -export interface StreamDeclaration { - columns?: ColumnDefinition[]; -} - -// @public -export interface SyslogDataSource { - facilityNames?: KnownSyslogDataSourceFacilityNames[]; - logLevels?: KnownSyslogDataSourceLogLevels[]; - name?: string; - streams?: KnownSyslogDataSourceStreams[]; -} - -// @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface TagsResource { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface TenantActivityLogs { - list(options?: TenantActivityLogsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface TenantActivityLogsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type TenantActivityLogsListNextResponse = EventDataCollection; - -// @public -export interface TenantActivityLogsListOptionalParams extends coreClient.OperationOptions { - filter?: string; - select?: string; -} - -// @public -export type TenantActivityLogsListResponse = EventDataCollection; - -// @public -export interface TestNotificationDetailsResponse { - actionDetails?: ActionDetail[]; - completedTime?: string; - context?: Context; - createdTime?: string; - state: string; -} - -// @public -export interface ThresholdRuleCondition extends RuleCondition { - odataType: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"; - operator: ConditionOperator; - threshold: number; - timeAggregation?: TimeAggregationOperator; - windowSize?: string; -} - -// @public -export type TimeAggregation = string; - -// @public -export type TimeAggregationOperator = "Average" | "Minimum" | "Maximum" | "Total" | "Last"; - -// @public -export type TimeAggregationType = "Average" | "Minimum" | "Maximum" | "Total" | "Count" | "Last"; - -// @public -export interface TimeSeriesBaseline { - aggregation: string; - data: SingleBaseline[]; - dimensions?: MetricSingleDimension[]; - metadataValues?: BaselineMetadata[]; - timestamps: Date[]; -} - -// @public -export interface TimeSeriesElement { - data?: MetricValue[]; - metadatavalues?: MetadataValue[]; -} - -// @public -export interface TimeWindow { - end: Date; - start: Date; - timeZone?: string; -} - -// @public -export interface TrackedResource extends ResourceAutoGenerated3 { - location: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface TrackedResourceAutoGenerated extends ResourceAutoGenerated5 { - location: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface UserIdentityProperties { - readonly clientId?: string; - readonly principalId?: string; -} - -// @public -export interface VMInsights { - getOnboardingStatus(resourceUri: string, options?: VMInsightsGetOnboardingStatusOptionalParams): Promise; -} - -// @public -export interface VMInsightsGetOnboardingStatusOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type VMInsightsGetOnboardingStatusResponse = VMInsightsOnboardingStatus; - -// @public -export interface VMInsightsOnboardingStatus extends ProxyResource { - data?: DataContainer[]; - dataStatus?: DataStatus; - onboardingStatus?: OnboardingStatus; - resourceId?: string; -} - -// @public -export interface VoiceReceiver { - countryCode: string; - name: string; - phoneNumber: string; -} - -// @public -export interface WebhookNotification { - properties?: { - [propertyName: string]: string; - }; - serviceUri?: string; -} - -// @public -export interface WebhookReceiver { - identifierUri?: string; - name: string; - objectId?: string; - serviceUri: string; - tenantId?: string; - useAadAuth?: boolean; - useCommonAlertSchema?: boolean; -} - -// @public -export interface WebtestLocationAvailabilityCriteria extends MetricAlertCriteria { - componentId: string; - failedLocationCount: number; - odataType: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria"; - webTestId: string; -} - -// @public -export interface WindowsEventLogDataSource { - name?: string; - streams?: KnownWindowsEventLogDataSourceStreams[]; - xPathQueries?: string[]; -} - -// @public -export interface WorkspaceInfo { - customerId: string; - id: string; - location: string; } // (No @packageDocumentation comment for this package) diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.ts deleted file mode 100644 index f675456f49f4..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NotificationRequestBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtActionGroupResourceLevel.json - */ -async function createNotificationsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestRgName"; - const actionGroupName = "TestAgName"; - const notificationRequest: NotificationRequestBody = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false - } - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084" - } - ], - azureAppPushReceivers: [ - { name: "Sample azureAppPush", emailAddress: "johndoe@email.com" } - ], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true - } - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true - } - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84" - } - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: - "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c" - } - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false - } - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890" - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321" - } - ], - voiceReceivers: [ - { name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" } - ], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true - }, - { - name: "Sample webhook 2", - identifierUri: - "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.beginCreateNotificationsAtActionGroupResourceLevelAndWait( - resourceGroupName, - actionGroupName, - notificationRequest - ); - console.log(result); -} - -async function main() { - createNotificationsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateNotificationsAtResourceGroupLevelSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateNotificationsAtResourceGroupLevelSample.ts deleted file mode 100644 index ef9f52b11f34..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateNotificationsAtResourceGroupLevelSample.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NotificationRequestBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtResourceGroupLevel.json - */ -async function createNotificationsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-TestNotifications"; - const notificationRequest: NotificationRequestBody = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false - } - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084" - } - ], - azureAppPushReceivers: [ - { name: "Sample azureAppPush", emailAddress: "johndoe@email.com" } - ], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true - } - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true - } - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84" - } - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: - "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c" - } - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false - } - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890" - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321" - } - ], - voiceReceivers: [ - { name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" } - ], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true - }, - { - name: "Sample webhook 2", - identifierUri: - "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.beginCreateNotificationsAtResourceGroupLevelAndWait( - resourceGroupName, - notificationRequest - ); - console.log(result); -} - -async function main() { - createNotificationsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 0d8f5181c84d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ActionGroupResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new action group or update an existing one. - * - * @summary Create a new action group or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/createOrUpdateActionGroup.json - */ -async function createOrUpdateAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const actionGroup: ActionGroupResource = { - armRoleReceivers: [ - { - name: "Sample armRole", - roleId: "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", - useCommonAlertSchema: true - } - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084" - } - ], - azureAppPushReceivers: [ - { name: "Sample azureAppPush", emailAddress: "johndoe@email.com" } - ], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true - } - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true - } - ], - enabled: true, - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84" - } - ], - groupShortName: "sample", - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: - "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c" - } - ], - location: "Global", - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false - } - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890" - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321" - } - ], - tags: {}, - voiceReceivers: [ - { name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" } - ], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true - }, - { - name: "Sample webhook 2", - identifierUri: - "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.createOrUpdate( - resourceGroupName, - actionGroupName, - actionGroup - ); - console.log(result); -} - -async function main() { - createOrUpdateAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsDeleteSample.ts deleted file mode 100644 index 7b955a5715d2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an action group. - * - * @summary Delete an action group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/deleteActionGroup.json - */ -async function deleteAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.delete( - resourceGroupName, - actionGroupName - ); - console.log(result); -} - -async function main() { - deleteAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsEnableReceiverSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsEnableReceiverSample.ts deleted file mode 100644 index cff901ba8be7..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsEnableReceiverSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { EnableRequest, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. - * - * @summary Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/enableReceiver.json - */ -async function enableTheReceiver() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const enableRequest: EnableRequest = { receiverName: "John Doe's mobile" }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.enableReceiver( - resourceGroupName, - actionGroupName, - enableRequest - ); - console.log(result); -} - -async function main() { - enableTheReceiver(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetSample.ts deleted file mode 100644 index 39fe3b9fca0a..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get an action group. - * - * @summary Get an action group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getActionGroup.json - */ -async function getAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.get( - resourceGroupName, - actionGroupName - ); - console.log(result); -} - -async function main() { - getAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.ts deleted file mode 100644 index cf60c919b027..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtActionGroupResourceLevel.json - */ -async function getNotificationDetailsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestRgName"; - const actionGroupName = "TestAgName"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotificationsAtActionGroupResourceLevel( - resourceGroupName, - actionGroupName, - notificationId - ); - console.log(result); -} - -async function main() { - getNotificationDetailsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.ts deleted file mode 100644 index 2d98821e1de7..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtResourceGroupLevel.json - */ -async function getNotificationDetailsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-TestNotifications"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotificationsAtResourceGroupLevel( - resourceGroupName, - notificationId - ); - console.log(result); -} - -async function main() { - getNotificationDetailsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsSample.ts deleted file mode 100644 index 25cd9a72018c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsGetTestNotificationsSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotifications.json - */ -async function getNotificationDetailsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotifications(notificationId); - console.log(result); -} - -async function main() { - getNotificationDetailsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsListByResourceGroupSample.ts deleted file mode 100644 index 505dc900d581..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all action groups in a resource group. - * - * @summary Get a list of all action groups in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json - */ -async function listActionGroupsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.actionGroups.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActionGroupsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsListBySubscriptionIdSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsListBySubscriptionIdSample.ts deleted file mode 100644 index 1b40a18b9ef0..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsListBySubscriptionIdSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all action groups in a subscription. - * - * @summary Get a list of all action groups in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json - */ -async function listActionGroupsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.actionGroups.listBySubscriptionId()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActionGroupsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsPostTestNotificationsSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsPostTestNotificationsSample.ts deleted file mode 100644 index 153ade7de654..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsPostTestNotificationsSample.ts +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NotificationRequestBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotifications.json - */ -async function createNotificationsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const notificationRequest: NotificationRequestBody = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false - } - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084" - } - ], - azureAppPushReceivers: [ - { name: "Sample azureAppPush", emailAddress: "johndoe@email.com" } - ], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true - } - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true - } - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84" - } - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: - "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c" - } - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false - } - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890" - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321" - } - ], - voiceReceivers: [ - { name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" } - ], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true - }, - { - name: "Sample webhook 2", - identifierUri: - "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.beginPostTestNotificationsAndWait( - notificationRequest - ); - console.log(result); -} - -async function main() { - createNotificationsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/actionGroupsUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/actionGroupsUpdateSample.ts deleted file mode 100644 index 80b2b49eabac..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/actionGroupsUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ActionGroupPatchBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/patchActionGroup.json - */ -async function patchAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const actionGroupPatch: ActionGroupPatchBody = { - enabled: false, - tags: { key1: "value1", key2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.update( - resourceGroupName, - actionGroupName, - actionGroupPatch - ); - console.log(result); -} - -async function main() { - patchAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsCreateOrUpdateSample.ts deleted file mode 100644 index b3c9a4e2f415..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsCreateOrUpdateSample.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ActivityLogAlertResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdate.json - */ -async function createOrUpdateAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const activityLogAlertRule: ActivityLogAlertResource = { - description: "Description of sample Activity Log Alert rule.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" } - } - ] - }, - condition: { - allOf: [ - { equals: "Administrative", field: "category" }, - { equals: "Error", field: "level" } - ] - }, - enabled: true, - location: "Global", - scopes: ["/subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithAnyOfCondition.json - */ -async function createOrUpdateAnActivityLogAlertRuleWithAnyOfCondition() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRuleWithAnyOfCondition"; - const activityLogAlertRule: ActivityLogAlertResource = { - description: - "Description of sample Activity Log Alert rule with 'anyOf' condition.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" } - } - ] - }, - condition: { - allOf: [ - { equals: "ServiceHealth", field: "category" }, - { - anyOf: [ - { equals: "Incident", field: "properties.incidentType" }, - { equals: "Maintenance", field: "properties.incidentType" } - ] - } - ] - }, - enabled: true, - location: "Global", - scopes: ["subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithContainsAny.json - */ -async function createOrUpdateAnActivityLogAlertRuleWithContainsAny() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRuleWithContainsAny"; - const activityLogAlertRule: ActivityLogAlertResource = { - description: - "Description of sample Activity Log Alert rule with 'containsAny'.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" } - } - ] - }, - condition: { - allOf: [ - { equals: "ServiceHealth", field: "category" }, - { - containsAny: ["North Europe", "West Europe"], - field: "properties.impactedServices[*].ImpactedRegions[*].RegionName" - } - ] - }, - enabled: true, - location: "Global", - scopes: ["subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -async function main() { - createOrUpdateAnActivityLogAlertRule(); - createOrUpdateAnActivityLogAlertRuleWithAnyOfCondition(); - createOrUpdateAnActivityLogAlertRuleWithContainsAny(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsDeleteSample.ts deleted file mode 100644 index 15271385aee4..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an Activity Log Alert rule. - * - * @summary Delete an Activity Log Alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Delete.json - */ -async function deleteAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.delete( - resourceGroupName, - activityLogAlertName - ); - console.log(result); -} - -async function main() { - deleteAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsGetSample.ts deleted file mode 100644 index 9e1909525bc2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get an Activity Log Alert rule. - * - * @summary Get an Activity Log Alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Get.json - */ -async function getAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.get( - resourceGroupName, - activityLogAlertName - ); - console.log(result); -} - -async function main() { - getAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsListByResourceGroupSample.ts deleted file mode 100644 index a198638e54b2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all Activity Log Alert rules in a resource group. - * - * @summary Get a list of all Activity Log Alert rules in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListByResourceGroupName.json - */ -async function listActivityLogAlerts() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogAlerts.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActivityLogAlerts(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsListBySubscriptionIdSample.ts b/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsListBySubscriptionIdSample.ts deleted file mode 100644 index 173f96e013a3..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsListBySubscriptionIdSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all Activity Log Alert rules in a subscription. - * - * @summary Get a list of all Activity Log Alert rules in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListBySubscriptionId.json - */ -async function getListOfAllActivityLogAlertRulesUnderASubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogAlerts.listBySubscriptionId()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getListOfAllActivityLogAlertRulesUnderASubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsUpdateSample.ts deleted file mode 100644 index 54bd68fc2c84..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogAlertsUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AlertRulePatchObject, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. - * - * @summary Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Update.json - */ -async function patchAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const activityLogAlertRulePatch: AlertRulePatchObject = { - enabled: false, - tags: { key1: "value1", key2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.update( - resourceGroupName, - activityLogAlertName, - activityLogAlertRulePatch - ); - console.log(result); -} - -async function main() { - patchAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/activityLogsListSample.ts b/sdk/monitor/arm-monitor/samples-dev/activityLogsListSample.ts deleted file mode 100644 index d58594916b8c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/activityLogsListSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ActivityLogsListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Provides the list of records from the activity logs. - * - * @summary Provides the list of records from the activity logs. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsFiltered.json - */ -async function getActivityLogsWithFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogs.list(filter)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Provides the list of records from the activity logs. - * - * @summary Provides the list of records from the activity logs. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsFilteredAndSelected.json - */ -async function getActivityLogsWithFilterAndSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options: ActivityLogsListOptionalParams = { select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogs.list(filter, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getActivityLogsWithFilter(); - getActivityLogsWithFilterAndSelect(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/alertRuleIncidentsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/alertRuleIncidentsGetSample.ts deleted file mode 100644 index fb92424c0220..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRuleIncidentsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets an incident associated to an alert rule - * - * @summary Gets an incident associated to an alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRuleIncident.json - */ -async function getASingleAlertRuleIncident() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "myRuleName"; - const incidentName = "Website_started"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRuleIncidents.get( - resourceGroupName, - ruleName, - incidentName - ); - console.log(result); -} - -async function main() { - getASingleAlertRuleIncident(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/alertRuleIncidentsListByAlertRuleSample.ts b/sdk/monitor/arm-monitor/samples-dev/alertRuleIncidentsListByAlertRuleSample.ts deleted file mode 100644 index 0dc8d87947d2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRuleIncidentsListByAlertRuleSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of incidents associated to an alert rule - * - * @summary Gets a list of incidents associated to an alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleIncidents.json - */ -async function listAlertRuleIncidents() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "myRuleName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRuleIncidents.listByAlertRule( - resourceGroupName, - ruleName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRuleIncidents(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/alertRulesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/alertRulesCreateOrUpdateSample.ts deleted file mode 100644 index dfe78856925c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AlertRuleResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a classic metric alert rule. - * - * @summary Creates or updates a classic metric alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateAlertRule.json - */ -async function createOrUpdateAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const parameters: AlertRuleResource = { - namePropertiesName: "chiricutin", - description: "Pura Vida", - actions: [], - condition: { - dataSource: { - metricName: "Requests", - odataType: - "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - resourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest" - }, - odataType: - "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - operator: "GreaterThan", - threshold: 3, - timeAggregation: "Total", - windowSize: "PT5M" - }, - isEnabled: true, - location: "West US", - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/alertRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/alertRulesDeleteSample.ts deleted file mode 100644 index 6bd0b7f8913b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a classic metric alert rule - * - * @summary Deletes a classic metric alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteAlertRule.json - */ -async function deleteAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.delete(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - deleteAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/alertRulesGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/alertRulesGetSample.ts deleted file mode 100644 index 1eed90dfd819..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a classic metric alert rule - * - * @summary Gets a classic metric alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRule.json - */ -async function getAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.get(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - getAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/alertRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/alertRulesListByResourceGroupSample.ts deleted file mode 100644 index 3b5450f105b0..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the classic metric alert rules within a resource group. - * - * @summary List the classic metric alert rules within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRule.json - */ -async function listAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRules.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/alertRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples-dev/alertRulesListBySubscriptionSample.ts deleted file mode 100644 index 04a8b5846cd7..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the classic metric alert rules within a subscription. - * - * @summary List the classic metric alert rules within a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleBySubscription.json - */ -async function listAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/alertRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/alertRulesUpdateSample.ts deleted file mode 100644 index 5096a58eb37f..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/alertRulesUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AlertRuleResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchAlertRule.json - */ -async function patchAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const alertRulesResource: AlertRuleResourcePatch = { - name: "chiricutin", - description: "Pura Vida", - actions: [], - condition: { - dataSource: { - metricName: "Requests", - odataType: - "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - resourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest" - }, - odataType: - "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - operator: "GreaterThan", - threshold: 3, - timeAggregation: "Total", - windowSize: "PT5M" - }, - isEnabled: true, - tags: { - $type: - "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.update( - resourceGroupName, - ruleName, - alertRulesResource - ); - console.log(result); -} - -async function main() { - patchAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsCreateOrUpdateSample.ts deleted file mode 100644 index 9c9021581f86..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AutoscaleSettingResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an autoscale setting. - * - * @summary Creates or updates an autoscale setting. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/createOrUpdateAutoscaleSetting.json - */ -async function createOrUpdateAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const parameters: AutoscaleSettingResource = { - enabled: true, - location: "West US", - notifications: [ - { - email: { - customEmails: ["gu@ms.com", "ge@ns.net"], - sendToSubscriptionAdministrator: true, - sendToSubscriptionCoAdministrators: true - }, - operation: "Scale", - webhooks: [{ properties: {}, serviceUri: "http://myservice.com" }] - } - ], - predictiveAutoscalePolicy: { scaleMode: "Enabled" }, - profiles: [ - { - name: "adios", - capacity: { default: "1", maximum: "10", minimum: "1" }, - fixedDate: { - end: new Date("2015-03-05T14:30:00Z"), - start: new Date("2015-03-05T14:00:00Z"), - timeZone: "UTC" - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1" - } - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2" - } - } - ] - }, - { - name: "saludos", - capacity: { default: "1", maximum: "10", minimum: "1" }, - recurrence: { - frequency: "Week", - schedule: { days: ["1"], hours: [5], minutes: [15], timeZone: "UTC" } - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1" - } - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2" - } - } - ] - } - ], - tags: { key1: "value1", key2: "value2" }, - targetResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.createOrUpdate( - resourceGroupName, - autoscaleSettingName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsDeleteSample.ts deleted file mode 100644 index d40921fc31be..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes and autoscale setting - * - * @summary Deletes and autoscale setting - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json - */ -async function deleteAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.delete( - resourceGroupName, - autoscaleSettingName - ); - console.log(result); -} - -async function main() { - deleteAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsGetSample.ts deleted file mode 100644 index 8d41ae5c506b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets an autoscale setting - * - * @summary Gets an autoscale setting - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/getAutoscaleSetting.json - */ -async function getAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.get( - resourceGroupName, - autoscaleSettingName - ); - console.log(result); -} - -async function main() { - getAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsListByResourceGroupSample.ts deleted file mode 100644 index 27a63fcea6f6..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the autoscale settings for a resource group - * - * @summary Lists the autoscale settings for a resource group - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSetting.json - */ -async function listAutoscaleSettings() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.autoscaleSettings.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAutoscaleSettings(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsListBySubscriptionSample.ts deleted file mode 100644 index 726e2114046d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the autoscale settings for a subscription - * - * @summary Lists the autoscale settings for a subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSettingBySubscription.json - */ -async function listAutoscaleSettingsBySubs() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.autoscaleSettings.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAutoscaleSettingsBySubs(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsUpdateSample.ts deleted file mode 100644 index 5b30e31e28df..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/autoscaleSettingsUpdateSample.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AutoscaleSettingResourcePatch, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/patchAutoscaleSetting.json - */ -async function patchAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const autoscaleSettingResource: AutoscaleSettingResourcePatch = { - enabled: true, - notifications: [ - { - email: { - customEmails: ["gu@ms.com", "ge@ns.net"], - sendToSubscriptionAdministrator: true, - sendToSubscriptionCoAdministrators: true - }, - operation: "Scale", - webhooks: [{ properties: {}, serviceUri: "http://myservice.com" }] - } - ], - predictiveAutoscalePolicy: { scaleMode: "Enabled" }, - profiles: [ - { - name: "adios", - capacity: { default: "1", maximum: "10", minimum: "1" }, - fixedDate: { - end: new Date("2015-03-05T14:30:00Z"), - start: new Date("2015-03-05T14:00:00Z"), - timeZone: "UTC" - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1" - } - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2" - } - } - ] - }, - { - name: "saludos", - capacity: { default: "1", maximum: "10", minimum: "1" }, - recurrence: { - frequency: "Week", - schedule: { days: ["1"], hours: [5], minutes: [15], timeZone: "UTC" } - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1" - } - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2" - } - } - ] - } - ], - tags: { key1: "value1" }, - targetResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.update( - resourceGroupName, - autoscaleSettingName, - autoscaleSettingResource - ); - console.log(result); -} - -async function main() { - patchAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesCreateSample.ts b/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesCreateSample.ts deleted file mode 100644 index cd950812a39c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesCreateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AzureMonitorWorkspaceResource, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update a workspace - * - * @summary Create or update a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesCreate.json - */ -async function createOrUpdateWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const azureMonitorWorkspaceProperties: AzureMonitorWorkspaceResource = { - location: "eastus" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.create( - resourceGroupName, - azureMonitorWorkspaceName, - azureMonitorWorkspaceProperties - ); - console.log(result); -} - -async function main() { - createOrUpdateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesDeleteSample.ts deleted file mode 100644 index 540b8c1a8c3e..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a workspace - * - * @summary Delete a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesDelete.json - */ -async function deleteWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.delete( - resourceGroupName, - azureMonitorWorkspaceName - ); - console.log(result); -} - -async function main() { - deleteWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesGetSample.ts deleted file mode 100644 index 9d42224702c5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the specific Azure Monitor workspace - * - * @summary Returns the specific Azure Monitor workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesGet.json - */ -async function getWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.get( - resourceGroupName, - azureMonitorWorkspaceName - ); - console.log(result); -} - -async function main() { - getWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesListByResourceGroupSample.ts deleted file mode 100644 index d33e9e1033e5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all workspaces in the specified resource group - * - * @summary Lists all workspaces in the specified resource group - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListByResourceGroup.json - */ -async function listMonitorWorkspacesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.azureMonitorWorkspaces.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMonitorWorkspacesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesListBySubscriptionSample.ts deleted file mode 100644 index 67073eac8ea5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all workspaces in the specified subscription - * - * @summary Lists all workspaces in the specified subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListBySubscription.json - */ -async function listWorkspacesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.azureMonitorWorkspaces.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listWorkspacesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesUpdateSample.ts deleted file mode 100644 index 16f3bf41e057..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/azureMonitorWorkspacesUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AzureMonitorWorkspaceResourceForUpdate, - AzureMonitorWorkspacesUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates part of a workspace - * - * @summary Updates part of a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesUpdate.json - */ -async function updateWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const azureMonitorWorkspaceProperties: AzureMonitorWorkspaceResourceForUpdate = { - tags: { tag1: "A", tag2: "B", tag3: "C" } - }; - const options: AzureMonitorWorkspacesUpdateOptionalParams = { - azureMonitorWorkspaceProperties - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.update( - resourceGroupName, - azureMonitorWorkspaceName, - options - ); - console.log(result); -} - -async function main() { - updateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/baselinesListSample.ts b/sdk/monitor/arm-monitor/samples-dev/baselinesListSample.ts deleted file mode 100644 index 14eb069dd324..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/baselinesListSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BaselinesListOptionalParams, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to **Lists the metric baseline values for a resource**. - * - * @summary **Lists the metric baseline values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/metricBaselines.json - */ -async function getMetricBaselines() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1"; - const timespan = "2019-03-12T11:00:00.000Z/2019-03-12T12:00:00.000Z"; - const interval = "PT1H"; - const aggregation = "average"; - const sensitivities = "Low,Medium"; - const options: BaselinesListOptionalParams = { - timespan, - interval, - aggregation, - sensitivities - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.baselines.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getMetricBaselines(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsCreateSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsCreateSample.ts deleted file mode 100644 index 519b967cab5f..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsCreateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataCollectionEndpointResource, - DataCollectionEndpointsCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a data collection endpoint. - * - * @summary Creates or updates a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsCreate.json - */ -async function createOrUpdateDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const body: DataCollectionEndpointResource = { - location: "eastus", - networkAcls: { publicNetworkAccess: "Enabled" } - }; - const options: DataCollectionEndpointsCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.create( - resourceGroupName, - dataCollectionEndpointName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsDeleteSample.ts deleted file mode 100644 index 7a0edbdcc6fb..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a data collection endpoint. - * - * @summary Deletes a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsDelete.json - */ -async function deleteDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.delete( - resourceGroupName, - dataCollectionEndpointName - ); - console.log(result); -} - -async function main() { - deleteDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsGetSample.ts deleted file mode 100644 index 8b65d70d4b9f..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the specified data collection endpoint. - * - * @summary Returns the specified data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsGet.json - */ -async function getDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.get( - resourceGroupName, - dataCollectionEndpointName - ); - console.log(result); -} - -async function main() { - getDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsListByResourceGroupSample.ts deleted file mode 100644 index 733401f8e149..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data collection endpoints in the specified resource group. - * - * @summary Lists all data collection endpoints in the specified resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListByResourceGroup.json - */ -async function listDataCollectionEndpointsByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionEndpoints.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionEndpointsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsListBySubscriptionSample.ts deleted file mode 100644 index f9a0d214965b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data collection endpoints in the specified subscription - * - * @summary Lists all data collection endpoints in the specified subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListBySubscription.json - */ -async function listDataCollectionEndpointsBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionEndpoints.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionEndpointsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsUpdateSample.ts deleted file mode 100644 index b0b5564c3a59..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionEndpointsUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ResourceForUpdate, - DataCollectionEndpointsUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates part of a data collection endpoint. - * - * @summary Updates part of a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsUpdate.json - */ -async function updateDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const body: ResourceForUpdate = { tags: { tag1: "A", tag2: "B", tag3: "C" } }; - const options: DataCollectionEndpointsUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.update( - resourceGroupName, - dataCollectionEndpointName, - options - ); - console.log(result); -} - -async function main() { - updateDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsCreateSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsCreateSample.ts deleted file mode 100644 index 758df428def8..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsCreateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataCollectionRuleAssociationProxyOnlyResource, - DataCollectionRuleAssociationsCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an association. - * - * @summary Creates or updates an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsCreate.json - */ -async function createOrUpdateAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const body: DataCollectionRuleAssociationProxyOnlyResource = { - dataCollectionRuleId: - "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule" - }; - const options: DataCollectionRuleAssociationsCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.create( - resourceUri, - associationName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsDeleteSample.ts deleted file mode 100644 index 1034e30e337a..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes an association. - * - * @summary Deletes an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsDelete.json - */ -async function deleteAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.delete( - resourceUri, - associationName - ); - console.log(result); -} - -async function main() { - deleteAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsGetSample.ts deleted file mode 100644 index 35540040a92e..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the specified association. - * - * @summary Returns the specified association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsGet.json - */ -async function getAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.get( - resourceUri, - associationName - ); - console.log(result); -} - -async function main() { - getAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts deleted file mode 100644 index 6d97bace404b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists associations for the specified data collection endpoint. - * - * @summary Lists associations for the specified data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByDataCollectionEndpoint.json - */ -async function listAssociationsForSpecifiedDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myDataCollectionEndpointName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByDataCollectionEndpoint( - resourceGroupName, - dataCollectionEndpointName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByResourceSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByResourceSample.ts deleted file mode 100644 index 11ffcd21d8f5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByResourceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists associations for the specified resource. - * - * @summary Lists associations for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByResource.json - */ -async function listAssociationsForSpecifiedResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByResource( - resourceUri - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByRuleSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByRuleSample.ts deleted file mode 100644 index 6cccd9d83a75..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRuleAssociationsListByRuleSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists associations for the specified data collection rule. - * - * @summary Lists associations for the specified data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByRule.json - */ -async function listAssociationsForSpecifiedDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByRule( - resourceGroupName, - dataCollectionRuleName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesCreateSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesCreateSample.ts deleted file mode 100644 index db801c866f14..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesCreateSample.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataCollectionRuleResource, - DataCollectionRulesCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a data collection rule. - * - * @summary Creates or updates a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesCreate.json - */ -async function createOrUpdateDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const body: DataCollectionRuleResource = { - dataFlows: [ - { - destinations: ["centralWorkspace"], - streams: [ - "Microsoft-Perf", - "Microsoft-Syslog", - "Microsoft-WindowsEvent" - ] - } - ], - dataSources: { - performanceCounters: [ - { - name: "cloudTeamCoreCounters", - counterSpecifiers: [ - "\\Processor(_Total)\\% Processor Time", - "\\Memory\\Committed Bytes", - "\\LogicalDisk(_Total)\\Free Megabytes", - "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" - ], - samplingFrequencyInSeconds: 15, - streams: ["Microsoft-Perf"] - }, - { - name: "appTeamExtraCounters", - counterSpecifiers: ["\\Process(_Total)\\Thread Count"], - samplingFrequencyInSeconds: 30, - streams: ["Microsoft-Perf"] - } - ], - syslog: [ - { - name: "cronSyslog", - facilityNames: ["cron"], - logLevels: ["Debug", "Critical", "Emergency"], - streams: ["Microsoft-Syslog"] - }, - { - name: "syslogBase", - facilityNames: ["syslog"], - logLevels: ["Alert", "Critical", "Emergency"], - streams: ["Microsoft-Syslog"] - } - ], - windowsEventLogs: [ - { - name: "cloudSecurityTeamEvents", - streams: ["Microsoft-WindowsEvent"], - xPathQueries: ["Security!"] - }, - { - name: "appTeam1AppEvents", - streams: ["Microsoft-WindowsEvent"], - xPathQueries: [ - "System![System[(Level = 1 or Level = 2 or Level = 3)]]", - "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]" - ] - } - ] - }, - destinations: { - logAnalytics: [ - { - name: "centralWorkspace", - workspaceResourceId: - "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/centralTeamWorkspace" - } - ] - }, - location: "eastus" - }; - const options: DataCollectionRulesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.create( - resourceGroupName, - dataCollectionRuleName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesDeleteSample.ts deleted file mode 100644 index 4becc7faf8c8..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a data collection rule. - * - * @summary Deletes a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesDelete.json - */ -async function deleteDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.delete( - resourceGroupName, - dataCollectionRuleName - ); - console.log(result); -} - -async function main() { - deleteDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesGetSample.ts deleted file mode 100644 index 833b20532bdb..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the specified data collection rule. - * - * @summary Returns the specified data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesGet.json - */ -async function getDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.get( - resourceGroupName, - dataCollectionRuleName - ); - console.log(result); -} - -async function main() { - getDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesListByResourceGroupSample.ts deleted file mode 100644 index 3a5ad5f3084a..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data collection rules in the specified resource group. - * - * @summary Lists all data collection rules in the specified resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListByResourceGroup.json - */ -async function listDataCollectionRulesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRules.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionRulesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesListBySubscriptionSample.ts deleted file mode 100644 index 509f9ffdb351..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data collection rules in the specified subscription. - * - * @summary Lists all data collection rules in the specified subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListBySubscription.json - */ -async function listDataCollectionRulesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionRulesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesUpdateSample.ts deleted file mode 100644 index 3cedeb4a88a2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/dataCollectionRulesUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ResourceForUpdate, - DataCollectionRulesUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates part of a data collection rule. - * - * @summary Updates part of a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesUpdate.json - */ -async function updateDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const body: ResourceForUpdate = { tags: { tag1: "A", tag2: "B", tag3: "C" } }; - const options: DataCollectionRulesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.update( - resourceGroupName, - dataCollectionRuleName, - options - ); - console.log(result); -} - -async function main() { - updateDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCategoryGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCategoryGetSample.ts deleted file mode 100644 index 769917b066a8..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCategoryGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the diagnostic settings category for the specified resource. - * - * @summary Gets the diagnostic settings category for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "WorkflowRuntime"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettingsCategory.get(resourceUri, name); - console.log(result); -} - -async function main() { - getsTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCategoryListSample.ts b/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCategoryListSample.ts deleted file mode 100644 index a7d2472c1194..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCategoryListSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the diagnostic settings categories for the specified resource. - * - * @summary Lists the diagnostic settings categories for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettingsCategory.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCreateOrUpdateSample.ts deleted file mode 100644 index 31843adcbddf..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { DiagnosticSettingsResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates diagnostic settings for the specified resource. - * - * @summary Creates or updates diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json - */ -async function createsOrUpdatesTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const parameters: DiagnosticSettingsResource = { - eventHubAuthorizationRuleId: - "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - categoryGroup: "allLogs", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - marketplacePartnerId: - "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1", - metrics: [ - { - category: "WorkflowMetrics", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - workspaceId: "" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.createOrUpdate( - resourceUri, - name, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates diagnostic settings for the specified resource. - * - * @summary Creates or updates diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSettingCategory.json - */ -async function createsOrUpdatesTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const parameters: DiagnosticSettingsResource = { - eventHubAuthorizationRuleId: - "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - category: "WorkflowRuntime", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - marketplacePartnerId: - "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1", - metrics: [ - { - category: "WorkflowMetrics", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - workspaceId: "" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.createOrUpdate( - resourceUri, - name, - parameters - ); - console.log(result); -} - -async function main() { - createsOrUpdatesTheDiagnosticSetting(); - createsOrUpdatesTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsDeleteSample.ts deleted file mode 100644 index d99ca747b606..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes existing diagnostic settings for the specified resource. - * - * @summary Deletes existing diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json - */ -async function deletesTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.delete(resourceUri, name); - console.log(result); -} - -async function main() { - deletesTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsGetSample.ts deleted file mode 100644 index 51552f38193b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsGetSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the active diagnostic settings for the specified resource. - * - * @summary Gets the active diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.get(resourceUri, name); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the active diagnostic settings for the specified resource. - * - * @summary Gets the active diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingCategory.json - */ -async function getsTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.get(resourceUri, name); - console.log(result); -} - -async function main() { - getsTheDiagnosticSetting(); - getsTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsListSample.ts b/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsListSample.ts deleted file mode 100644 index 0927d272c404..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/diagnosticSettingsListSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the active diagnostic settings list for the specified resource. - * - * @summary Gets the active diagnostic settings list for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettings.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the active diagnostic settings list for the specified resource. - * - * @summary Gets the active diagnostic settings list for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettings.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsTheDiagnosticSetting(); - getsTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/eventCategoriesListSample.ts b/sdk/monitor/arm-monitor/samples-dev/eventCategoriesListSample.ts deleted file mode 100644 index 43a5ac1c8845..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/eventCategoriesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * - * @summary Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetEventCategories.json - */ -async function getEventCategories() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.eventCategories.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getEventCategories(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/logProfilesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/logProfilesCreateOrUpdateSample.ts deleted file mode 100644 index ace58a8b0b8e..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { LogProfileResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update a log profile in Azure Monitoring REST API. - * - * @summary Create or update a log profile in Azure Monitoring REST API. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateLogProfile.json - */ -async function createOrUpdateALogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "Rac46PostSwapRG"; - const parameters: LogProfileResource = { - categories: ["Write", "Delete", "Action"], - location: "", - locations: ["global"], - retentionPolicy: { days: 3, enabled: true }, - serviceBusRuleId: "", - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.createOrUpdate( - logProfileName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateALogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/logProfilesDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/logProfilesDeleteSample.ts deleted file mode 100644 index c264d326b6a3..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesDeleteSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the log profile. - * - * @summary Deletes the log profile. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteLogProfile.json - */ -async function deleteLogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const logProfileName = "Rac46PostSwapRG"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.delete(logProfileName); - console.log(result); -} - -async function main() { - deleteLogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/logProfilesGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/logProfilesGetSample.ts deleted file mode 100644 index 9e2f9f31105a..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the log profile. - * - * @summary Gets the log profile. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getLogProfile.json - */ -async function getLogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "default"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.get(logProfileName); - console.log(result); -} - -async function main() { - getLogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/logProfilesListSample.ts b/sdk/monitor/arm-monitor/samples-dev/logProfilesListSample.ts deleted file mode 100644 index 717850be0c5a..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the log profiles. - * - * @summary List the log profiles. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listLogProfile.json - */ -async function listLogProfiles() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.logProfiles.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listLogProfiles(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/logProfilesUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/logProfilesUpdateSample.ts deleted file mode 100644 index 32c9825f24f7..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/logProfilesUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { LogProfileResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchLogProfile.json - */ -async function patchALogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "Rac46PostSwapRG"; - const logProfilesResource: LogProfileResourcePatch = { - categories: ["Write", "Delete", "Action"], - locations: ["global"], - retentionPolicy: { days: 3, enabled: true }, - serviceBusRuleId: "", - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", - tags: { key1: "value1" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.update( - logProfileName, - logProfilesResource - ); - console.log(result); -} - -async function main() { - patchALogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricAlertsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricAlertsCreateOrUpdateSample.ts deleted file mode 100644 index d609df81bd95..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsCreateOrUpdateSample.ts +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MetricAlertResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json - */ -async function createOrUpdateADynamicAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - alertSensitivity: "Medium", - criterionType: "DynamicThresholdCriterion", - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 4, - numberOfEvaluationPeriods: 4 - }, - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterOrLessThan", - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json - */ -async function createOrUpdateADynamicAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - alertSensitivity: "Medium", - criterionType: "DynamicThresholdCriterion", - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 4, - numberOfEvaluationPeriods: 4 - }, - ignoreDataBefore: new Date("2019-04-04T21:00:00.000Z"), - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterOrLessThan", - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" - ], - severity: 3, - tags: {}, - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateWebTestMetricAlert.json - */ -async function createOrUpdateAWebTestAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "rg-example"; - const ruleName = "webtest-name-example"; - const parameters: MetricAlertResource = { - description: - 'Automatically created alert rule for availability test "component-example" a', - actions: [], - criteria: { - componentId: - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example", - failedLocationCount: 2, - odataType: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", - webTestId: - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example", - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example" - ], - severity: 4, - tags: { - "hiddenLink:/subscriptions/12345678123412341234123456789101/resourcegroups/rgExample/providers/microsoftInsights/components/webtestNameExample": - "Resource", - "hiddenLink:/subscriptions/12345678123412341234123456789101/resourcegroups/rgExample/providers/microsoftInsights/webtests/componentExample": - "Resource" - }, - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertMultipleResource.json - */ -async function createOrUpdateAnAlertRuleForMultipleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertSingleResource.json - */ -async function createOrUpdateAnAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "\\Processor(_Total)\\% Processor Time", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "Pt1m", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" - ], - severity: 3, - tags: {}, - windowSize: "Pt15m" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertResourceGroup.json - */ -async function createOrUpdateAnAlertRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest1"; - const ruleName = "MetricAlertAtResourceGroupLevel"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertSubscription.json - */ -async function createOrUpdateAnAlertRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertAtSubscriptionLevel"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: ["/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertWithDimensions.json - */ -async function createOrUpdateAnAlertRulesWithDimensions() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleDimensions"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "Metric1", - criterionType: "StaticThresholdCriterion", - dimensions: [ - { name: "ActivityName", operator: "Include", values: ["*"] }, - { name: "StatusCode", operator: "Include", values: ["200"] } - ], - metricName: "Availability", - metricNamespace: "Microsoft.KeyVault/vaults", - operator: "GreaterThan", - threshold: 55, - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1H", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" - ], - severity: 3, - tags: {}, - windowSize: "P1D" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateADynamicAlertRuleForMultipleResources(); - createOrUpdateADynamicAlertRuleForSingleResource(); - createOrUpdateAWebTestAlertRule(); - createOrUpdateAnAlertRuleForMultipleResource(); - createOrUpdateAnAlertRuleForSingleResource(); - createOrUpdateAnAlertRuleOnResourceGroupS(); - createOrUpdateAnAlertRuleOnSubscription(); - createOrUpdateAnAlertRulesWithDimensions(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricAlertsDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricAlertsDeleteSample.ts deleted file mode 100644 index 30628e3520d6..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsDeleteSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an alert rule definition. - * - * @summary Delete an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/deleteMetricAlert.json - */ -async function deleteAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.delete(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - deleteAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricAlertsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricAlertsGetSample.ts deleted file mode 100644 index c1b733567e66..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsGetSample.ts +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertMultipleResource.json - */ -async function getADynamicAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertSingleResource.json - */ -async function getADynamicAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getWebTestMetricAlert.json - */ -async function getAWebTestAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "rg-example"; - const ruleName = "webtest-name-example"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertMultipleResource.json - */ -async function getAnAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertSingleResource.json - */ -async function getAnAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertResourceGroup.json - */ -async function getAnAlertRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest1"; - const ruleName = "MetricAlertAtResourceGroupLevel"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertSubscription.json - */ -async function getAnAlertRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertAtSubscriptionLevel"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - getADynamicAlertRuleForMultipleResources(); - getADynamicAlertRuleForSingleResource(); - getAWebTestAlertRule(); - getAnAlertRuleForMultipleResources(); - getAnAlertRuleForSingleResource(); - getAnAlertRuleOnResourceGroupS(); - getAnAlertRuleOnSubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricAlertsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricAlertsListByResourceGroupSample.ts deleted file mode 100644 index 3396a7fc63bf..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve alert rule definitions in a resource group. - * - * @summary Retrieve alert rule definitions in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json - */ -async function listMetricAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricAlerts.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricAlertsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricAlertsListBySubscriptionSample.ts deleted file mode 100644 index 8e5e162a5570..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve alert rule definitions in a subscription. - * - * @summary Retrieve alert rule definitions in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json - */ -async function listMetricAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricAlerts.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricAlertsStatusListByNameSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricAlertsStatusListByNameSample.ts deleted file mode 100644 index 37c18dacacb1..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsStatusListByNameSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve an alert rule status. - * - * @summary Retrieve an alert rule status. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatusByName.json - */ -async function getAnAlertRuleStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "009f6022-67ec-423e-9aa7-691182870588"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "EastUs"; - const ruleName = "custom1"; - const statusName = - "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlertsStatus.listByName( - resourceGroupName, - ruleName, - statusName - ); - console.log(result); -} - -async function main() { - getAnAlertRuleStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricAlertsStatusListSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricAlertsStatusListSample.ts deleted file mode 100644 index 250b43d4748c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsStatusListSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve an alert rule status. - * - * @summary Retrieve an alert rule status. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatus.json - */ -async function getAnAlertRuleStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlertsStatus.list( - resourceGroupName, - ruleName - ); - console.log(result); -} - -async function main() { - getAnAlertRuleStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricAlertsUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricAlertsUpdateSample.ts deleted file mode 100644 index 28c118771553..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricAlertsUpdateSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MetricAlertResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update an metric alert definition. - * - * @summary Update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/UpdateMetricAlert.json - */ -async function createOrUpdateAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters: MetricAlertResourcePatch = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "\\Processor(_Total)\\% Processor Time", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "Pt1m", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" - ], - severity: 3, - tags: {}, - windowSize: "Pt15m" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.update( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricDefinitionsListSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricDefinitionsListSample.ts deleted file mode 100644 index db4ec4a363d5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricDefinitionsListSample.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MetricDefinitionsListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsApplicationInsights.json - */ -async function getApplicationInsightsMetricDefinitionsWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions"; - const metricnamespace = "microsoft.insights/components"; - const options: MetricDefinitionsListOptionalParams = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitions.json - */ -async function getMetricDefinitionsWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricDefinitions"; - const metricnamespace = "Microsoft.Web/sites"; - const options: MetricDefinitionsListOptionalParams = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsMetricClass.json - */ -async function getStorageCacheMetricDefinitionsWithMetricClass() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache"; - const metricnamespace = "microsoft.storagecache/caches"; - const options: MetricDefinitionsListOptionalParams = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getApplicationInsightsMetricDefinitionsWithoutFilter(); - getMetricDefinitionsWithoutFilter(); - getStorageCacheMetricDefinitionsWithMetricClass(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricNamespacesListSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricNamespacesListSample.ts deleted file mode 100644 index 3df200d50713..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricNamespacesListSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MetricNamespacesListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the metric namespaces for the resource. - * - * @summary Lists the metric namespaces for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/examples/GetMetricNamespaces.json - */ -async function getMetricNamespacesWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill"; - const startTime = "2020-08-31T15:53:00Z"; - const options: MetricNamespacesListOptionalParams = { startTime }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricNamespaces.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getMetricNamespacesWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/metricsListSample.ts b/sdk/monitor/arm-monitor/samples-dev/metricsListSample.ts deleted file mode 100644 index de1242962f04..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/metricsListSample.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MetricsListOptionalParams, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetric.json - */ -async function getMetricForData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"; - const timespan = "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z"; - const interval = "PT1M"; - const aggregation = "Average,count"; - const top = 3; - const orderby = "Average asc"; - const filter = "BlobType eq '*'"; - const metricnamespace = "Microsoft.Storage/storageAccounts/blobServices"; - const options: MetricsListOptionalParams = { - timespan, - interval, - aggregation, - top, - orderby, - filter, - metricnamespace - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricMetadata.json - */ -async function getMetricForMetadata() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"; - const timespan = "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z"; - const interval = "PT1M"; - const aggregation = "Average,count"; - const top = 3; - const orderby = "Average asc"; - const filter = "BlobType eq '*'"; - const metricnamespace = "Microsoft.Storage/storageAccounts/blobServices"; - const options: MetricsListOptionalParams = { - timespan, - interval, - aggregation, - top, - orderby, - filter, - metricnamespace - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricError.json - */ -async function getMetricWithError() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo"; - const timespan = "2021-06-07T21:51:00Z/2021-06-08T01:51:00Z"; - const interval = "FULL"; - const metricnames = "MongoRequestsCount,MongoRequests"; - const aggregation = "average"; - const metricnamespace = "microsoft.documentdb/databaseaccounts"; - const options: MetricsListOptionalParams = { - timespan, - interval, - metricnames, - aggregation, - metricnamespace - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -async function main() { - getMetricForData(); - getMetricForMetadata(); - getMetricWithError(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/monitorOperationsListSample.ts b/sdk/monitor/arm-monitor/samples-dev/monitorOperationsListSample.ts deleted file mode 100644 index c39df4e1ffa2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/monitorOperationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists available Operations for this Resource Provider - * - * @summary Lists available Operations for this Resource Provider - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/OperationsGet.json - */ -async function getOperationsList() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitorOperations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getOperationsList(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/operationsListSample.ts b/sdk/monitor/arm-monitor/samples-dev/operationsListSample.ts deleted file mode 100644 index b286ddbb34f4..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all of the available operations from Microsoft.Insights provider. - * - * @summary Lists all of the available operations from Microsoft.Insights provider. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/OperationList.json - */ -async function getAListOfOperationsForAResourceProvider() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.operations.list(); - console.log(result); -} - -async function main() { - getAListOfOperationsForAResourceProvider(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/predictiveMetricGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/predictiveMetricGetSample.ts deleted file mode 100644 index 46141b8812d7..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/predictiveMetricGetSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to get predictive autoscale metric future data - * - * @summary get predictive autoscale metric future data - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/GetPredictiveMetric.json - */ -async function getMetricForData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myRG"; - const autoscaleSettingName = "vmss1-Autoscale-775"; - const timespan = "2021-10-14T22:00:00.000Z/2021-10-16T22:00:00.000Z"; - const interval = "PT1H"; - const metricNamespace = "Microsoft.Compute/virtualMachineScaleSets"; - const metricName = "PercentageCPU"; - const aggregation = "Total"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.predictiveMetric.get( - resourceGroupName, - autoscaleSettingName, - timespan, - interval, - metricNamespace, - metricName, - aggregation - ); - console.log(result); -} - -async function main() { - getMetricForData(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 58c9ae6e5230..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PrivateEndpointConnection, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. - * - * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionUpdate.json - */ -async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const parameters: PrivateEndpointConnection = { - privateLinkServiceConnectionState: { - description: "Approved by johndoe@contoso.com", - status: "Approved" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - scopeName, - privateEndpointConnectionName, - parameters - ); - console.log(result); -} - -async function main() { - approveOrRejectAPrivateEndpointConnectionWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsDeleteSample.ts deleted file mode 100644 index 3328788b882d..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a private endpoint connection with a given name. - * - * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionDelete.json - */ -async function deletesAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - scopeName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - deletesAPrivateEndpointConnectionWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsGetSample.ts deleted file mode 100644 index 61b6812cba6a..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a private endpoint connection. - * - * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.get( - resourceGroupName, - scopeName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts deleted file mode 100644 index 3ad2bbb647f0..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all private endpoint connections on a private link scope. - * - * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionList.json - */ -async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.listByPrivateLinkScope( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkResourcesGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkResourcesGetSample.ts deleted file mode 100644 index a44ca23c11f4..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkResourcesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * - * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const groupName = "azuremonitor"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkResources.get( - resourceGroupName, - scopeName, - groupName - ); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts deleted file mode 100644 index b2d1f95086c2..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * - * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopeOperationStatusGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopeOperationStatusGetSample.ts deleted file mode 100644 index 8f40d8c5a8f5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopeOperationStatusGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the status of an azure asynchronous operation associated with a private link scope operation. - * - * @summary Get the status of an azure asynchronous operation associated with a private link scope operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/privateLinkScopeOperationStatuses.json - */ -async function getSpecificOperationStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "613192d7-503f-477a-9cfe-4efc3ee2bd60"; - const asyncOperationId = "713192d7-503f-477a-9cfe-4efc3ee2bd11"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopeOperationStatus.get( - asyncOperationId, - resourceGroupName - ); - console.log(result); -} - -async function main() { - getSpecificOperationStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesCreateOrUpdateSample.ts deleted file mode 100644 index c0e06fc98bfb..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScopedResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. - * - * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceUpdate.json - */ -async function updateAScopedResourceInAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const parameters: ScopedResource = { - linkedResourceId: - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/components/my-component" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.beginCreateOrUpdateAndWait( - resourceGroupName, - scopeName, - name, - parameters - ); - console.log(result); -} - -async function main() { - updateAScopedResourceInAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesDeleteSample.ts deleted file mode 100644 index da8128cf28d5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a private endpoint connection with a given name. - * - * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceDelete.json - */ -async function deletesAScopedResourceWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.beginDeleteAndWait( - resourceGroupName, - scopeName, - name - ); - console.log(result); -} - -async function main() { - deletesAScopedResourceWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesGetSample.ts deleted file mode 100644 index 248dc344aea7..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a scoped resource in a private link scope. - * - * @summary Gets a scoped resource in a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceGet.json - */ -async function getsPrivateLinkScopedResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.get( - resourceGroupName, - scopeName, - name - ); - console.log(result); -} - -async function main() { - getsPrivateLinkScopedResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts deleted file mode 100644 index 2157e3c141ff..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all private endpoint connections on a private link scope. - * - * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceList.json - */ -async function getsListOfScopedResourcesInAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopedResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsListOfScopedResourcesInAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesCreateOrUpdateSample.ts deleted file mode 100644 index 484867612812..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesCreateOrUpdateSample.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AzureMonitorPrivateLinkScope, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * - * @summary Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesCreate.json - */ -async function privateLinkScopeCreate() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope = { - accessModeSettings: { - exclusions: [], - ingestionAccessMode: "Open", - queryAccessMode: "Open" - }, - location: "Global" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * - * @summary Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesUpdate.json - */ -async function privateLinkScopeUpdate() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope = { - accessModeSettings: { - exclusions: [], - ingestionAccessMode: "Open", - queryAccessMode: "Open" - }, - location: "Global", - tags: { tag1: "Value1" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -async function main() { - privateLinkScopeCreate(); - privateLinkScopeUpdate(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesDeleteSample.ts deleted file mode 100644 index 72fa958e3561..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a Azure Monitor PrivateLinkScope. - * - * @summary Deletes a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesDelete.json - */ -async function privateLinkScopesDelete() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.beginDeleteAndWait( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - privateLinkScopesDelete(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesGetSample.ts deleted file mode 100644 index bc31e306902a..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns a Azure Monitor PrivateLinkScope. - * - * @summary Returns a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesGet.json - */ -async function privateLinkScopeGet() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.get( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - privateLinkScopeGet(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesListByResourceGroupSample.ts deleted file mode 100644 index e5c093f8e3de..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * - * @summary Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesListByResourceGroup.json - */ -async function privateLinkScopeListByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopes.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateLinkScopeListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesListSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesListSample.ts deleted file mode 100644 index 47d4083d2f79..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * - * @summary Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesList.json - */ -async function privateLinkScopesListJson() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopes.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateLinkScopesListJson(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesUpdateTagsSample.ts b/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesUpdateTagsSample.ts deleted file mode 100644 index d6956ec9e02c..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/privateLinkScopesUpdateTagsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { TagsResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesUpdateTagsOnly.json - */ -async function privateLinkScopeUpdateTagsOnly() { - const subscriptionId = process.env["MONITOR_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const privateLinkScopeTags: TagsResource = { - tags: { tag1: "Value1", tag2: "Value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.updateTags( - resourceGroupName, - scopeName, - privateLinkScopeTags - ); - console.log(result); -} - -async function main() { - privateLinkScopeUpdateTagsOnly(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesCreateOrUpdateSample.ts deleted file mode 100644 index c22ab70cb00b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScheduledQueryRuleResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRule.json - */ -async function createOrUpdateAScheduledQueryRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const parameters: ScheduledQueryRuleResource = { - description: "Performance rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup" - ], - customProperties: { key11: "value11", key12: "value12" } - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [ - { - name: "ComputerIp", - operator: "Exclude", - values: ["192.168.1.1"] - }, - { name: "OSType", operator: "Include", values: ["*"] } - ], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1 - }, - metricMeasureColumn: "% Processor Time", - operator: "GreaterThan", - query: 'Perf | where ObjectName == "Processor"', - resourceIdColumn: "resourceId", - threshold: 70, - timeAggregation: "Average" - } - ] - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: [ - "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1" - ], - severity: 4, - skipQueryValidation: true, - windowSize: "PT10M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRuleResourceGroup.json - */ -async function createOrUpdateAScheduledQueryRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const parameters: ScheduledQueryRuleResource = { - description: "Health check rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup" - ], - customProperties: { key11: "value11", key12: "value12" } - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1 - }, - operator: "GreaterThan", - query: "Heartbeat", - threshold: 360, - timeAggregation: "Count" - } - ] - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: [ - "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1" - ], - severity: 4, - skipQueryValidation: true, - targetResourceTypes: ["Microsoft.Compute/virtualMachines"], - windowSize: "PT10M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRuleSubscription.json - */ -async function createOrUpdateAScheduledQueryRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const parameters: ScheduledQueryRuleResource = { - description: "Performance rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup" - ], - customProperties: { key11: "value11", key12: "value12" } - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [ - { - name: "ComputerIp", - operator: "Exclude", - values: ["192.168.1.1"] - }, - { name: "OSType", operator: "Include", values: ["*"] } - ], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1 - }, - metricMeasureColumn: "% Processor Time", - operator: "GreaterThan", - query: 'Perf | where ObjectName == "Processor"', - resourceIdColumn: "resourceId", - threshold: 70, - timeAggregation: "Average" - } - ] - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147"], - severity: 4, - skipQueryValidation: true, - targetResourceTypes: ["Microsoft.Compute/virtualMachines"], - windowSize: "PT10M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAScheduledQueryRuleForSingleResource(); - createOrUpdateAScheduledQueryRuleOnResourceGroupS(); - createOrUpdateAScheduledQueryRuleOnSubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesDeleteSample.ts deleted file mode 100644 index 9e34f0b8d669..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a scheduled query rule. - * - * @summary Deletes a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/deleteScheduledQueryRule.json - */ -async function deleteAScheduledQueryRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.delete( - resourceGroupName, - ruleName - ); - console.log(result); -} - -async function main() { - deleteAScheduledQueryRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesGetSample.ts b/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesGetSample.ts deleted file mode 100644 index e77734253abe..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve an scheduled query rule definition. - * - * @summary Retrieve an scheduled query rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/getScheduledQueryRule.json - */ -async function getAScheduledQueryRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.get( - resourceGroupName, - ruleName - ); - console.log(result); -} - -async function main() { - getAScheduledQueryRuleForSingleResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesListByResourceGroupSample.ts deleted file mode 100644 index f474165d969b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve scheduled query rule definitions in a resource group. - * - * @summary Retrieve scheduled query rule definitions in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesByResourceGroup.json - */ -async function listScheduledQueryRulesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scheduledQueryRules.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listScheduledQueryRulesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesListBySubscriptionSample.ts deleted file mode 100644 index ec1cce5bfe7b..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve a scheduled query rule definitions in a subscription. - * - * @summary Retrieve a scheduled query rule definitions in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesBySubscription.json - */ -async function listScheduledQueryRulesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scheduledQueryRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listScheduledQueryRulesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesUpdateSample.ts deleted file mode 100644 index ccadc3a95389..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/scheduledQueryRulesUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ScheduledQueryRuleResourcePatch, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a scheduled query rule. - * - * @summary Update a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/patchScheduledQueryRule.json - */ -async function createOrUpdateAScheduledQueryRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const parameters: ScheduledQueryRuleResourcePatch = { enabled: false }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.update( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAScheduledQueryRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/tenantActivityLogsListSample.ts b/sdk/monitor/arm-monitor/samples-dev/tenantActivityLogsListSample.ts deleted file mode 100644 index 519961fabae5..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/tenantActivityLogsListSample.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TenantActivityLogsListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsFiltered.json - */ -async function getTenantActivityLogsWithFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const options: TenantActivityLogsListOptionalParams = { filter }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsFilteredAndSelected.json - */ -async function getTenantActivityLogsWithFilterAndSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options: TenantActivityLogsListOptionalParams = { filter, select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsSelected.json - */ -async function getTenantActivityLogsWithSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options: TenantActivityLogsListOptionalParams = { select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsNoParams.json - */ -async function getTenantActivityLogsWithoutFilterOrSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTenantActivityLogsWithFilter(); - getTenantActivityLogsWithFilterAndSelect(); - getTenantActivityLogsWithSelect(); - getTenantActivityLogsWithoutFilterOrSelect(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples-dev/vmInsightsGetOnboardingStatusSample.ts b/sdk/monitor/arm-monitor/samples-dev/vmInsightsGetOnboardingStatusSample.ts deleted file mode 100644 index 96e4892e9ecc..000000000000 --- a/sdk/monitor/arm-monitor/samples-dev/vmInsightsGetOnboardingStatusSample.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusVMScaleSet.json - */ -async function getStatusForAVMScaleSetThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/my-service-cluster/providers/Microsoft.Compute/virtualMachineScaleSets/scale-set-01"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVMUnknown.json - */ -async function getStatusForAVMThatHasNotYetReportedData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVM.json - */ -async function getStatusForAVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusResourceGroup.json - */ -async function getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/resource-group-with-vms"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSubscription.json - */ -async function getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -async function main() { - getStatusForAVMScaleSetThatIsActivelyReportingData(); - getStatusForAVMThatHasNotYetReportedData(); - getStatusForAVMThatIsActivelyReportingData(); - getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData(); - getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/README.md b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/README.md deleted file mode 100644 index 64bef40833fb..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/README.md +++ /dev/null @@ -1,268 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js][actiongroupscreatenotificationsatactiongroupresourcelevelsample] | Send test notifications to a set of provided receivers x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtActionGroupResourceLevel.json | -| [actionGroupsCreateNotificationsAtResourceGroupLevelSample.js][actiongroupscreatenotificationsatresourcegrouplevelsample] | Send test notifications to a set of provided receivers x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtResourceGroupLevel.json | -| [actionGroupsCreateOrUpdateSample.js][actiongroupscreateorupdatesample] | Create a new action group or update an existing one. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/createOrUpdateActionGroup.json | -| [actionGroupsDeleteSample.js][actiongroupsdeletesample] | Delete an action group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/deleteActionGroup.json | -| [actionGroupsEnableReceiverSample.js][actiongroupsenablereceiversample] | Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/enableReceiver.json | -| [actionGroupsGetSample.js][actiongroupsgetsample] | Get an action group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getActionGroup.json | -| [actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.js][actiongroupsgettestnotificationsatactiongroupresourcelevelsample] | Get the test notifications by the notification id x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtActionGroupResourceLevel.json | -| [actionGroupsGetTestNotificationsAtResourceGroupLevelSample.js][actiongroupsgettestnotificationsatresourcegrouplevelsample] | Get the test notifications by the notification id x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtResourceGroupLevel.json | -| [actionGroupsGetTestNotificationsSample.js][actiongroupsgettestnotificationssample] | Get the test notifications by the notification id x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotifications.json | -| [actionGroupsListByResourceGroupSample.js][actiongroupslistbyresourcegroupsample] | Get a list of all action groups in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json | -| [actionGroupsListBySubscriptionIdSample.js][actiongroupslistbysubscriptionidsample] | Get a list of all action groups in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json | -| [actionGroupsPostTestNotificationsSample.js][actiongroupsposttestnotificationssample] | Send test notifications to a set of provided receivers x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotifications.json | -| [actionGroupsUpdateSample.js][actiongroupsupdatesample] | Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/patchActionGroup.json | -| [activityLogAlertsCreateOrUpdateSample.js][activitylogalertscreateorupdatesample] | Create a new Activity Log Alert rule or update an existing one. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdate.json | -| [activityLogAlertsDeleteSample.js][activitylogalertsdeletesample] | Delete an Activity Log Alert rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Delete.json | -| [activityLogAlertsGetSample.js][activitylogalertsgetsample] | Get an Activity Log Alert rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Get.json | -| [activityLogAlertsListByResourceGroupSample.js][activitylogalertslistbyresourcegroupsample] | Get a list of all Activity Log Alert rules in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListByResourceGroupName.json | -| [activityLogAlertsListBySubscriptionIdSample.js][activitylogalertslistbysubscriptionidsample] | Get a list of all Activity Log Alert rules in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListBySubscriptionId.json | -| [activityLogAlertsUpdateSample.js][activitylogalertsupdatesample] | Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Update.json | -| [activityLogsListSample.js][activitylogslistsample] | Provides the list of records from the activity logs. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsFiltered.json | -| [alertRuleIncidentsGetSample.js][alertruleincidentsgetsample] | Gets an incident associated to an alert rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRuleIncident.json | -| [alertRuleIncidentsListByAlertRuleSample.js][alertruleincidentslistbyalertrulesample] | Gets a list of incidents associated to an alert rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleIncidents.json | -| [alertRulesCreateOrUpdateSample.js][alertrulescreateorupdatesample] | Creates or updates a classic metric alert rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateAlertRule.json | -| [alertRulesDeleteSample.js][alertrulesdeletesample] | Deletes a classic metric alert rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteAlertRule.json | -| [alertRulesGetSample.js][alertrulesgetsample] | Gets a classic metric alert rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRule.json | -| [alertRulesListByResourceGroupSample.js][alertruleslistbyresourcegroupsample] | List the classic metric alert rules within a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRule.json | -| [alertRulesListBySubscriptionSample.js][alertruleslistbysubscriptionsample] | List the classic metric alert rules within a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleBySubscription.json | -| [alertRulesUpdateSample.js][alertrulesupdatesample] | Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchAlertRule.json | -| [autoscaleSettingsCreateOrUpdateSample.js][autoscalesettingscreateorupdatesample] | Creates or updates an autoscale setting. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/createOrUpdateAutoscaleSetting.json | -| [autoscaleSettingsDeleteSample.js][autoscalesettingsdeletesample] | Deletes and autoscale setting x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json | -| [autoscaleSettingsGetSample.js][autoscalesettingsgetsample] | Gets an autoscale setting x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/getAutoscaleSetting.json | -| [autoscaleSettingsListByResourceGroupSample.js][autoscalesettingslistbyresourcegroupsample] | Lists the autoscale settings for a resource group x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSetting.json | -| [autoscaleSettingsListBySubscriptionSample.js][autoscalesettingslistbysubscriptionsample] | Lists the autoscale settings for a subscription x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSettingBySubscription.json | -| [autoscaleSettingsUpdateSample.js][autoscalesettingsupdatesample] | Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/patchAutoscaleSetting.json | -| [azureMonitorWorkspacesCreateSample.js][azuremonitorworkspacescreatesample] | Create or update a workspace x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesCreate.json | -| [azureMonitorWorkspacesDeleteSample.js][azuremonitorworkspacesdeletesample] | Delete a workspace x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesDelete.json | -| [azureMonitorWorkspacesGetSample.js][azuremonitorworkspacesgetsample] | Returns the specific Azure Monitor workspace x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesGet.json | -| [azureMonitorWorkspacesListByResourceGroupSample.js][azuremonitorworkspaceslistbyresourcegroupsample] | Lists all workspaces in the specified resource group x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListByResourceGroup.json | -| [azureMonitorWorkspacesListBySubscriptionSample.js][azuremonitorworkspaceslistbysubscriptionsample] | Lists all workspaces in the specified subscription x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListBySubscription.json | -| [azureMonitorWorkspacesUpdateSample.js][azuremonitorworkspacesupdatesample] | Updates part of a workspace x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesUpdate.json | -| [baselinesListSample.js][baselineslistsample] | **Lists the metric baseline values for a resource**. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/metricBaselines.json | -| [dataCollectionEndpointsCreateSample.js][datacollectionendpointscreatesample] | Creates or updates a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsCreate.json | -| [dataCollectionEndpointsDeleteSample.js][datacollectionendpointsdeletesample] | Deletes a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsDelete.json | -| [dataCollectionEndpointsGetSample.js][datacollectionendpointsgetsample] | Returns the specified data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsGet.json | -| [dataCollectionEndpointsListByResourceGroupSample.js][datacollectionendpointslistbyresourcegroupsample] | Lists all data collection endpoints in the specified resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListByResourceGroup.json | -| [dataCollectionEndpointsListBySubscriptionSample.js][datacollectionendpointslistbysubscriptionsample] | Lists all data collection endpoints in the specified subscription x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListBySubscription.json | -| [dataCollectionEndpointsUpdateSample.js][datacollectionendpointsupdatesample] | Updates part of a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsUpdate.json | -| [dataCollectionRuleAssociationsCreateSample.js][datacollectionruleassociationscreatesample] | Creates or updates an association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsCreate.json | -| [dataCollectionRuleAssociationsDeleteSample.js][datacollectionruleassociationsdeletesample] | Deletes an association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsDelete.json | -| [dataCollectionRuleAssociationsGetSample.js][datacollectionruleassociationsgetsample] | Returns the specified association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsGet.json | -| [dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js][datacollectionruleassociationslistbydatacollectionendpointsample] | Lists associations for the specified data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByDataCollectionEndpoint.json | -| [dataCollectionRuleAssociationsListByResourceSample.js][datacollectionruleassociationslistbyresourcesample] | Lists associations for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByResource.json | -| [dataCollectionRuleAssociationsListByRuleSample.js][datacollectionruleassociationslistbyrulesample] | Lists associations for the specified data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByRule.json | -| [dataCollectionRulesCreateSample.js][datacollectionrulescreatesample] | Creates or updates a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesCreate.json | -| [dataCollectionRulesDeleteSample.js][datacollectionrulesdeletesample] | Deletes a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesDelete.json | -| [dataCollectionRulesGetSample.js][datacollectionrulesgetsample] | Returns the specified data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesGet.json | -| [dataCollectionRulesListByResourceGroupSample.js][datacollectionruleslistbyresourcegroupsample] | Lists all data collection rules in the specified resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListByResourceGroup.json | -| [dataCollectionRulesListBySubscriptionSample.js][datacollectionruleslistbysubscriptionsample] | Lists all data collection rules in the specified subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListBySubscription.json | -| [dataCollectionRulesUpdateSample.js][datacollectionrulesupdatesample] | Updates part of a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesUpdate.json | -| [diagnosticSettingsCategoryGetSample.js][diagnosticsettingscategorygetsample] | Gets the diagnostic settings category for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json | -| [diagnosticSettingsCategoryListSample.js][diagnosticsettingscategorylistsample] | Lists the diagnostic settings categories for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json | -| [diagnosticSettingsCreateOrUpdateSample.js][diagnosticsettingscreateorupdatesample] | Creates or updates diagnostic settings for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json | -| [diagnosticSettingsDeleteSample.js][diagnosticsettingsdeletesample] | Deletes existing diagnostic settings for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json | -| [diagnosticSettingsGetSample.js][diagnosticsettingsgetsample] | Gets the active diagnostic settings for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json | -| [diagnosticSettingsListSample.js][diagnosticsettingslistsample] | Gets the active diagnostic settings list for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json | -| [eventCategoriesListSample.js][eventcategorieslistsample] | Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetEventCategories.json | -| [logProfilesCreateOrUpdateSample.js][logprofilescreateorupdatesample] | Create or update a log profile in Azure Monitoring REST API. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateLogProfile.json | -| [logProfilesDeleteSample.js][logprofilesdeletesample] | Deletes the log profile. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteLogProfile.json | -| [logProfilesGetSample.js][logprofilesgetsample] | Gets the log profile. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getLogProfile.json | -| [logProfilesListSample.js][logprofileslistsample] | List the log profiles. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listLogProfile.json | -| [logProfilesUpdateSample.js][logprofilesupdatesample] | Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchLogProfile.json | -| [metricAlertsCreateOrUpdateSample.js][metricalertscreateorupdatesample] | Create or update an metric alert definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json | -| [metricAlertsDeleteSample.js][metricalertsdeletesample] | Delete an alert rule definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/deleteMetricAlert.json | -| [metricAlertsGetSample.js][metricalertsgetsample] | Retrieve an alert rule definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertMultipleResource.json | -| [metricAlertsListByResourceGroupSample.js][metricalertslistbyresourcegroupsample] | Retrieve alert rule definitions in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json | -| [metricAlertsListBySubscriptionSample.js][metricalertslistbysubscriptionsample] | Retrieve alert rule definitions in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json | -| [metricAlertsStatusListByNameSample.js][metricalertsstatuslistbynamesample] | Retrieve an alert rule status. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatusByName.json | -| [metricAlertsStatusListSample.js][metricalertsstatuslistsample] | Retrieve an alert rule status. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatus.json | -| [metricAlertsUpdateSample.js][metricalertsupdatesample] | Update an metric alert definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/UpdateMetricAlert.json | -| [metricDefinitionsListSample.js][metricdefinitionslistsample] | Lists the metric definitions for the resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsApplicationInsights.json | -| [metricNamespacesListSample.js][metricnamespaceslistsample] | Lists the metric namespaces for the resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/examples/GetMetricNamespaces.json | -| [metricsListSample.js][metricslistsample] | **Lists the metric values for a resource**. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetric.json | -| [monitorOperationsListSample.js][monitoroperationslistsample] | Lists available Operations for this Resource Provider x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/OperationsGet.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available operations from Microsoft.Insights provider. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/OperationList.json | -| [predictiveMetricGetSample.js][predictivemetricgetsample] | get predictive autoscale metric future data x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/GetPredictiveMetric.json | -| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionUpdate.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionDelete.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionGet.json | -| [privateEndpointConnectionsListByPrivateLinkScopeSample.js][privateendpointconnectionslistbyprivatelinkscopesample] | Gets all private endpoint connections on a private link scope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionList.json | -| [privateLinkResourcesGetSample.js][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json | -| [privateLinkResourcesListByPrivateLinkScopeSample.js][privatelinkresourceslistbyprivatelinkscopesample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json | -| [privateLinkScopeOperationStatusGetSample.js][privatelinkscopeoperationstatusgetsample] | Get the status of an azure asynchronous operation associated with a private link scope operation. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/privateLinkScopeOperationStatuses.json | -| [privateLinkScopedResourcesCreateOrUpdateSample.js][privatelinkscopedresourcescreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceUpdate.json | -| [privateLinkScopedResourcesDeleteSample.js][privatelinkscopedresourcesdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceDelete.json | -| [privateLinkScopedResourcesGetSample.js][privatelinkscopedresourcesgetsample] | Gets a scoped resource in a private link scope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceGet.json | -| [privateLinkScopedResourcesListByPrivateLinkScopeSample.js][privatelinkscopedresourceslistbyprivatelinkscopesample] | Gets all private endpoint connections on a private link scope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceList.json | -| [privateLinkScopesCreateOrUpdateSample.js][privatelinkscopescreateorupdatesample] | Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesCreate.json | -| [privateLinkScopesDeleteSample.js][privatelinkscopesdeletesample] | Deletes a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesDelete.json | -| [privateLinkScopesGetSample.js][privatelinkscopesgetsample] | Returns a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesGet.json | -| [privateLinkScopesListByResourceGroupSample.js][privatelinkscopeslistbyresourcegroupsample] | Gets a list of Azure Monitor PrivateLinkScopes within a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesListByResourceGroup.json | -| [privateLinkScopesListSample.js][privatelinkscopeslistsample] | Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesList.json | -| [privateLinkScopesUpdateTagsSample.js][privatelinkscopesupdatetagssample] | Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesUpdateTagsOnly.json | -| [scheduledQueryRulesCreateOrUpdateSample.js][scheduledqueryrulescreateorupdatesample] | Creates or updates a scheduled query rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRule.json | -| [scheduledQueryRulesDeleteSample.js][scheduledqueryrulesdeletesample] | Deletes a scheduled query rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/deleteScheduledQueryRule.json | -| [scheduledQueryRulesGetSample.js][scheduledqueryrulesgetsample] | Retrieve an scheduled query rule definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/getScheduledQueryRule.json | -| [scheduledQueryRulesListByResourceGroupSample.js][scheduledqueryruleslistbyresourcegroupsample] | Retrieve scheduled query rule definitions in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesByResourceGroup.json | -| [scheduledQueryRulesListBySubscriptionSample.js][scheduledqueryruleslistbysubscriptionsample] | Retrieve a scheduled query rule definitions in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesBySubscription.json | -| [scheduledQueryRulesUpdateSample.js][scheduledqueryrulesupdatesample] | Update a scheduled query rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/patchScheduledQueryRule.json | -| [tenantActivityLogsListSample.js][tenantactivitylogslistsample] | Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does _not_ retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsFiltered.json | -| [vmInsightsGetOnboardingStatusSample.js][vminsightsgetonboardingstatussample] | Retrieves the VM Insights onboarding status for the specified resource or resource scope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusVMScaleSet.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env MONITOR_SUBSCRIPTION_ID="" MONITOR_RESOURCE_GROUP="" node actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[actiongroupscreatenotificationsatactiongroupresourcelevelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js -[actiongroupscreatenotificationsatresourcegrouplevelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateNotificationsAtResourceGroupLevelSample.js -[actiongroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateOrUpdateSample.js -[actiongroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsDeleteSample.js -[actiongroupsenablereceiversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsEnableReceiverSample.js -[actiongroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetSample.js -[actiongroupsgettestnotificationsatactiongroupresourcelevelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.js -[actiongroupsgettestnotificationsatresourcegrouplevelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.js -[actiongroupsgettestnotificationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsSample.js -[actiongroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsListByResourceGroupSample.js -[actiongroupslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsListBySubscriptionIdSample.js -[actiongroupsposttestnotificationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsPostTestNotificationsSample.js -[actiongroupsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsUpdateSample.js -[activitylogalertscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsCreateOrUpdateSample.js -[activitylogalertsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsDeleteSample.js -[activitylogalertsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsGetSample.js -[activitylogalertslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsListByResourceGroupSample.js -[activitylogalertslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsListBySubscriptionIdSample.js -[activitylogalertsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsUpdateSample.js -[activitylogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogsListSample.js -[alertruleincidentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRuleIncidentsGetSample.js -[alertruleincidentslistbyalertrulesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRuleIncidentsListByAlertRuleSample.js -[alertrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesCreateOrUpdateSample.js -[alertrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesDeleteSample.js -[alertrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesGetSample.js -[alertruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesListByResourceGroupSample.js -[alertruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesListBySubscriptionSample.js -[alertrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesUpdateSample.js -[autoscalesettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsCreateOrUpdateSample.js -[autoscalesettingsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsDeleteSample.js -[autoscalesettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsGetSample.js -[autoscalesettingslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsListByResourceGroupSample.js -[autoscalesettingslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsListBySubscriptionSample.js -[autoscalesettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsUpdateSample.js -[azuremonitorworkspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesCreateSample.js -[azuremonitorworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesDeleteSample.js -[azuremonitorworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesGetSample.js -[azuremonitorworkspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesListByResourceGroupSample.js -[azuremonitorworkspaceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesListBySubscriptionSample.js -[azuremonitorworkspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesUpdateSample.js -[baselineslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/baselinesListSample.js -[datacollectionendpointscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsCreateSample.js -[datacollectionendpointsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsDeleteSample.js -[datacollectionendpointsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsGetSample.js -[datacollectionendpointslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsListByResourceGroupSample.js -[datacollectionendpointslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsListBySubscriptionSample.js -[datacollectionendpointsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsUpdateSample.js -[datacollectionruleassociationscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsCreateSample.js -[datacollectionruleassociationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsDeleteSample.js -[datacollectionruleassociationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsGetSample.js -[datacollectionruleassociationslistbydatacollectionendpointsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js -[datacollectionruleassociationslistbyresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByResourceSample.js -[datacollectionruleassociationslistbyrulesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByRuleSample.js -[datacollectionrulescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesCreateSample.js -[datacollectionrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesDeleteSample.js -[datacollectionrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesGetSample.js -[datacollectionruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesListByResourceGroupSample.js -[datacollectionruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesListBySubscriptionSample.js -[datacollectionrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesUpdateSample.js -[diagnosticsettingscategorygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCategoryGetSample.js -[diagnosticsettingscategorylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCategoryListSample.js -[diagnosticsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCreateOrUpdateSample.js -[diagnosticsettingsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsDeleteSample.js -[diagnosticsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsGetSample.js -[diagnosticsettingslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsListSample.js -[eventcategorieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/eventCategoriesListSample.js -[logprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesCreateOrUpdateSample.js -[logprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesDeleteSample.js -[logprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesGetSample.js -[logprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesListSample.js -[logprofilesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesUpdateSample.js -[metricalertscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsCreateOrUpdateSample.js -[metricalertsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsDeleteSample.js -[metricalertsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsGetSample.js -[metricalertslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsListByResourceGroupSample.js -[metricalertslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsListBySubscriptionSample.js -[metricalertsstatuslistbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsStatusListByNameSample.js -[metricalertsstatuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsStatusListSample.js -[metricalertsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsUpdateSample.js -[metricdefinitionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricDefinitionsListSample.js -[metricnamespaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricNamespacesListSample.js -[metricslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricsListSample.js -[monitoroperationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/monitorOperationsListSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/operationsListSample.js -[predictivemetricgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/predictiveMetricGetSample.js -[privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js -[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsDeleteSample.js -[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsGetSample.js -[privateendpointconnectionslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js -[privatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkResourcesGetSample.js -[privatelinkresourceslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js -[privatelinkscopeoperationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopeOperationStatusGetSample.js -[privatelinkscopedresourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesCreateOrUpdateSample.js -[privatelinkscopedresourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesDeleteSample.js -[privatelinkscopedresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesGetSample.js -[privatelinkscopedresourceslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesListByPrivateLinkScopeSample.js -[privatelinkscopescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesCreateOrUpdateSample.js -[privatelinkscopesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesDeleteSample.js -[privatelinkscopesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesGetSample.js -[privatelinkscopeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesListByResourceGroupSample.js -[privatelinkscopeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesListSample.js -[privatelinkscopesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesUpdateTagsSample.js -[scheduledqueryrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesCreateOrUpdateSample.js -[scheduledqueryrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesDeleteSample.js -[scheduledqueryrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesGetSample.js -[scheduledqueryruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesListByResourceGroupSample.js -[scheduledqueryruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesListBySubscriptionSample.js -[scheduledqueryrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesUpdateSample.js -[tenantactivitylogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/tenantActivityLogsListSample.js -[vminsightsgetonboardingstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/javascript/vmInsightsGetOnboardingStatusSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-monitor?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor/README.md diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js deleted file mode 100644 index 5a52f596baa0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtActionGroupResourceLevel.json - */ -async function createNotificationsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "TestRgName"; - const actionGroupName = "TestAgName"; - const notificationRequest = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true, - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false, - }, - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084", - }, - ], - azureAppPushReceivers: [{ name: "Sample azureAppPush", emailAddress: "johndoe@email.com" }], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true, - }, - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false, - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true, - }, - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - }, - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c", - }, - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false, - }, - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890", - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321", - }, - ], - voiceReceivers: [{ name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" }], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true, - }, - { - name: "Sample webhook 2", - identifierUri: "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = - await client.actionGroups.beginCreateNotificationsAtActionGroupResourceLevelAndWait( - resourceGroupName, - actionGroupName, - notificationRequest - ); - console.log(result); -} - -async function main() { - createNotificationsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateNotificationsAtResourceGroupLevelSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateNotificationsAtResourceGroupLevelSample.js deleted file mode 100644 index 992bd6331cb6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateNotificationsAtResourceGroupLevelSample.js +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtResourceGroupLevel.json - */ -async function createNotificationsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Default-TestNotifications"; - const notificationRequest = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true, - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false, - }, - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084", - }, - ], - azureAppPushReceivers: [{ name: "Sample azureAppPush", emailAddress: "johndoe@email.com" }], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true, - }, - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false, - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true, - }, - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - }, - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c", - }, - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false, - }, - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890", - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321", - }, - ], - voiceReceivers: [{ name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" }], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true, - }, - { - name: "Sample webhook 2", - identifierUri: "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.beginCreateNotificationsAtResourceGroupLevelAndWait( - resourceGroupName, - notificationRequest - ); - console.log(result); -} - -async function main() { - createNotificationsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateOrUpdateSample.js deleted file mode 100644 index a68ac594d015..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsCreateOrUpdateSample.js +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new action group or update an existing one. - * - * @summary Create a new action group or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/createOrUpdateActionGroup.json - */ -async function createOrUpdateAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const actionGroup = { - armRoleReceivers: [ - { - name: "Sample armRole", - roleId: "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", - useCommonAlertSchema: true, - }, - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084", - }, - ], - azureAppPushReceivers: [{ name: "Sample azureAppPush", emailAddress: "johndoe@email.com" }], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true, - }, - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false, - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true, - }, - ], - enabled: true, - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - }, - ], - groupShortName: "sample", - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c", - }, - ], - location: "Global", - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false, - }, - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890", - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321", - }, - ], - tags: {}, - voiceReceivers: [{ name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" }], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true, - }, - { - name: "Sample webhook 2", - identifierUri: "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.createOrUpdate( - resourceGroupName, - actionGroupName, - actionGroup - ); - console.log(result); -} - -async function main() { - createOrUpdateAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsDeleteSample.js deleted file mode 100644 index 7050154bbdf0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete an action group. - * - * @summary Delete an action group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/deleteActionGroup.json - */ -async function deleteAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.delete(resourceGroupName, actionGroupName); - console.log(result); -} - -async function main() { - deleteAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsEnableReceiverSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsEnableReceiverSample.js deleted file mode 100644 index 880102065bb6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsEnableReceiverSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. - * - * @summary Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/enableReceiver.json - */ -async function enableTheReceiver() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const enableRequest = { receiverName: "John Doe's mobile" }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.enableReceiver( - resourceGroupName, - actionGroupName, - enableRequest - ); - console.log(result); -} - -async function main() { - enableTheReceiver(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetSample.js deleted file mode 100644 index 93291912836d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get an action group. - * - * @summary Get an action group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getActionGroup.json - */ -async function getAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.get(resourceGroupName, actionGroupName); - console.log(result); -} - -async function main() { - getAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.js deleted file mode 100644 index 662e75a83b77..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtActionGroupResourceLevel.json - */ -async function getNotificationDetailsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "TestRgName"; - const actionGroupName = "TestAgName"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotificationsAtActionGroupResourceLevel( - resourceGroupName, - actionGroupName, - notificationId - ); - console.log(result); -} - -async function main() { - getNotificationDetailsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.js deleted file mode 100644 index 79dd880f282a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtResourceGroupLevel.json - */ -async function getNotificationDetailsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Default-TestNotifications"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotificationsAtResourceGroupLevel( - resourceGroupName, - notificationId - ); - console.log(result); -} - -async function main() { - getNotificationDetailsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsSample.js deleted file mode 100644 index 0e15f0c99d7c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsGetTestNotificationsSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotifications.json - */ -async function getNotificationDetailsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotifications(notificationId); - console.log(result); -} - -async function main() { - getNotificationDetailsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsListByResourceGroupSample.js deleted file mode 100644 index c9e459c348ca..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of all action groups in a resource group. - * - * @summary Get a list of all action groups in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json - */ -async function listActionGroupsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.actionGroups.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActionGroupsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsListBySubscriptionIdSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsListBySubscriptionIdSample.js deleted file mode 100644 index 4086184a645d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsListBySubscriptionIdSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of all action groups in a subscription. - * - * @summary Get a list of all action groups in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json - */ -async function listActionGroupsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.actionGroups.listBySubscriptionId()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActionGroupsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsPostTestNotificationsSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsPostTestNotificationsSample.js deleted file mode 100644 index a8301d68eff0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsPostTestNotificationsSample.js +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotifications.json - */ -async function createNotificationsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const notificationRequest = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true, - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false, - }, - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084", - }, - ], - azureAppPushReceivers: [{ name: "Sample azureAppPush", emailAddress: "johndoe@email.com" }], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true, - }, - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false, - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true, - }, - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - }, - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c", - }, - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false, - }, - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890", - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321", - }, - ], - voiceReceivers: [{ name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" }], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true, - }, - { - name: "Sample webhook 2", - identifierUri: "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.beginPostTestNotificationsAndWait(notificationRequest); - console.log(result); -} - -async function main() { - createNotificationsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsUpdateSample.js deleted file mode 100644 index bca93894e7bd..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/actionGroupsUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/patchActionGroup.json - */ -async function patchAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const actionGroupPatch = { - enabled: false, - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.update( - resourceGroupName, - actionGroupName, - actionGroupPatch - ); - console.log(result); -} - -async function main() { - patchAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsCreateOrUpdateSample.js deleted file mode 100644 index 75b001a678b6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsCreateOrUpdateSample.js +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdate.json - */ -async function createOrUpdateAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const activityLogAlertRule = { - description: "Description of sample Activity Log Alert rule.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" }, - }, - ], - }, - condition: { - allOf: [ - { equals: "Administrative", field: "category" }, - { equals: "Error", field: "level" }, - ], - }, - enabled: true, - location: "Global", - scopes: ["/subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithAnyOfCondition.json - */ -async function createOrUpdateAnActivityLogAlertRuleWithAnyOfCondition() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRuleWithAnyOfCondition"; - const activityLogAlertRule = { - description: "Description of sample Activity Log Alert rule with 'anyOf' condition.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" }, - }, - ], - }, - condition: { - allOf: [ - { equals: "ServiceHealth", field: "category" }, - { - anyOf: [ - { equals: "Incident", field: "properties.incidentType" }, - { equals: "Maintenance", field: "properties.incidentType" }, - ], - }, - ], - }, - enabled: true, - location: "Global", - scopes: ["subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithContainsAny.json - */ -async function createOrUpdateAnActivityLogAlertRuleWithContainsAny() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRuleWithContainsAny"; - const activityLogAlertRule = { - description: "Description of sample Activity Log Alert rule with 'containsAny'.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" }, - }, - ], - }, - condition: { - allOf: [ - { equals: "ServiceHealth", field: "category" }, - { - containsAny: ["North Europe", "West Europe"], - field: "properties.impactedServices[*].ImpactedRegions[*].RegionName", - }, - ], - }, - enabled: true, - location: "Global", - scopes: ["subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -async function main() { - createOrUpdateAnActivityLogAlertRule(); - createOrUpdateAnActivityLogAlertRuleWithAnyOfCondition(); - createOrUpdateAnActivityLogAlertRuleWithContainsAny(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsDeleteSample.js deleted file mode 100644 index 0006ad81aeab..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete an Activity Log Alert rule. - * - * @summary Delete an Activity Log Alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Delete.json - */ -async function deleteAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.delete(resourceGroupName, activityLogAlertName); - console.log(result); -} - -async function main() { - deleteAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsGetSample.js deleted file mode 100644 index e2c065808c39..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get an Activity Log Alert rule. - * - * @summary Get an Activity Log Alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Get.json - */ -async function getAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.get(resourceGroupName, activityLogAlertName); - console.log(result); -} - -async function main() { - getAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsListByResourceGroupSample.js deleted file mode 100644 index c79f88066689..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of all Activity Log Alert rules in a resource group. - * - * @summary Get a list of all Activity Log Alert rules in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListByResourceGroupName.json - */ -async function listActivityLogAlerts() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogAlerts.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActivityLogAlerts(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsListBySubscriptionIdSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsListBySubscriptionIdSample.js deleted file mode 100644 index 88aa27771f6e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsListBySubscriptionIdSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of all Activity Log Alert rules in a subscription. - * - * @summary Get a list of all Activity Log Alert rules in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListBySubscriptionId.json - */ -async function getListOfAllActivityLogAlertRulesUnderASubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogAlerts.listBySubscriptionId()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getListOfAllActivityLogAlertRulesUnderASubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsUpdateSample.js deleted file mode 100644 index 3cc897148665..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogAlertsUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. - * - * @summary Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Update.json - */ -async function patchAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const activityLogAlertRulePatch = { - enabled: false, - tags: { key1: "value1", key2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.update( - resourceGroupName, - activityLogAlertName, - activityLogAlertRulePatch - ); - console.log(result); -} - -async function main() { - patchAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogsListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogsListSample.js deleted file mode 100644 index 25c6022d9e77..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/activityLogsListSample.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Provides the list of records from the activity logs. - * - * @summary Provides the list of records from the activity logs. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsFiltered.json - */ -async function getActivityLogsWithFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogs.list(filter)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Provides the list of records from the activity logs. - * - * @summary Provides the list of records from the activity logs. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsFilteredAndSelected.json - */ -async function getActivityLogsWithFilterAndSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options = { select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogs.list(filter, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getActivityLogsWithFilter(); - getActivityLogsWithFilterAndSelect(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRuleIncidentsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRuleIncidentsGetSample.js deleted file mode 100644 index 27878c579b1b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRuleIncidentsGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets an incident associated to an alert rule - * - * @summary Gets an incident associated to an alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRuleIncident.json - */ -async function getASingleAlertRuleIncident() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "myRuleName"; - const incidentName = "Website_started"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRuleIncidents.get(resourceGroupName, ruleName, incidentName); - console.log(result); -} - -async function main() { - getASingleAlertRuleIncident(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRuleIncidentsListByAlertRuleSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRuleIncidentsListByAlertRuleSample.js deleted file mode 100644 index 998d1a36e388..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRuleIncidentsListByAlertRuleSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a list of incidents associated to an alert rule - * - * @summary Gets a list of incidents associated to an alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleIncidents.json - */ -async function listAlertRuleIncidents() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "myRuleName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRuleIncidents.listByAlertRule(resourceGroupName, ruleName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRuleIncidents(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesCreateOrUpdateSample.js deleted file mode 100644 index cff5b1937bbf..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a classic metric alert rule. - * - * @summary Creates or updates a classic metric alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateAlertRule.json - */ -async function createOrUpdateAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const parameters = { - namePropertiesName: "chiricutin", - description: "Pura Vida", - actions: [], - condition: { - dataSource: { - metricName: "Requests", - odataType: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - resourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", - }, - odataType: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - operator: "GreaterThan", - threshold: 3, - timeAggregation: "Total", - windowSize: "PT5M", - }, - isEnabled: true, - location: "West US", - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -async function main() { - createOrUpdateAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesDeleteSample.js deleted file mode 100644 index 86473357c892..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a classic metric alert rule - * - * @summary Deletes a classic metric alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteAlertRule.json - */ -async function deleteAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.delete(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - deleteAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesGetSample.js deleted file mode 100644 index 286f6d1533cc..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a classic metric alert rule - * - * @summary Gets a classic metric alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRule.json - */ -async function getAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.get(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - getAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesListByResourceGroupSample.js deleted file mode 100644 index 9cd4c2966d03..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the classic metric alert rules within a resource group. - * - * @summary List the classic metric alert rules within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRule.json - */ -async function listAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRules.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesListBySubscriptionSample.js deleted file mode 100644 index b3d78051e5e8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the classic metric alert rules within a subscription. - * - * @summary List the classic metric alert rules within a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleBySubscription.json - */ -async function listAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesUpdateSample.js deleted file mode 100644 index 083f758ac6db..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/alertRulesUpdateSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchAlertRule.json - */ -async function patchAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const alertRulesResource = { - name: "chiricutin", - description: "Pura Vida", - actions: [], - condition: { - dataSource: { - metricName: "Requests", - odataType: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - resourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", - }, - odataType: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - operator: "GreaterThan", - threshold: 3, - timeAggregation: "Total", - windowSize: "PT5M", - }, - isEnabled: true, - tags: { - $type: "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.update(resourceGroupName, ruleName, alertRulesResource); - console.log(result); -} - -async function main() { - patchAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsCreateOrUpdateSample.js deleted file mode 100644 index 966be13fce90..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsCreateOrUpdateSample.js +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates an autoscale setting. - * - * @summary Creates or updates an autoscale setting. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/createOrUpdateAutoscaleSetting.json - */ -async function createOrUpdateAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const parameters = { - enabled: true, - location: "West US", - notifications: [ - { - email: { - customEmails: ["gu@ms.com", "ge@ns.net"], - sendToSubscriptionAdministrator: true, - sendToSubscriptionCoAdministrators: true, - }, - operation: "Scale", - webhooks: [{ properties: {}, serviceUri: "http://myservice.com" }], - }, - ], - predictiveAutoscalePolicy: { scaleMode: "Enabled" }, - profiles: [ - { - name: "adios", - capacity: { default: "1", maximum: "10", minimum: "1" }, - fixedDate: { - end: new Date("2015-03-05T14:30:00Z"), - start: new Date("2015-03-05T14:00:00Z"), - timeZone: "UTC", - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M", - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1", - }, - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M", - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2", - }, - }, - ], - }, - { - name: "saludos", - capacity: { default: "1", maximum: "10", minimum: "1" }, - recurrence: { - frequency: "Week", - schedule: { days: ["1"], hours: [5], minutes: [15], timeZone: "UTC" }, - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M", - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1", - }, - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M", - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2", - }, - }, - ], - }, - ], - tags: { key1: "value1", key2: "value2" }, - targetResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.createOrUpdate( - resourceGroupName, - autoscaleSettingName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsDeleteSample.js deleted file mode 100644 index 851e06221fb8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes and autoscale setting - * - * @summary Deletes and autoscale setting - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json - */ -async function deleteAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.delete(resourceGroupName, autoscaleSettingName); - console.log(result); -} - -async function main() { - deleteAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsGetSample.js deleted file mode 100644 index a401a3786e53..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets an autoscale setting - * - * @summary Gets an autoscale setting - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/getAutoscaleSetting.json - */ -async function getAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.get(resourceGroupName, autoscaleSettingName); - console.log(result); -} - -async function main() { - getAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsListByResourceGroupSample.js deleted file mode 100644 index 0cab2c2f0e83..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the autoscale settings for a resource group - * - * @summary Lists the autoscale settings for a resource group - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSetting.json - */ -async function listAutoscaleSettings() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.autoscaleSettings.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAutoscaleSettings(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsListBySubscriptionSample.js deleted file mode 100644 index 22063de883c5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the autoscale settings for a subscription - * - * @summary Lists the autoscale settings for a subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSettingBySubscription.json - */ -async function listAutoscaleSettingsBySubs() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.autoscaleSettings.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAutoscaleSettingsBySubs(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsUpdateSample.js deleted file mode 100644 index 1b33cd3aee5a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/autoscaleSettingsUpdateSample.js +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/patchAutoscaleSetting.json - */ -async function patchAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const autoscaleSettingResource = { - enabled: true, - notifications: [ - { - email: { - customEmails: ["gu@ms.com", "ge@ns.net"], - sendToSubscriptionAdministrator: true, - sendToSubscriptionCoAdministrators: true, - }, - operation: "Scale", - webhooks: [{ properties: {}, serviceUri: "http://myservice.com" }], - }, - ], - predictiveAutoscalePolicy: { scaleMode: "Enabled" }, - profiles: [ - { - name: "adios", - capacity: { default: "1", maximum: "10", minimum: "1" }, - fixedDate: { - end: new Date("2015-03-05T14:30:00Z"), - start: new Date("2015-03-05T14:00:00Z"), - timeZone: "UTC", - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M", - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1", - }, - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M", - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2", - }, - }, - ], - }, - { - name: "saludos", - capacity: { default: "1", maximum: "10", minimum: "1" }, - recurrence: { - frequency: "Week", - schedule: { days: ["1"], hours: [5], minutes: [15], timeZone: "UTC" }, - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M", - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1", - }, - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M", - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2", - }, - }, - ], - }, - ], - tags: { key1: "value1" }, - targetResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.update( - resourceGroupName, - autoscaleSettingName, - autoscaleSettingResource - ); - console.log(result); -} - -async function main() { - patchAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesCreateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesCreateSample.js deleted file mode 100644 index 6ccbaf2fc0b0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesCreateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a workspace - * - * @summary Create or update a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesCreate.json - */ -async function createOrUpdateWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const azureMonitorWorkspaceProperties = { - location: "eastus", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.create( - resourceGroupName, - azureMonitorWorkspaceName, - azureMonitorWorkspaceProperties - ); - console.log(result); -} - -async function main() { - createOrUpdateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesDeleteSample.js deleted file mode 100644 index f2c4c975135a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a workspace - * - * @summary Delete a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesDelete.json - */ -async function deleteWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.delete( - resourceGroupName, - azureMonitorWorkspaceName - ); - console.log(result); -} - -async function main() { - deleteWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesGetSample.js deleted file mode 100644 index 4c02337ca6eb..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesGetSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns the specific Azure Monitor workspace - * - * @summary Returns the specific Azure Monitor workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesGet.json - */ -async function getWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.get( - resourceGroupName, - azureMonitorWorkspaceName - ); - console.log(result); -} - -async function main() { - getWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesListByResourceGroupSample.js deleted file mode 100644 index 15f6de20ae33..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all workspaces in the specified resource group - * - * @summary Lists all workspaces in the specified resource group - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListByResourceGroup.json - */ -async function listMonitorWorkspacesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.azureMonitorWorkspaces.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMonitorWorkspacesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesListBySubscriptionSample.js deleted file mode 100644 index cab701fb9827..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all workspaces in the specified subscription - * - * @summary Lists all workspaces in the specified subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListBySubscription.json - */ -async function listWorkspacesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.azureMonitorWorkspaces.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listWorkspacesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesUpdateSample.js deleted file mode 100644 index c11397f1c433..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/azureMonitorWorkspacesUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates part of a workspace - * - * @summary Updates part of a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesUpdate.json - */ -async function updateWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const azureMonitorWorkspaceProperties = { - tags: { tag1: "A", tag2: "B", tag3: "C" }, - }; - const options = { - azureMonitorWorkspaceProperties, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.update( - resourceGroupName, - azureMonitorWorkspaceName, - options - ); - console.log(result); -} - -async function main() { - updateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/baselinesListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/baselinesListSample.js deleted file mode 100644 index 25a1d22f7f6d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/baselinesListSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to **Lists the metric baseline values for a resource**. - * - * @summary **Lists the metric baseline values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/metricBaselines.json - */ -async function getMetricBaselines() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1"; - const timespan = "2019-03-12T11:00:00.000Z/2019-03-12T12:00:00.000Z"; - const interval = "PT1H"; - const aggregation = "average"; - const sensitivities = "Low,Medium"; - const options = { - timespan, - interval, - aggregation, - sensitivities, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.baselines.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getMetricBaselines(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsCreateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsCreateSample.js deleted file mode 100644 index 685c3cbc4d21..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsCreateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a data collection endpoint. - * - * @summary Creates or updates a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsCreate.json - */ -async function createOrUpdateDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const body = { - location: "eastus", - networkAcls: { publicNetworkAccess: "Enabled" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.create( - resourceGroupName, - dataCollectionEndpointName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsDeleteSample.js deleted file mode 100644 index b77db1b10795..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a data collection endpoint. - * - * @summary Deletes a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsDelete.json - */ -async function deleteDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.delete( - resourceGroupName, - dataCollectionEndpointName - ); - console.log(result); -} - -async function main() { - deleteDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsGetSample.js deleted file mode 100644 index 0641017adb1b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsGetSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns the specified data collection endpoint. - * - * @summary Returns the specified data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsGet.json - */ -async function getDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.get( - resourceGroupName, - dataCollectionEndpointName - ); - console.log(result); -} - -async function main() { - getDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsListByResourceGroupSample.js deleted file mode 100644 index eaf0afdf4fbb..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all data collection endpoints in the specified resource group. - * - * @summary Lists all data collection endpoints in the specified resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListByResourceGroup.json - */ -async function listDataCollectionEndpointsByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionEndpoints.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionEndpointsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsListBySubscriptionSample.js deleted file mode 100644 index e53b5d2310e3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all data collection endpoints in the specified subscription - * - * @summary Lists all data collection endpoints in the specified subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListBySubscription.json - */ -async function listDataCollectionEndpointsBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionEndpoints.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionEndpointsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsUpdateSample.js deleted file mode 100644 index d7eea337ea7f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionEndpointsUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates part of a data collection endpoint. - * - * @summary Updates part of a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsUpdate.json - */ -async function updateDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const body = { tags: { tag1: "A", tag2: "B", tag3: "C" } }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.update( - resourceGroupName, - dataCollectionEndpointName, - options - ); - console.log(result); -} - -async function main() { - updateDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsCreateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsCreateSample.js deleted file mode 100644 index a2b198184204..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsCreateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates an association. - * - * @summary Creates or updates an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsCreate.json - */ -async function createOrUpdateAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const body = { - dataCollectionRuleId: - "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule", - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.create( - resourceUri, - associationName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsDeleteSample.js deleted file mode 100644 index f73ee007dfc0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes an association. - * - * @summary Deletes an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsDelete.json - */ -async function deleteAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.delete(resourceUri, associationName); - console.log(result); -} - -async function main() { - deleteAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsGetSample.js deleted file mode 100644 index d81af97194cf..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns the specified association. - * - * @summary Returns the specified association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsGet.json - */ -async function getAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.get(resourceUri, associationName); - console.log(result); -} - -async function main() { - getAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js deleted file mode 100644 index d8f9017cd175..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists associations for the specified data collection endpoint. - * - * @summary Lists associations for the specified data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByDataCollectionEndpoint.json - */ -async function listAssociationsForSpecifiedDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myDataCollectionEndpointName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByDataCollectionEndpoint( - resourceGroupName, - dataCollectionEndpointName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByResourceSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByResourceSample.js deleted file mode 100644 index d86b92317542..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByResourceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists associations for the specified resource. - * - * @summary Lists associations for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByResource.json - */ -async function listAssociationsForSpecifiedResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByResource(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByRuleSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByRuleSample.js deleted file mode 100644 index c630ec190d02..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRuleAssociationsListByRuleSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists associations for the specified data collection rule. - * - * @summary Lists associations for the specified data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByRule.json - */ -async function listAssociationsForSpecifiedDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByRule( - resourceGroupName, - dataCollectionRuleName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesCreateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesCreateSample.js deleted file mode 100644 index 5df61b374364..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesCreateSample.js +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a data collection rule. - * - * @summary Creates or updates a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesCreate.json - */ -async function createOrUpdateDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const body = { - dataFlows: [ - { - destinations: ["centralWorkspace"], - streams: ["Microsoft-Perf", "Microsoft-Syslog", "Microsoft-WindowsEvent"], - }, - ], - dataSources: { - performanceCounters: [ - { - name: "cloudTeamCoreCounters", - counterSpecifiers: [ - "\\Processor(_Total)\\% Processor Time", - "\\Memory\\Committed Bytes", - "\\LogicalDisk(_Total)\\Free Megabytes", - "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length", - ], - samplingFrequencyInSeconds: 15, - streams: ["Microsoft-Perf"], - }, - { - name: "appTeamExtraCounters", - counterSpecifiers: ["\\Process(_Total)\\Thread Count"], - samplingFrequencyInSeconds: 30, - streams: ["Microsoft-Perf"], - }, - ], - syslog: [ - { - name: "cronSyslog", - facilityNames: ["cron"], - logLevels: ["Debug", "Critical", "Emergency"], - streams: ["Microsoft-Syslog"], - }, - { - name: "syslogBase", - facilityNames: ["syslog"], - logLevels: ["Alert", "Critical", "Emergency"], - streams: ["Microsoft-Syslog"], - }, - ], - windowsEventLogs: [ - { - name: "cloudSecurityTeamEvents", - streams: ["Microsoft-WindowsEvent"], - xPathQueries: ["Security!"], - }, - { - name: "appTeam1AppEvents", - streams: ["Microsoft-WindowsEvent"], - xPathQueries: [ - "System![System[(Level = 1 or Level = 2 or Level = 3)]]", - "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]", - ], - }, - ], - }, - destinations: { - logAnalytics: [ - { - name: "centralWorkspace", - workspaceResourceId: - "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/centralTeamWorkspace", - }, - ], - }, - location: "eastus", - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.create( - resourceGroupName, - dataCollectionRuleName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesDeleteSample.js deleted file mode 100644 index fb6b05bd317c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a data collection rule. - * - * @summary Deletes a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesDelete.json - */ -async function deleteDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.delete(resourceGroupName, dataCollectionRuleName); - console.log(result); -} - -async function main() { - deleteDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesGetSample.js deleted file mode 100644 index 134660caeb4f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns the specified data collection rule. - * - * @summary Returns the specified data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesGet.json - */ -async function getDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.get(resourceGroupName, dataCollectionRuleName); - console.log(result); -} - -async function main() { - getDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesListByResourceGroupSample.js deleted file mode 100644 index b34207695013..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all data collection rules in the specified resource group. - * - * @summary Lists all data collection rules in the specified resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListByResourceGroup.json - */ -async function listDataCollectionRulesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRules.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionRulesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesListBySubscriptionSample.js deleted file mode 100644 index 486b8a7f2e7e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all data collection rules in the specified subscription. - * - * @summary Lists all data collection rules in the specified subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListBySubscription.json - */ -async function listDataCollectionRulesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionRulesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesUpdateSample.js deleted file mode 100644 index ac743821267d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/dataCollectionRulesUpdateSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates part of a data collection rule. - * - * @summary Updates part of a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesUpdate.json - */ -async function updateDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const body = { tags: { tag1: "A", tag2: "B", tag3: "C" } }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.update( - resourceGroupName, - dataCollectionRuleName, - options - ); - console.log(result); -} - -async function main() { - updateDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCategoryGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCategoryGetSample.js deleted file mode 100644 index 8065784f4508..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCategoryGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the diagnostic settings category for the specified resource. - * - * @summary Gets the diagnostic settings category for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "WorkflowRuntime"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettingsCategory.get(resourceUri, name); - console.log(result); -} - -async function main() { - getsTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCategoryListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCategoryListSample.js deleted file mode 100644 index d84db57d6349..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCategoryListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the diagnostic settings categories for the specified resource. - * - * @summary Lists the diagnostic settings categories for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettingsCategory.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCreateOrUpdateSample.js deleted file mode 100644 index 53ea6c13e1b3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsCreateOrUpdateSample.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates diagnostic settings for the specified resource. - * - * @summary Creates or updates diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json - */ -async function createsOrUpdatesTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const parameters = { - eventHubAuthorizationRuleId: - "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - categoryGroup: "allLogs", - enabled: true, - retentionPolicy: { days: 0, enabled: false }, - }, - ], - marketplacePartnerId: - "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1", - metrics: [ - { - category: "WorkflowMetrics", - enabled: true, - retentionPolicy: { days: 0, enabled: false }, - }, - ], - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - workspaceId: "", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.createOrUpdate(resourceUri, name, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates diagnostic settings for the specified resource. - * - * @summary Creates or updates diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSettingCategory.json - */ -async function createsOrUpdatesTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const parameters = { - eventHubAuthorizationRuleId: - "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - category: "WorkflowRuntime", - enabled: true, - retentionPolicy: { days: 0, enabled: false }, - }, - ], - marketplacePartnerId: - "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1", - metrics: [ - { - category: "WorkflowMetrics", - enabled: true, - retentionPolicy: { days: 0, enabled: false }, - }, - ], - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - workspaceId: "", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.createOrUpdate(resourceUri, name, parameters); - console.log(result); -} - -async function main() { - createsOrUpdatesTheDiagnosticSetting(); - createsOrUpdatesTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsDeleteSample.js deleted file mode 100644 index dbb827119fbf..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes existing diagnostic settings for the specified resource. - * - * @summary Deletes existing diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json - */ -async function deletesTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.delete(resourceUri, name); - console.log(result); -} - -async function main() { - deletesTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsGetSample.js deleted file mode 100644 index dc2e6a87f1c9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsGetSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the active diagnostic settings for the specified resource. - * - * @summary Gets the active diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.get(resourceUri, name); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the active diagnostic settings for the specified resource. - * - * @summary Gets the active diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingCategory.json - */ -async function getsTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.get(resourceUri, name); - console.log(result); -} - -async function main() { - getsTheDiagnosticSetting(); - getsTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsListSample.js deleted file mode 100644 index 363dc3eb43dc..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/diagnosticSettingsListSample.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the active diagnostic settings list for the specified resource. - * - * @summary Gets the active diagnostic settings list for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettings.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the active diagnostic settings list for the specified resource. - * - * @summary Gets the active diagnostic settings list for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettings.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsTheDiagnosticSetting(); - getsTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/eventCategoriesListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/eventCategoriesListSample.js deleted file mode 100644 index eec32d8f4f43..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/eventCategoriesListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * - * @summary Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetEventCategories.json - */ -async function getEventCategories() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.eventCategories.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getEventCategories(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesCreateOrUpdateSample.js deleted file mode 100644 index da226d6f0f13..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update a log profile in Azure Monitoring REST API. - * - * @summary Create or update a log profile in Azure Monitoring REST API. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateLogProfile.json - */ -async function createOrUpdateALogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "Rac46PostSwapRG"; - const parameters = { - categories: ["Write", "Delete", "Action"], - location: "", - locations: ["global"], - retentionPolicy: { days: 3, enabled: true }, - serviceBusRuleId: "", - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", - tags: {}, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.createOrUpdate(logProfileName, parameters); - console.log(result); -} - -async function main() { - createOrUpdateALogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesDeleteSample.js deleted file mode 100644 index 71389d1376de..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesDeleteSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the log profile. - * - * @summary Deletes the log profile. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteLogProfile.json - */ -async function deleteLogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const logProfileName = "Rac46PostSwapRG"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.delete(logProfileName); - console.log(result); -} - -async function main() { - deleteLogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesGetSample.js deleted file mode 100644 index 9e9a7ec58562..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the log profile. - * - * @summary Gets the log profile. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getLogProfile.json - */ -async function getLogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "default"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.get(logProfileName); - console.log(result); -} - -async function main() { - getLogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesListSample.js deleted file mode 100644 index b2b9b1ed3472..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List the log profiles. - * - * @summary List the log profiles. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listLogProfile.json - */ -async function listLogProfiles() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.logProfiles.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listLogProfiles(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesUpdateSample.js deleted file mode 100644 index 102f0534f03e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/logProfilesUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchLogProfile.json - */ -async function patchALogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "Rac46PostSwapRG"; - const logProfilesResource = { - categories: ["Write", "Delete", "Action"], - locations: ["global"], - retentionPolicy: { days: 3, enabled: true }, - serviceBusRuleId: "", - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", - tags: { key1: "value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.update(logProfileName, logProfilesResource); - console.log(result); -} - -async function main() { - patchALogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsCreateOrUpdateSample.js deleted file mode 100644 index 66374555c535..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsCreateOrUpdateSample.js +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json - */ -async function createOrUpdateADynamicAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const parameters = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" }, - }, - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - alertSensitivity: "Medium", - criterionType: "DynamicThresholdCriterion", - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 4, - numberOfEvaluationPeriods: 4, - }, - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterOrLessThan", - timeAggregation: "Average", - }, - ], - odataType: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2", - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json - */ -async function createOrUpdateADynamicAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" }, - }, - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - alertSensitivity: "Medium", - criterionType: "DynamicThresholdCriterion", - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 4, - numberOfEvaluationPeriods: 4, - }, - ignoreDataBefore: new Date("2019-04-04T21:00:00.000Z"), - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterOrLessThan", - timeAggregation: "Average", - }, - ], - odataType: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme", - ], - severity: 3, - tags: {}, - windowSize: "PT15M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateWebTestMetricAlert.json - */ -async function createOrUpdateAWebTestAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "rg-example"; - const ruleName = "webtest-name-example"; - const parameters = { - description: 'Automatically created alert rule for availability test "component-example" a', - actions: [], - criteria: { - componentId: - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example", - failedLocationCount: 2, - odataType: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", - webTestId: - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example", - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example", - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example", - ], - severity: 4, - tags: { - "hiddenLink:/subscriptions/12345678123412341234123456789101/resourcegroups/rgExample/providers/microsoftInsights/components/webtestNameExample": - "Resource", - "hiddenLink:/subscriptions/12345678123412341234123456789101/resourcegroups/rgExample/providers/microsoftInsights/webtests/componentExample": - "Resource", - }, - windowSize: "PT15M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertMultipleResource.json - */ -async function createOrUpdateAnAlertRuleForMultipleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const parameters = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" }, - }, - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average", - }, - ], - odataType: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2", - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertSingleResource.json - */ -async function createOrUpdateAnAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" }, - }, - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "\\Processor(_Total)\\% Processor Time", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average", - }, - ], - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", - }, - enabled: true, - evaluationFrequency: "Pt1m", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme", - ], - severity: 3, - tags: {}, - windowSize: "Pt15m", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertResourceGroup.json - */ -async function createOrUpdateAnAlertRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest1"; - const ruleName = "MetricAlertAtResourceGroupLevel"; - const parameters = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" }, - }, - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average", - }, - ], - odataType: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2", - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertSubscription.json - */ -async function createOrUpdateAnAlertRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertAtSubscriptionLevel"; - const parameters = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" }, - }, - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average", - }, - ], - odataType: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: ["/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertWithDimensions.json - */ -async function createOrUpdateAnAlertRulesWithDimensions() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleDimensions"; - const parameters = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" }, - }, - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "Metric1", - criterionType: "StaticThresholdCriterion", - dimensions: [ - { name: "ActivityName", operator: "Include", values: ["*"] }, - { name: "StatusCode", operator: "Include", values: ["200"] }, - ], - metricName: "Availability", - metricNamespace: "Microsoft.KeyVault/vaults", - operator: "GreaterThan", - threshold: 55, - timeAggregation: "Average", - }, - ], - odataType: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - }, - enabled: true, - evaluationFrequency: "PT1H", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource", - ], - severity: 3, - tags: {}, - windowSize: "P1D", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate(resourceGroupName, ruleName, parameters); - console.log(result); -} - -async function main() { - createOrUpdateADynamicAlertRuleForMultipleResources(); - createOrUpdateADynamicAlertRuleForSingleResource(); - createOrUpdateAWebTestAlertRule(); - createOrUpdateAnAlertRuleForMultipleResource(); - createOrUpdateAnAlertRuleForSingleResource(); - createOrUpdateAnAlertRuleOnResourceGroupS(); - createOrUpdateAnAlertRuleOnSubscription(); - createOrUpdateAnAlertRulesWithDimensions(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsDeleteSample.js deleted file mode 100644 index af4f20182481..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete an alert rule definition. - * - * @summary Delete an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/deleteMetricAlert.json - */ -async function deleteAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.delete(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - deleteAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsGetSample.js deleted file mode 100644 index 5b1ae950a288..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsGetSample.js +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertMultipleResource.json - */ -async function getADynamicAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertSingleResource.json - */ -async function getADynamicAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getWebTestMetricAlert.json - */ -async function getAWebTestAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "rg-example"; - const ruleName = "webtest-name-example"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertMultipleResource.json - */ -async function getAnAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertSingleResource.json - */ -async function getAnAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertResourceGroup.json - */ -async function getAnAlertRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest1"; - const ruleName = "MetricAlertAtResourceGroupLevel"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertSubscription.json - */ -async function getAnAlertRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertAtSubscriptionLevel"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - getADynamicAlertRuleForMultipleResources(); - getADynamicAlertRuleForSingleResource(); - getAWebTestAlertRule(); - getAnAlertRuleForMultipleResources(); - getAnAlertRuleForSingleResource(); - getAnAlertRuleOnResourceGroupS(); - getAnAlertRuleOnSubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsListByResourceGroupSample.js deleted file mode 100644 index 7d1b371822fa..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieve alert rule definitions in a resource group. - * - * @summary Retrieve alert rule definitions in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json - */ -async function listMetricAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricAlerts.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsListBySubscriptionSample.js deleted file mode 100644 index 9cb90b057f36..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieve alert rule definitions in a subscription. - * - * @summary Retrieve alert rule definitions in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json - */ -async function listMetricAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricAlerts.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsStatusListByNameSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsStatusListByNameSample.js deleted file mode 100644 index 70a242920273..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsStatusListByNameSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieve an alert rule status. - * - * @summary Retrieve an alert rule status. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatusByName.json - */ -async function getAnAlertRuleStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "009f6022-67ec-423e-9aa7-691182870588"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "EastUs"; - const ruleName = "custom1"; - const statusName = - "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlertsStatus.listByName( - resourceGroupName, - ruleName, - statusName - ); - console.log(result); -} - -async function main() { - getAnAlertRuleStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsStatusListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsStatusListSample.js deleted file mode 100644 index 1536695c4c3a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsStatusListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieve an alert rule status. - * - * @summary Retrieve an alert rule status. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatus.json - */ -async function getAnAlertRuleStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlertsStatus.list(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - getAnAlertRuleStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsUpdateSample.js deleted file mode 100644 index 0dec52571b48..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricAlertsUpdateSample.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update an metric alert definition. - * - * @summary Update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/UpdateMetricAlert.json - */ -async function createOrUpdateAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" }, - }, - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "\\Processor(_Total)\\% Processor Time", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average", - }, - ], - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", - }, - enabled: true, - evaluationFrequency: "Pt1m", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme", - ], - severity: 3, - tags: {}, - windowSize: "Pt15m", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.update(resourceGroupName, ruleName, parameters); - console.log(result); -} - -async function main() { - createOrUpdateAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricDefinitionsListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricDefinitionsListSample.js deleted file mode 100644 index 6202da3422f9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricDefinitionsListSample.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsApplicationInsights.json - */ -async function getApplicationInsightsMetricDefinitionsWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions"; - const metricnamespace = "microsoft.insights/components"; - const options = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitions.json - */ -async function getMetricDefinitionsWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricDefinitions"; - const metricnamespace = "Microsoft.Web/sites"; - const options = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsMetricClass.json - */ -async function getStorageCacheMetricDefinitionsWithMetricClass() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache"; - const metricnamespace = "microsoft.storagecache/caches"; - const options = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getApplicationInsightsMetricDefinitionsWithoutFilter(); - getMetricDefinitionsWithoutFilter(); - getStorageCacheMetricDefinitionsWithMetricClass(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricNamespacesListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricNamespacesListSample.js deleted file mode 100644 index 6a26344dad5d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricNamespacesListSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the metric namespaces for the resource. - * - * @summary Lists the metric namespaces for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/examples/GetMetricNamespaces.json - */ -async function getMetricNamespacesWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill"; - const startTime = "2020-08-31T15:53:00Z"; - const options = { startTime }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricNamespaces.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getMetricNamespacesWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricsListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricsListSample.js deleted file mode 100644 index f77166d5a2be..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/metricsListSample.js +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetric.json - */ -async function getMetricForData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"; - const timespan = "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z"; - const interval = "PT1M"; - const aggregation = "Average,count"; - const top = 3; - const orderby = "Average asc"; - const filter = "BlobType eq '*'"; - const metricnamespace = "Microsoft.Storage/storageAccounts/blobServices"; - const options = { - timespan, - interval, - aggregation, - top, - orderby, - filter, - metricnamespace, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricMetadata.json - */ -async function getMetricForMetadata() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"; - const timespan = "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z"; - const interval = "PT1M"; - const aggregation = "Average,count"; - const top = 3; - const orderby = "Average asc"; - const filter = "BlobType eq '*'"; - const metricnamespace = "Microsoft.Storage/storageAccounts/blobServices"; - const options = { - timespan, - interval, - aggregation, - top, - orderby, - filter, - metricnamespace, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricError.json - */ -async function getMetricWithError() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo"; - const timespan = "2021-06-07T21:51:00Z/2021-06-08T01:51:00Z"; - const interval = "FULL"; - const metricnames = "MongoRequestsCount,MongoRequests"; - const aggregation = "average"; - const metricnamespace = "microsoft.documentdb/databaseaccounts"; - const options = { - timespan, - interval, - metricnames, - aggregation, - metricnamespace, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -async function main() { - getMetricForData(); - getMetricForMetadata(); - getMetricWithError(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/monitorOperationsListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/monitorOperationsListSample.js deleted file mode 100644 index 1630d667f7e0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/monitorOperationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists available Operations for this Resource Provider - * - * @summary Lists available Operations for this Resource Provider - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/OperationsGet.json - */ -async function getOperationsList() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitorOperations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getOperationsList(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/operationsListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/operationsListSample.js deleted file mode 100644 index eee0a7a560b5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all of the available operations from Microsoft.Insights provider. - * - * @summary Lists all of the available operations from Microsoft.Insights provider. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/OperationList.json - */ -async function getAListOfOperationsForAResourceProvider() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.operations.list(); - console.log(result); -} - -async function main() { - getAListOfOperationsForAResourceProvider(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/package.json b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/package.json deleted file mode 100644 index 9a21b8943f92..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-monitor-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/monitor/arm-monitor" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor", - "dependencies": { - "@azure/arm-monitor": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/predictiveMetricGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/predictiveMetricGetSample.js deleted file mode 100644 index fd19e832af2b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/predictiveMetricGetSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to get predictive autoscale metric future data - * - * @summary get predictive autoscale metric future data - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/GetPredictiveMetric.json - */ -async function getMetricForData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myRG"; - const autoscaleSettingName = "vmss1-Autoscale-775"; - const timespan = "2021-10-14T22:00:00.000Z/2021-10-16T22:00:00.000Z"; - const interval = "PT1H"; - const metricNamespace = "Microsoft.Compute/virtualMachineScaleSets"; - const metricName = "PercentageCPU"; - const aggregation = "Total"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.predictiveMetric.get( - resourceGroupName, - autoscaleSettingName, - timespan, - interval, - metricNamespace, - metricName, - aggregation - ); - console.log(result); -} - -async function main() { - getMetricForData(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js deleted file mode 100644 index 50525c8b9cbd..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. - * - * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionUpdate.json - */ -async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const parameters = { - privateLinkServiceConnectionState: { - description: "Approved by johndoe@contoso.com", - status: "Approved", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - scopeName, - privateEndpointConnectionName, - parameters - ); - console.log(result); -} - -async function main() { - approveOrRejectAPrivateEndpointConnectionWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsDeleteSample.js deleted file mode 100644 index 96b6b6b8026f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a private endpoint connection with a given name. - * - * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionDelete.json - */ -async function deletesAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - scopeName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - deletesAPrivateEndpointConnectionWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsGetSample.js deleted file mode 100644 index cd41b34b056b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a private endpoint connection. - * - * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.get( - resourceGroupName, - scopeName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js deleted file mode 100644 index 81eed1b5eb80..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateEndpointConnectionsListByPrivateLinkScopeSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all private endpoint connections on a private link scope. - * - * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionList.json - */ -async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.listByPrivateLinkScope( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkResourcesGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkResourcesGetSample.js deleted file mode 100644 index 9c0fdbebf4e9..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkResourcesGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * - * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const groupName = "azuremonitor"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkResources.get(resourceGroupName, scopeName, groupName); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js deleted file mode 100644 index 2de8b3040e9f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkResourcesListByPrivateLinkScopeSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * - * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopeOperationStatusGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopeOperationStatusGetSample.js deleted file mode 100644 index cfc40d1cdefa..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopeOperationStatusGetSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the status of an azure asynchronous operation associated with a private link scope operation. - * - * @summary Get the status of an azure asynchronous operation associated with a private link scope operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/privateLinkScopeOperationStatuses.json - */ -async function getSpecificOperationStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "613192d7-503f-477a-9cfe-4efc3ee2bd60"; - const asyncOperationId = "713192d7-503f-477a-9cfe-4efc3ee2bd11"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopeOperationStatus.get( - asyncOperationId, - resourceGroupName - ); - console.log(result); -} - -async function main() { - getSpecificOperationStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesCreateOrUpdateSample.js deleted file mode 100644 index a48efc0afbb8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. - * - * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceUpdate.json - */ -async function updateAScopedResourceInAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const parameters = { - linkedResourceId: - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/components/my-component", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.beginCreateOrUpdateAndWait( - resourceGroupName, - scopeName, - name, - parameters - ); - console.log(result); -} - -async function main() { - updateAScopedResourceInAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesDeleteSample.js deleted file mode 100644 index 49a7f819ecd1..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a private endpoint connection with a given name. - * - * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceDelete.json - */ -async function deletesAScopedResourceWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.beginDeleteAndWait( - resourceGroupName, - scopeName, - name - ); - console.log(result); -} - -async function main() { - deletesAScopedResourceWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesGetSample.js deleted file mode 100644 index 754cef34ed3f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a scoped resource in a private link scope. - * - * @summary Gets a scoped resource in a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceGet.json - */ -async function getsPrivateLinkScopedResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.get(resourceGroupName, scopeName, name); - console.log(result); -} - -async function main() { - getsPrivateLinkScopedResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesListByPrivateLinkScopeSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesListByPrivateLinkScopeSample.js deleted file mode 100644 index f02e493cd82a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopedResourcesListByPrivateLinkScopeSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all private endpoint connections on a private link scope. - * - * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceList.json - */ -async function getsListOfScopedResourcesInAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopedResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsListOfScopedResourcesInAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesCreateOrUpdateSample.js deleted file mode 100644 index a66775e178ea..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesCreateOrUpdateSample.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * - * @summary Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesCreate.json - */ -async function privateLinkScopeCreate() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload = { - accessModeSettings: { - exclusions: [], - ingestionAccessMode: "Open", - queryAccessMode: "Open", - }, - location: "Global", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * - * @summary Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesUpdate.json - */ -async function privateLinkScopeUpdate() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload = { - accessModeSettings: { - exclusions: [], - ingestionAccessMode: "Open", - queryAccessMode: "Open", - }, - location: "Global", - tags: { tag1: "Value1" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -async function main() { - privateLinkScopeCreate(); - privateLinkScopeUpdate(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesDeleteSample.js deleted file mode 100644 index fd34d4f16986..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a Azure Monitor PrivateLinkScope. - * - * @summary Deletes a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesDelete.json - */ -async function privateLinkScopesDelete() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.beginDeleteAndWait(resourceGroupName, scopeName); - console.log(result); -} - -async function main() { - privateLinkScopesDelete(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesGetSample.js deleted file mode 100644 index f2888eddd30e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Returns a Azure Monitor PrivateLinkScope. - * - * @summary Returns a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesGet.json - */ -async function privateLinkScopeGet() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.get(resourceGroupName, scopeName); - console.log(result); -} - -async function main() { - privateLinkScopeGet(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesListByResourceGroupSample.js deleted file mode 100644 index 1ff733bc43a2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * - * @summary Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesListByResourceGroup.json - */ -async function privateLinkScopeListByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopes.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateLinkScopeListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesListSample.js deleted file mode 100644 index fe975a34a483..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * - * @summary Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesList.json - */ -async function privateLinkScopesListJson() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopes.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateLinkScopesListJson(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesUpdateTagsSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesUpdateTagsSample.js deleted file mode 100644 index 6b5b91c39912..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/privateLinkScopesUpdateTagsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesUpdateTagsOnly.json - */ -async function privateLinkScopeUpdateTagsOnly() { - const subscriptionId = process.env["MONITOR_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const privateLinkScopeTags = { - tags: { tag1: "Value1", tag2: "Value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.updateTags( - resourceGroupName, - scopeName, - privateLinkScopeTags - ); - console.log(result); -} - -async function main() { - privateLinkScopeUpdateTagsOnly(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/sample.env b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesCreateOrUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesCreateOrUpdateSample.js deleted file mode 100644 index adc6a4af761c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesCreateOrUpdateSample.js +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRule.json - */ -async function createOrUpdateAScheduledQueryRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const parameters = { - description: "Performance rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup", - ], - customProperties: { key11: "value11", key12: "value12" }, - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [ - { - name: "ComputerIp", - operator: "Exclude", - values: ["192.168.1.1"], - }, - { name: "OSType", operator: "Include", values: ["*"] }, - ], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1, - }, - metricMeasureColumn: "% Processor Time", - operator: "GreaterThan", - query: 'Perf | where ObjectName == "Processor"', - resourceIdColumn: "resourceId", - threshold: 70, - timeAggregation: "Average", - }, - ], - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: [ - "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1", - ], - severity: 4, - skipQueryValidation: true, - windowSize: "PT10M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRuleResourceGroup.json - */ -async function createOrUpdateAScheduledQueryRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const parameters = { - description: "Health check rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup", - ], - customProperties: { key11: "value11", key12: "value12" }, - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1, - }, - operator: "GreaterThan", - query: "Heartbeat", - threshold: 360, - timeAggregation: "Count", - }, - ], - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: [ - "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1", - ], - severity: 4, - skipQueryValidation: true, - targetResourceTypes: ["Microsoft.Compute/virtualMachines"], - windowSize: "PT10M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRuleSubscription.json - */ -async function createOrUpdateAScheduledQueryRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const parameters = { - description: "Performance rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup", - ], - customProperties: { key11: "value11", key12: "value12" }, - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [ - { - name: "ComputerIp", - operator: "Exclude", - values: ["192.168.1.1"], - }, - { name: "OSType", operator: "Include", values: ["*"] }, - ], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1, - }, - metricMeasureColumn: "% Processor Time", - operator: "GreaterThan", - query: 'Perf | where ObjectName == "Processor"', - resourceIdColumn: "resourceId", - threshold: 70, - timeAggregation: "Average", - }, - ], - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147"], - severity: 4, - skipQueryValidation: true, - targetResourceTypes: ["Microsoft.Compute/virtualMachines"], - windowSize: "PT10M", - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAScheduledQueryRuleForSingleResource(); - createOrUpdateAScheduledQueryRuleOnResourceGroupS(); - createOrUpdateAScheduledQueryRuleOnSubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesDeleteSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesDeleteSample.js deleted file mode 100644 index e40c3716fd63..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a scheduled query rule. - * - * @summary Deletes a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/deleteScheduledQueryRule.json - */ -async function deleteAScheduledQueryRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.delete(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - deleteAScheduledQueryRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesGetSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesGetSample.js deleted file mode 100644 index 7f8c4c3817a5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieve an scheduled query rule definition. - * - * @summary Retrieve an scheduled query rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/getScheduledQueryRule.json - */ -async function getAScheduledQueryRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.get(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - getAScheduledQueryRuleForSingleResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesListByResourceGroupSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesListByResourceGroupSample.js deleted file mode 100644 index 90cc8d022ca2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieve scheduled query rule definitions in a resource group. - * - * @summary Retrieve scheduled query rule definitions in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesByResourceGroup.json - */ -async function listScheduledQueryRulesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scheduledQueryRules.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listScheduledQueryRulesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesListBySubscriptionSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesListBySubscriptionSample.js deleted file mode 100644 index 0a1cac0be413..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieve a scheduled query rule definitions in a subscription. - * - * @summary Retrieve a scheduled query rule definitions in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesBySubscription.json - */ -async function listScheduledQueryRulesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scheduledQueryRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listScheduledQueryRulesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesUpdateSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesUpdateSample.js deleted file mode 100644 index 9e139d583a65..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/scheduledQueryRulesUpdateSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Update a scheduled query rule. - * - * @summary Update a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/patchScheduledQueryRule.json - */ -async function createOrUpdateAScheduledQueryRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const parameters = { enabled: false }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.update(resourceGroupName, ruleName, parameters); - console.log(result); -} - -async function main() { - createOrUpdateAScheduledQueryRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/tenantActivityLogsListSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/tenantActivityLogsListSample.js deleted file mode 100644 index 24a6a7862256..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/tenantActivityLogsListSample.js +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsFiltered.json - */ -async function getTenantActivityLogsWithFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const options = { filter }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsFilteredAndSelected.json - */ -async function getTenantActivityLogsWithFilterAndSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options = { filter, select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsSelected.json - */ -async function getTenantActivityLogsWithSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options = { select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsNoParams.json - */ -async function getTenantActivityLogsWithoutFilterOrSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTenantActivityLogsWithFilter(); - getTenantActivityLogsWithFilterAndSelect(); - getTenantActivityLogsWithSelect(); - getTenantActivityLogsWithoutFilterOrSelect(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/vmInsightsGetOnboardingStatusSample.js b/sdk/monitor/arm-monitor/samples/v8-beta/javascript/vmInsightsGetOnboardingStatusSample.js deleted file mode 100644 index 21e123e29d8b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/javascript/vmInsightsGetOnboardingStatusSample.js +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { MonitorClient } = require("@azure/arm-monitor"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusVMScaleSet.json - */ -async function getStatusForAVMScaleSetThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/my-service-cluster/providers/Microsoft.Compute/virtualMachineScaleSets/scale-set-01"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVMUnknown.json - */ -async function getStatusForAVMThatHasNotYetReportedData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVM.json - */ -async function getStatusForAVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusResourceGroup.json - */ -async function getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/resource-group-with-vms"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSubscription.json - */ -async function getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceUri = "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -async function main() { - getStatusForAVMScaleSetThatIsActivelyReportingData(); - getStatusForAVMThatHasNotYetReportedData(); - getStatusForAVMThatIsActivelyReportingData(); - getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData(); - getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/README.md b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/README.md deleted file mode 100644 index cd1b8f3e333a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/README.md +++ /dev/null @@ -1,281 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.ts][actiongroupscreatenotificationsatactiongroupresourcelevelsample] | Send test notifications to a set of provided receivers x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtActionGroupResourceLevel.json | -| [actionGroupsCreateNotificationsAtResourceGroupLevelSample.ts][actiongroupscreatenotificationsatresourcegrouplevelsample] | Send test notifications to a set of provided receivers x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtResourceGroupLevel.json | -| [actionGroupsCreateOrUpdateSample.ts][actiongroupscreateorupdatesample] | Create a new action group or update an existing one. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/createOrUpdateActionGroup.json | -| [actionGroupsDeleteSample.ts][actiongroupsdeletesample] | Delete an action group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/deleteActionGroup.json | -| [actionGroupsEnableReceiverSample.ts][actiongroupsenablereceiversample] | Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/enableReceiver.json | -| [actionGroupsGetSample.ts][actiongroupsgetsample] | Get an action group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getActionGroup.json | -| [actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.ts][actiongroupsgettestnotificationsatactiongroupresourcelevelsample] | Get the test notifications by the notification id x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtActionGroupResourceLevel.json | -| [actionGroupsGetTestNotificationsAtResourceGroupLevelSample.ts][actiongroupsgettestnotificationsatresourcegrouplevelsample] | Get the test notifications by the notification id x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtResourceGroupLevel.json | -| [actionGroupsGetTestNotificationsSample.ts][actiongroupsgettestnotificationssample] | Get the test notifications by the notification id x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotifications.json | -| [actionGroupsListByResourceGroupSample.ts][actiongroupslistbyresourcegroupsample] | Get a list of all action groups in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json | -| [actionGroupsListBySubscriptionIdSample.ts][actiongroupslistbysubscriptionidsample] | Get a list of all action groups in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json | -| [actionGroupsPostTestNotificationsSample.ts][actiongroupsposttestnotificationssample] | Send test notifications to a set of provided receivers x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotifications.json | -| [actionGroupsUpdateSample.ts][actiongroupsupdatesample] | Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/patchActionGroup.json | -| [activityLogAlertsCreateOrUpdateSample.ts][activitylogalertscreateorupdatesample] | Create a new Activity Log Alert rule or update an existing one. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdate.json | -| [activityLogAlertsDeleteSample.ts][activitylogalertsdeletesample] | Delete an Activity Log Alert rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Delete.json | -| [activityLogAlertsGetSample.ts][activitylogalertsgetsample] | Get an Activity Log Alert rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Get.json | -| [activityLogAlertsListByResourceGroupSample.ts][activitylogalertslistbyresourcegroupsample] | Get a list of all Activity Log Alert rules in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListByResourceGroupName.json | -| [activityLogAlertsListBySubscriptionIdSample.ts][activitylogalertslistbysubscriptionidsample] | Get a list of all Activity Log Alert rules in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListBySubscriptionId.json | -| [activityLogAlertsUpdateSample.ts][activitylogalertsupdatesample] | Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Update.json | -| [activityLogsListSample.ts][activitylogslistsample] | Provides the list of records from the activity logs. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsFiltered.json | -| [alertRuleIncidentsGetSample.ts][alertruleincidentsgetsample] | Gets an incident associated to an alert rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRuleIncident.json | -| [alertRuleIncidentsListByAlertRuleSample.ts][alertruleincidentslistbyalertrulesample] | Gets a list of incidents associated to an alert rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleIncidents.json | -| [alertRulesCreateOrUpdateSample.ts][alertrulescreateorupdatesample] | Creates or updates a classic metric alert rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateAlertRule.json | -| [alertRulesDeleteSample.ts][alertrulesdeletesample] | Deletes a classic metric alert rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteAlertRule.json | -| [alertRulesGetSample.ts][alertrulesgetsample] | Gets a classic metric alert rule x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRule.json | -| [alertRulesListByResourceGroupSample.ts][alertruleslistbyresourcegroupsample] | List the classic metric alert rules within a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRule.json | -| [alertRulesListBySubscriptionSample.ts][alertruleslistbysubscriptionsample] | List the classic metric alert rules within a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleBySubscription.json | -| [alertRulesUpdateSample.ts][alertrulesupdatesample] | Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchAlertRule.json | -| [autoscaleSettingsCreateOrUpdateSample.ts][autoscalesettingscreateorupdatesample] | Creates or updates an autoscale setting. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/createOrUpdateAutoscaleSetting.json | -| [autoscaleSettingsDeleteSample.ts][autoscalesettingsdeletesample] | Deletes and autoscale setting x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json | -| [autoscaleSettingsGetSample.ts][autoscalesettingsgetsample] | Gets an autoscale setting x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/getAutoscaleSetting.json | -| [autoscaleSettingsListByResourceGroupSample.ts][autoscalesettingslistbyresourcegroupsample] | Lists the autoscale settings for a resource group x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSetting.json | -| [autoscaleSettingsListBySubscriptionSample.ts][autoscalesettingslistbysubscriptionsample] | Lists the autoscale settings for a subscription x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSettingBySubscription.json | -| [autoscaleSettingsUpdateSample.ts][autoscalesettingsupdatesample] | Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/patchAutoscaleSetting.json | -| [azureMonitorWorkspacesCreateSample.ts][azuremonitorworkspacescreatesample] | Create or update a workspace x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesCreate.json | -| [azureMonitorWorkspacesDeleteSample.ts][azuremonitorworkspacesdeletesample] | Delete a workspace x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesDelete.json | -| [azureMonitorWorkspacesGetSample.ts][azuremonitorworkspacesgetsample] | Returns the specific Azure Monitor workspace x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesGet.json | -| [azureMonitorWorkspacesListByResourceGroupSample.ts][azuremonitorworkspaceslistbyresourcegroupsample] | Lists all workspaces in the specified resource group x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListByResourceGroup.json | -| [azureMonitorWorkspacesListBySubscriptionSample.ts][azuremonitorworkspaceslistbysubscriptionsample] | Lists all workspaces in the specified subscription x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListBySubscription.json | -| [azureMonitorWorkspacesUpdateSample.ts][azuremonitorworkspacesupdatesample] | Updates part of a workspace x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesUpdate.json | -| [baselinesListSample.ts][baselineslistsample] | **Lists the metric baseline values for a resource**. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/metricBaselines.json | -| [dataCollectionEndpointsCreateSample.ts][datacollectionendpointscreatesample] | Creates or updates a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsCreate.json | -| [dataCollectionEndpointsDeleteSample.ts][datacollectionendpointsdeletesample] | Deletes a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsDelete.json | -| [dataCollectionEndpointsGetSample.ts][datacollectionendpointsgetsample] | Returns the specified data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsGet.json | -| [dataCollectionEndpointsListByResourceGroupSample.ts][datacollectionendpointslistbyresourcegroupsample] | Lists all data collection endpoints in the specified resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListByResourceGroup.json | -| [dataCollectionEndpointsListBySubscriptionSample.ts][datacollectionendpointslistbysubscriptionsample] | Lists all data collection endpoints in the specified subscription x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListBySubscription.json | -| [dataCollectionEndpointsUpdateSample.ts][datacollectionendpointsupdatesample] | Updates part of a data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsUpdate.json | -| [dataCollectionRuleAssociationsCreateSample.ts][datacollectionruleassociationscreatesample] | Creates or updates an association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsCreate.json | -| [dataCollectionRuleAssociationsDeleteSample.ts][datacollectionruleassociationsdeletesample] | Deletes an association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsDelete.json | -| [dataCollectionRuleAssociationsGetSample.ts][datacollectionruleassociationsgetsample] | Returns the specified association. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsGet.json | -| [dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts][datacollectionruleassociationslistbydatacollectionendpointsample] | Lists associations for the specified data collection endpoint. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByDataCollectionEndpoint.json | -| [dataCollectionRuleAssociationsListByResourceSample.ts][datacollectionruleassociationslistbyresourcesample] | Lists associations for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByResource.json | -| [dataCollectionRuleAssociationsListByRuleSample.ts][datacollectionruleassociationslistbyrulesample] | Lists associations for the specified data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByRule.json | -| [dataCollectionRulesCreateSample.ts][datacollectionrulescreatesample] | Creates or updates a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesCreate.json | -| [dataCollectionRulesDeleteSample.ts][datacollectionrulesdeletesample] | Deletes a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesDelete.json | -| [dataCollectionRulesGetSample.ts][datacollectionrulesgetsample] | Returns the specified data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesGet.json | -| [dataCollectionRulesListByResourceGroupSample.ts][datacollectionruleslistbyresourcegroupsample] | Lists all data collection rules in the specified resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListByResourceGroup.json | -| [dataCollectionRulesListBySubscriptionSample.ts][datacollectionruleslistbysubscriptionsample] | Lists all data collection rules in the specified subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListBySubscription.json | -| [dataCollectionRulesUpdateSample.ts][datacollectionrulesupdatesample] | Updates part of a data collection rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesUpdate.json | -| [diagnosticSettingsCategoryGetSample.ts][diagnosticsettingscategorygetsample] | Gets the diagnostic settings category for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json | -| [diagnosticSettingsCategoryListSample.ts][diagnosticsettingscategorylistsample] | Lists the diagnostic settings categories for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json | -| [diagnosticSettingsCreateOrUpdateSample.ts][diagnosticsettingscreateorupdatesample] | Creates or updates diagnostic settings for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json | -| [diagnosticSettingsDeleteSample.ts][diagnosticsettingsdeletesample] | Deletes existing diagnostic settings for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json | -| [diagnosticSettingsGetSample.ts][diagnosticsettingsgetsample] | Gets the active diagnostic settings for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json | -| [diagnosticSettingsListSample.ts][diagnosticsettingslistsample] | Gets the active diagnostic settings list for the specified resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json | -| [eventCategoriesListSample.ts][eventcategorieslistsample] | Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetEventCategories.json | -| [logProfilesCreateOrUpdateSample.ts][logprofilescreateorupdatesample] | Create or update a log profile in Azure Monitoring REST API. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateLogProfile.json | -| [logProfilesDeleteSample.ts][logprofilesdeletesample] | Deletes the log profile. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteLogProfile.json | -| [logProfilesGetSample.ts][logprofilesgetsample] | Gets the log profile. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getLogProfile.json | -| [logProfilesListSample.ts][logprofileslistsample] | List the log profiles. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listLogProfile.json | -| [logProfilesUpdateSample.ts][logprofilesupdatesample] | Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchLogProfile.json | -| [metricAlertsCreateOrUpdateSample.ts][metricalertscreateorupdatesample] | Create or update an metric alert definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json | -| [metricAlertsDeleteSample.ts][metricalertsdeletesample] | Delete an alert rule definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/deleteMetricAlert.json | -| [metricAlertsGetSample.ts][metricalertsgetsample] | Retrieve an alert rule definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertMultipleResource.json | -| [metricAlertsListByResourceGroupSample.ts][metricalertslistbyresourcegroupsample] | Retrieve alert rule definitions in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json | -| [metricAlertsListBySubscriptionSample.ts][metricalertslistbysubscriptionsample] | Retrieve alert rule definitions in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json | -| [metricAlertsStatusListByNameSample.ts][metricalertsstatuslistbynamesample] | Retrieve an alert rule status. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatusByName.json | -| [metricAlertsStatusListSample.ts][metricalertsstatuslistsample] | Retrieve an alert rule status. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatus.json | -| [metricAlertsUpdateSample.ts][metricalertsupdatesample] | Update an metric alert definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/UpdateMetricAlert.json | -| [metricDefinitionsListSample.ts][metricdefinitionslistsample] | Lists the metric definitions for the resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsApplicationInsights.json | -| [metricNamespacesListSample.ts][metricnamespaceslistsample] | Lists the metric namespaces for the resource. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/examples/GetMetricNamespaces.json | -| [metricsListSample.ts][metricslistsample] | **Lists the metric values for a resource**. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetric.json | -| [monitorOperationsListSample.ts][monitoroperationslistsample] | Lists available Operations for this Resource Provider x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/OperationsGet.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available operations from Microsoft.Insights provider. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/OperationList.json | -| [predictiveMetricGetSample.ts][predictivemetricgetsample] | get predictive autoscale metric future data x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/GetPredictiveMetric.json | -| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionUpdate.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionDelete.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets a private endpoint connection. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionGet.json | -| [privateEndpointConnectionsListByPrivateLinkScopeSample.ts][privateendpointconnectionslistbyprivatelinkscopesample] | Gets all private endpoint connections on a private link scope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionList.json | -| [privateLinkResourcesGetSample.ts][privatelinkresourcesgetsample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json | -| [privateLinkResourcesListByPrivateLinkScopeSample.ts][privatelinkresourceslistbyprivatelinkscopesample] | Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json | -| [privateLinkScopeOperationStatusGetSample.ts][privatelinkscopeoperationstatusgetsample] | Get the status of an azure asynchronous operation associated with a private link scope operation. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/privateLinkScopeOperationStatuses.json | -| [privateLinkScopedResourcesCreateOrUpdateSample.ts][privatelinkscopedresourcescreateorupdatesample] | Approve or reject a private endpoint connection with a given name. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceUpdate.json | -| [privateLinkScopedResourcesDeleteSample.ts][privatelinkscopedresourcesdeletesample] | Deletes a private endpoint connection with a given name. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceDelete.json | -| [privateLinkScopedResourcesGetSample.ts][privatelinkscopedresourcesgetsample] | Gets a scoped resource in a private link scope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceGet.json | -| [privateLinkScopedResourcesListByPrivateLinkScopeSample.ts][privatelinkscopedresourceslistbyprivatelinkscopesample] | Gets all private endpoint connections on a private link scope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceList.json | -| [privateLinkScopesCreateOrUpdateSample.ts][privatelinkscopescreateorupdatesample] | Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesCreate.json | -| [privateLinkScopesDeleteSample.ts][privatelinkscopesdeletesample] | Deletes a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesDelete.json | -| [privateLinkScopesGetSample.ts][privatelinkscopesgetsample] | Returns a Azure Monitor PrivateLinkScope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesGet.json | -| [privateLinkScopesListByResourceGroupSample.ts][privatelinkscopeslistbyresourcegroupsample] | Gets a list of Azure Monitor PrivateLinkScopes within a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesListByResourceGroup.json | -| [privateLinkScopesListSample.ts][privatelinkscopeslistsample] | Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesList.json | -| [privateLinkScopesUpdateTagsSample.ts][privatelinkscopesupdatetagssample] | Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesUpdateTagsOnly.json | -| [scheduledQueryRulesCreateOrUpdateSample.ts][scheduledqueryrulescreateorupdatesample] | Creates or updates a scheduled query rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRule.json | -| [scheduledQueryRulesDeleteSample.ts][scheduledqueryrulesdeletesample] | Deletes a scheduled query rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/deleteScheduledQueryRule.json | -| [scheduledQueryRulesGetSample.ts][scheduledqueryrulesgetsample] | Retrieve an scheduled query rule definition. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/getScheduledQueryRule.json | -| [scheduledQueryRulesListByResourceGroupSample.ts][scheduledqueryruleslistbyresourcegroupsample] | Retrieve scheduled query rule definitions in a resource group. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesByResourceGroup.json | -| [scheduledQueryRulesListBySubscriptionSample.ts][scheduledqueryruleslistbysubscriptionsample] | Retrieve a scheduled query rule definitions in a subscription. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesBySubscription.json | -| [scheduledQueryRulesUpdateSample.ts][scheduledqueryrulesupdatesample] | Update a scheduled query rule. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/patchScheduledQueryRule.json | -| [tenantActivityLogsListSample.ts][tenantactivitylogslistsample] | Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does _not_ retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsFiltered.json | -| [vmInsightsGetOnboardingStatusSample.ts][vminsightsgetonboardingstatussample] | Retrieves the VM Insights onboarding status for the specified resource or resource scope. x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusVMScaleSet.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env MONITOR_SUBSCRIPTION_ID="" MONITOR_RESOURCE_GROUP="" node dist/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[actiongroupscreatenotificationsatactiongroupresourcelevelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.ts -[actiongroupscreatenotificationsatresourcegrouplevelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateNotificationsAtResourceGroupLevelSample.ts -[actiongroupscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateOrUpdateSample.ts -[actiongroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsDeleteSample.ts -[actiongroupsenablereceiversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsEnableReceiverSample.ts -[actiongroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetSample.ts -[actiongroupsgettestnotificationsatactiongroupresourcelevelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.ts -[actiongroupsgettestnotificationsatresourcegrouplevelsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.ts -[actiongroupsgettestnotificationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsSample.ts -[actiongroupslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsListByResourceGroupSample.ts -[actiongroupslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsListBySubscriptionIdSample.ts -[actiongroupsposttestnotificationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsPostTestNotificationsSample.ts -[actiongroupsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsUpdateSample.ts -[activitylogalertscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsCreateOrUpdateSample.ts -[activitylogalertsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsDeleteSample.ts -[activitylogalertsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsGetSample.ts -[activitylogalertslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsListByResourceGroupSample.ts -[activitylogalertslistbysubscriptionidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsListBySubscriptionIdSample.ts -[activitylogalertsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsUpdateSample.ts -[activitylogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogsListSample.ts -[alertruleincidentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRuleIncidentsGetSample.ts -[alertruleincidentslistbyalertrulesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRuleIncidentsListByAlertRuleSample.ts -[alertrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesCreateOrUpdateSample.ts -[alertrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesDeleteSample.ts -[alertrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesGetSample.ts -[alertruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesListByResourceGroupSample.ts -[alertruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesListBySubscriptionSample.ts -[alertrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesUpdateSample.ts -[autoscalesettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsCreateOrUpdateSample.ts -[autoscalesettingsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsDeleteSample.ts -[autoscalesettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsGetSample.ts -[autoscalesettingslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsListByResourceGroupSample.ts -[autoscalesettingslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsListBySubscriptionSample.ts -[autoscalesettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsUpdateSample.ts -[azuremonitorworkspacescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesCreateSample.ts -[azuremonitorworkspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesDeleteSample.ts -[azuremonitorworkspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesGetSample.ts -[azuremonitorworkspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesListByResourceGroupSample.ts -[azuremonitorworkspaceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesListBySubscriptionSample.ts -[azuremonitorworkspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesUpdateSample.ts -[baselineslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/baselinesListSample.ts -[datacollectionendpointscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsCreateSample.ts -[datacollectionendpointsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsDeleteSample.ts -[datacollectionendpointsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsGetSample.ts -[datacollectionendpointslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsListByResourceGroupSample.ts -[datacollectionendpointslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsListBySubscriptionSample.ts -[datacollectionendpointsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsUpdateSample.ts -[datacollectionruleassociationscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsCreateSample.ts -[datacollectionruleassociationsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsDeleteSample.ts -[datacollectionruleassociationsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsGetSample.ts -[datacollectionruleassociationslistbydatacollectionendpointsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts -[datacollectionruleassociationslistbyresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByResourceSample.ts -[datacollectionruleassociationslistbyrulesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByRuleSample.ts -[datacollectionrulescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesCreateSample.ts -[datacollectionrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesDeleteSample.ts -[datacollectionrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesGetSample.ts -[datacollectionruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesListByResourceGroupSample.ts -[datacollectionruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesListBySubscriptionSample.ts -[datacollectionrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesUpdateSample.ts -[diagnosticsettingscategorygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCategoryGetSample.ts -[diagnosticsettingscategorylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCategoryListSample.ts -[diagnosticsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCreateOrUpdateSample.ts -[diagnosticsettingsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsDeleteSample.ts -[diagnosticsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsGetSample.ts -[diagnosticsettingslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsListSample.ts -[eventcategorieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/eventCategoriesListSample.ts -[logprofilescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesCreateOrUpdateSample.ts -[logprofilesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesDeleteSample.ts -[logprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesGetSample.ts -[logprofileslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesListSample.ts -[logprofilesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesUpdateSample.ts -[metricalertscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsCreateOrUpdateSample.ts -[metricalertsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsDeleteSample.ts -[metricalertsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsGetSample.ts -[metricalertslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsListByResourceGroupSample.ts -[metricalertslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsListBySubscriptionSample.ts -[metricalertsstatuslistbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsStatusListByNameSample.ts -[metricalertsstatuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsStatusListSample.ts -[metricalertsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsUpdateSample.ts -[metricdefinitionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricDefinitionsListSample.ts -[metricnamespaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricNamespacesListSample.ts -[metricslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricsListSample.ts -[monitoroperationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/monitorOperationsListSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/operationsListSample.ts -[predictivemetricgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/predictiveMetricGetSample.ts -[privateendpointconnectionscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts -[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts -[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsGetSample.ts -[privateendpointconnectionslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts -[privatelinkresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkResourcesGetSample.ts -[privatelinkresourceslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts -[privatelinkscopeoperationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopeOperationStatusGetSample.ts -[privatelinkscopedresourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesCreateOrUpdateSample.ts -[privatelinkscopedresourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesDeleteSample.ts -[privatelinkscopedresourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesGetSample.ts -[privatelinkscopedresourceslistbyprivatelinkscopesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts -[privatelinkscopescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesCreateOrUpdateSample.ts -[privatelinkscopesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesDeleteSample.ts -[privatelinkscopesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesGetSample.ts -[privatelinkscopeslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesListByResourceGroupSample.ts -[privatelinkscopeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesListSample.ts -[privatelinkscopesupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesUpdateTagsSample.ts -[scheduledqueryrulescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesCreateOrUpdateSample.ts -[scheduledqueryrulesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesDeleteSample.ts -[scheduledqueryrulesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesGetSample.ts -[scheduledqueryruleslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesListByResourceGroupSample.ts -[scheduledqueryruleslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesListBySubscriptionSample.ts -[scheduledqueryrulesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesUpdateSample.ts -[tenantactivitylogslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/tenantActivityLogsListSample.ts -[vminsightsgetonboardingstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/vmInsightsGetOnboardingStatusSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-monitor?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/package.json b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/package.json deleted file mode 100644 index 140b803c02c6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-monitor-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/monitor/arm-monitor" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor", - "dependencies": { - "@azure/arm-monitor": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~4.8.0", - "rimraf": "latest" - } -} diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/sample.env b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.ts deleted file mode 100644 index f675456f49f4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NotificationRequestBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtActionGroupResourceLevel.json - */ -async function createNotificationsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestRgName"; - const actionGroupName = "TestAgName"; - const notificationRequest: NotificationRequestBody = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false - } - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084" - } - ], - azureAppPushReceivers: [ - { name: "Sample azureAppPush", emailAddress: "johndoe@email.com" } - ], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true - } - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true - } - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84" - } - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: - "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c" - } - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false - } - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890" - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321" - } - ], - voiceReceivers: [ - { name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" } - ], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true - }, - { - name: "Sample webhook 2", - identifierUri: - "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.beginCreateNotificationsAtActionGroupResourceLevelAndWait( - resourceGroupName, - actionGroupName, - notificationRequest - ); - console.log(result); -} - -async function main() { - createNotificationsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateNotificationsAtResourceGroupLevelSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateNotificationsAtResourceGroupLevelSample.ts deleted file mode 100644 index ef9f52b11f34..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateNotificationsAtResourceGroupLevelSample.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NotificationRequestBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotificationsAtResourceGroupLevel.json - */ -async function createNotificationsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-TestNotifications"; - const notificationRequest: NotificationRequestBody = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false - } - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084" - } - ], - azureAppPushReceivers: [ - { name: "Sample azureAppPush", emailAddress: "johndoe@email.com" } - ], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true - } - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true - } - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84" - } - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: - "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c" - } - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false - } - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890" - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321" - } - ], - voiceReceivers: [ - { name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" } - ], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true - }, - { - name: "Sample webhook 2", - identifierUri: - "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.beginCreateNotificationsAtResourceGroupLevelAndWait( - resourceGroupName, - notificationRequest - ); - console.log(result); -} - -async function main() { - createNotificationsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateOrUpdateSample.ts deleted file mode 100644 index 0d8f5181c84d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsCreateOrUpdateSample.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ActionGroupResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new action group or update an existing one. - * - * @summary Create a new action group or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/createOrUpdateActionGroup.json - */ -async function createOrUpdateAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const actionGroup: ActionGroupResource = { - armRoleReceivers: [ - { - name: "Sample armRole", - roleId: "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", - useCommonAlertSchema: true - } - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084" - } - ], - azureAppPushReceivers: [ - { name: "Sample azureAppPush", emailAddress: "johndoe@email.com" } - ], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true - } - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true - } - ], - enabled: true, - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84" - } - ], - groupShortName: "sample", - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: - "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c" - } - ], - location: "Global", - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false - } - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890" - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321" - } - ], - tags: {}, - voiceReceivers: [ - { name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" } - ], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true - }, - { - name: "Sample webhook 2", - identifierUri: - "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.createOrUpdate( - resourceGroupName, - actionGroupName, - actionGroup - ); - console.log(result); -} - -async function main() { - createOrUpdateAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsDeleteSample.ts deleted file mode 100644 index 7b955a5715d2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an action group. - * - * @summary Delete an action group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/deleteActionGroup.json - */ -async function deleteAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.delete( - resourceGroupName, - actionGroupName - ); - console.log(result); -} - -async function main() { - deleteAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsEnableReceiverSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsEnableReceiverSample.ts deleted file mode 100644 index cff901ba8be7..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsEnableReceiverSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { EnableRequest, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. - * - * @summary Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/enableReceiver.json - */ -async function enableTheReceiver() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const enableRequest: EnableRequest = { receiverName: "John Doe's mobile" }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.enableReceiver( - resourceGroupName, - actionGroupName, - enableRequest - ); - console.log(result); -} - -async function main() { - enableTheReceiver(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetSample.ts deleted file mode 100644 index 39fe3b9fca0a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get an action group. - * - * @summary Get an action group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getActionGroup.json - */ -async function getAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.get( - resourceGroupName, - actionGroupName - ); - console.log(result); -} - -async function main() { - getAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.ts deleted file mode 100644 index cf60c919b027..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtActionGroupResourceLevel.json - */ -async function getNotificationDetailsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "11111111-1111-1111-1111-111111111111"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestRgName"; - const actionGroupName = "TestAgName"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotificationsAtActionGroupResourceLevel( - resourceGroupName, - actionGroupName, - notificationId - ); - console.log(result); -} - -async function main() { - getNotificationDetailsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.ts deleted file mode 100644 index 2d98821e1de7..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotificationsAtResourceGroupLevel.json - */ -async function getNotificationDetailsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-TestNotifications"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotificationsAtResourceGroupLevel( - resourceGroupName, - notificationId - ); - console.log(result); -} - -async function main() { - getNotificationDetailsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsSample.ts deleted file mode 100644 index 25cd9a72018c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsGetTestNotificationsSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the test notifications by the notification id - * - * @summary Get the test notifications by the notification id - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/getTestNotifications.json - */ -async function getNotificationDetailsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const notificationId = "11000222191287"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.getTestNotifications(notificationId); - console.log(result); -} - -async function main() { - getNotificationDetailsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsListByResourceGroupSample.ts deleted file mode 100644 index 505dc900d581..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all action groups in a resource group. - * - * @summary Get a list of all action groups in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json - */ -async function listActionGroupsAtResourceGroupLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.actionGroups.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActionGroupsAtResourceGroupLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsListBySubscriptionIdSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsListBySubscriptionIdSample.ts deleted file mode 100644 index 1b40a18b9ef0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsListBySubscriptionIdSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all action groups in a subscription. - * - * @summary Get a list of all action groups in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/listActionGroups.json - */ -async function listActionGroupsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.actionGroups.listBySubscriptionId()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActionGroupsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsPostTestNotificationsSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsPostTestNotificationsSample.ts deleted file mode 100644 index 153ade7de654..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsPostTestNotificationsSample.ts +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { NotificationRequestBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Send test notifications to a set of provided receivers - * - * @summary Send test notifications to a set of provided receivers - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/postTestNotifications.json - */ -async function createNotificationsAtSubscriptionLevel() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const notificationRequest: NotificationRequestBody = { - alertType: "budget", - armRoleReceivers: [ - { - name: "ArmRole-Common", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: true - }, - { - name: "ArmRole-nonCommon", - roleId: "11111111-1111-1111-1111-111111111111", - useCommonAlertSchema: false - } - ], - automationRunbookReceivers: [ - { - name: "testRunbook", - automationAccountId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", - isGlobalRunbook: false, - runbookName: "Sample runbook", - serviceUri: "http://test.me", - useCommonAlertSchema: true, - webhookResourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084" - } - ], - azureAppPushReceivers: [ - { name: "Sample azureAppPush", emailAddress: "johndoe@email.com" } - ], - azureFunctionReceivers: [ - { - name: "Sample azureFunction", - functionAppResourceId: - "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", - functionName: "HttpTriggerCSharp1", - httpTriggerUrl: "http://test.me", - useCommonAlertSchema: true - } - ], - emailReceivers: [ - { - name: "John Doe's email", - emailAddress: "johndoe@email.com", - useCommonAlertSchema: false - }, - { - name: "Jane Smith's email", - emailAddress: "janesmith@email.com", - useCommonAlertSchema: true - } - ], - eventHubReceivers: [ - { - name: "Sample eventHub", - eventHubName: "testEventHub", - eventHubNameSpace: "testEventHubNameSpace", - subscriptionId: "187f412d-1758-44d9-b052-169e2564721d", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84" - } - ], - itsmReceivers: [ - { - name: "Sample itsm", - connectionId: "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", - region: "westcentralus", - ticketConfiguration: - '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', - workspaceId: - "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c" - } - ], - logicAppReceivers: [ - { - name: "Sample logicApp", - callbackUrl: - "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", - resourceId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", - useCommonAlertSchema: false - } - ], - smsReceivers: [ - { - name: "John Doe's mobile", - countryCode: "1", - phoneNumber: "1234567890" - }, - { - name: "Jane Smith's mobile", - countryCode: "1", - phoneNumber: "0987654321" - } - ], - voiceReceivers: [ - { name: "Sample voice", countryCode: "1", phoneNumber: "1234567890" } - ], - webhookReceivers: [ - { - name: "Sample webhook 1", - serviceUri: "http://www.example.com/webhook1", - useCommonAlertSchema: true - }, - { - name: "Sample webhook 2", - identifierUri: - "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", - objectId: "d3bb868c-fe44-452c-aa26-769a6538c808", - serviceUri: "http://www.example.com/webhook2", - tenantId: "68a4459a-ccb8-493c-b9da-dd30457d1b84", - useAadAuth: true, - useCommonAlertSchema: true - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.beginPostTestNotificationsAndWait( - notificationRequest - ); - console.log(result); -} - -async function main() { - createNotificationsAtSubscriptionLevel(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsUpdateSample.ts deleted file mode 100644 index 80b2b49eabac..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/actionGroupsUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ActionGroupPatchBody, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-06-01/examples/patchActionGroup.json - */ -async function patchAnActionGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Default-NotificationRules"; - const actionGroupName = "SampleActionGroup"; - const actionGroupPatch: ActionGroupPatchBody = { - enabled: false, - tags: { key1: "value1", key2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.actionGroups.update( - resourceGroupName, - actionGroupName, - actionGroupPatch - ); - console.log(result); -} - -async function main() { - patchAnActionGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsCreateOrUpdateSample.ts deleted file mode 100644 index b3c9a4e2f415..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsCreateOrUpdateSample.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ActivityLogAlertResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdate.json - */ -async function createOrUpdateAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const activityLogAlertRule: ActivityLogAlertResource = { - description: "Description of sample Activity Log Alert rule.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" } - } - ] - }, - condition: { - allOf: [ - { equals: "Administrative", field: "category" }, - { equals: "Error", field: "level" } - ] - }, - enabled: true, - location: "Global", - scopes: ["/subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithAnyOfCondition.json - */ -async function createOrUpdateAnActivityLogAlertRuleWithAnyOfCondition() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRuleWithAnyOfCondition"; - const activityLogAlertRule: ActivityLogAlertResource = { - description: - "Description of sample Activity Log Alert rule with 'anyOf' condition.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" } - } - ] - }, - condition: { - allOf: [ - { equals: "ServiceHealth", field: "category" }, - { - anyOf: [ - { equals: "Incident", field: "properties.incidentType" }, - { equals: "Maintenance", field: "properties.incidentType" } - ] - } - ] - }, - enabled: true, - location: "Global", - scopes: ["subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create a new Activity Log Alert rule or update an existing one. - * - * @summary Create a new Activity Log Alert rule or update an existing one. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_CreateOrUpdateRuleWithContainsAny.json - */ -async function createOrUpdateAnActivityLogAlertRuleWithContainsAny() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRuleWithContainsAny"; - const activityLogAlertRule: ActivityLogAlertResource = { - description: - "Description of sample Activity Log Alert rule with 'containsAny'.", - actions: { - actionGroups: [ - { - actionGroupId: - "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/SampleActionGroup", - webhookProperties: { sampleWebhookProperty: "SamplePropertyValue" } - } - ] - }, - condition: { - allOf: [ - { equals: "ServiceHealth", field: "category" }, - { - containsAny: ["North Europe", "West Europe"], - field: "properties.impactedServices[*].ImpactedRegions[*].RegionName" - } - ] - }, - enabled: true, - location: "Global", - scopes: ["subscriptions/187f412d-1758-44d9-b052-169e2564721d"], - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.createOrUpdate( - resourceGroupName, - activityLogAlertName, - activityLogAlertRule - ); - console.log(result); -} - -async function main() { - createOrUpdateAnActivityLogAlertRule(); - createOrUpdateAnActivityLogAlertRuleWithAnyOfCondition(); - createOrUpdateAnActivityLogAlertRuleWithContainsAny(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsDeleteSample.ts deleted file mode 100644 index 15271385aee4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an Activity Log Alert rule. - * - * @summary Delete an Activity Log Alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Delete.json - */ -async function deleteAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.delete( - resourceGroupName, - activityLogAlertName - ); - console.log(result); -} - -async function main() { - deleteAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsGetSample.ts deleted file mode 100644 index 9e1909525bc2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get an Activity Log Alert rule. - * - * @summary Get an Activity Log Alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Get.json - */ -async function getAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.get( - resourceGroupName, - activityLogAlertName - ); - console.log(result); -} - -async function main() { - getAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsListByResourceGroupSample.ts deleted file mode 100644 index a198638e54b2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all Activity Log Alert rules in a resource group. - * - * @summary Get a list of all Activity Log Alert rules in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListByResourceGroupName.json - */ -async function listActivityLogAlerts() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogAlerts.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listActivityLogAlerts(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsListBySubscriptionIdSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsListBySubscriptionIdSample.ts deleted file mode 100644 index 173f96e013a3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsListBySubscriptionIdSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get a list of all Activity Log Alert rules in a subscription. - * - * @summary Get a list of all Activity Log Alert rules in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_ListBySubscriptionId.json - */ -async function getListOfAllActivityLogAlertRulesUnderASubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogAlerts.listBySubscriptionId()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getListOfAllActivityLogAlertRulesUnderASubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsUpdateSample.ts deleted file mode 100644 index 54bd68fc2c84..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogAlertsUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AlertRulePatchObject, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. - * - * @summary Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/examples/ActivityLogAlertRule_Update.json - */ -async function patchAnActivityLogAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "187f412d-1758-44d9-b052-169e2564721d"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const activityLogAlertName = "SampleActivityLogAlertRule"; - const activityLogAlertRulePatch: AlertRulePatchObject = { - enabled: false, - tags: { key1: "value1", key2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.activityLogAlerts.update( - resourceGroupName, - activityLogAlertName, - activityLogAlertRulePatch - ); - console.log(result); -} - -async function main() { - patchAnActivityLogAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogsListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogsListSample.ts deleted file mode 100644 index d58594916b8c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/activityLogsListSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ActivityLogsListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Provides the list of records from the activity logs. - * - * @summary Provides the list of records from the activity logs. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsFiltered.json - */ -async function getActivityLogsWithFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogs.list(filter)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Provides the list of records from the activity logs. - * - * @summary Provides the list of records from the activity logs. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsFilteredAndSelected.json - */ -async function getActivityLogsWithFilterAndSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options: ActivityLogsListOptionalParams = { select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.activityLogs.list(filter, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getActivityLogsWithFilter(); - getActivityLogsWithFilterAndSelect(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRuleIncidentsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRuleIncidentsGetSample.ts deleted file mode 100644 index fb92424c0220..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRuleIncidentsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets an incident associated to an alert rule - * - * @summary Gets an incident associated to an alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRuleIncident.json - */ -async function getASingleAlertRuleIncident() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "myRuleName"; - const incidentName = "Website_started"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRuleIncidents.get( - resourceGroupName, - ruleName, - incidentName - ); - console.log(result); -} - -async function main() { - getASingleAlertRuleIncident(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRuleIncidentsListByAlertRuleSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRuleIncidentsListByAlertRuleSample.ts deleted file mode 100644 index 0dc8d87947d2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRuleIncidentsListByAlertRuleSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of incidents associated to an alert rule - * - * @summary Gets a list of incidents associated to an alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleIncidents.json - */ -async function listAlertRuleIncidents() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "myRuleName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRuleIncidents.listByAlertRule( - resourceGroupName, - ruleName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRuleIncidents(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesCreateOrUpdateSample.ts deleted file mode 100644 index dfe78856925c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AlertRuleResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a classic metric alert rule. - * - * @summary Creates or updates a classic metric alert rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateAlertRule.json - */ -async function createOrUpdateAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const parameters: AlertRuleResource = { - namePropertiesName: "chiricutin", - description: "Pura Vida", - actions: [], - condition: { - dataSource: { - metricName: "Requests", - odataType: - "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - resourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest" - }, - odataType: - "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - operator: "GreaterThan", - threshold: 3, - timeAggregation: "Total", - windowSize: "PT5M" - }, - isEnabled: true, - location: "West US", - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesDeleteSample.ts deleted file mode 100644 index 6bd0b7f8913b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a classic metric alert rule - * - * @summary Deletes a classic metric alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteAlertRule.json - */ -async function deleteAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.delete(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - deleteAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesGetSample.ts deleted file mode 100644 index 1eed90dfd819..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a classic metric alert rule - * - * @summary Gets a classic metric alert rule - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getAlertRule.json - */ -async function getAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.get(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - getAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesListByResourceGroupSample.ts deleted file mode 100644 index 3b5450f105b0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the classic metric alert rules within a resource group. - * - * @summary List the classic metric alert rules within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRule.json - */ -async function listAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRules.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesListBySubscriptionSample.ts deleted file mode 100644 index 04a8b5846cd7..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the classic metric alert rules within a subscription. - * - * @summary List the classic metric alert rules within a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listAlertRuleBySubscription.json - */ -async function listAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.alertRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesUpdateSample.ts deleted file mode 100644 index 5096a58eb37f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/alertRulesUpdateSample.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AlertRuleResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchAlertRule.json - */ -async function patchAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "Rac46PostSwapRG"; - const ruleName = "chiricutin"; - const alertRulesResource: AlertRuleResourcePatch = { - name: "chiricutin", - description: "Pura Vida", - actions: [], - condition: { - dataSource: { - metricName: "Requests", - odataType: - "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - resourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest" - }, - odataType: - "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - operator: "GreaterThan", - threshold: 3, - timeAggregation: "Total", - windowSize: "PT5M" - }, - isEnabled: true, - tags: { - $type: - "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.alertRules.update( - resourceGroupName, - ruleName, - alertRulesResource - ); - console.log(result); -} - -async function main() { - patchAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsCreateOrUpdateSample.ts deleted file mode 100644 index 9c9021581f86..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AutoscaleSettingResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an autoscale setting. - * - * @summary Creates or updates an autoscale setting. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/createOrUpdateAutoscaleSetting.json - */ -async function createOrUpdateAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const parameters: AutoscaleSettingResource = { - enabled: true, - location: "West US", - notifications: [ - { - email: { - customEmails: ["gu@ms.com", "ge@ns.net"], - sendToSubscriptionAdministrator: true, - sendToSubscriptionCoAdministrators: true - }, - operation: "Scale", - webhooks: [{ properties: {}, serviceUri: "http://myservice.com" }] - } - ], - predictiveAutoscalePolicy: { scaleMode: "Enabled" }, - profiles: [ - { - name: "adios", - capacity: { default: "1", maximum: "10", minimum: "1" }, - fixedDate: { - end: new Date("2015-03-05T14:30:00Z"), - start: new Date("2015-03-05T14:00:00Z"), - timeZone: "UTC" - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1" - } - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2" - } - } - ] - }, - { - name: "saludos", - capacity: { default: "1", maximum: "10", minimum: "1" }, - recurrence: { - frequency: "Week", - schedule: { days: ["1"], hours: [5], minutes: [15], timeZone: "UTC" } - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1" - } - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2" - } - } - ] - } - ], - tags: { key1: "value1", key2: "value2" }, - targetResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.createOrUpdate( - resourceGroupName, - autoscaleSettingName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsDeleteSample.ts deleted file mode 100644 index d40921fc31be..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes and autoscale setting - * - * @summary Deletes and autoscale setting - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/deleteAutoscaleSetting.json - */ -async function deleteAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.delete( - resourceGroupName, - autoscaleSettingName - ); - console.log(result); -} - -async function main() { - deleteAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsGetSample.ts deleted file mode 100644 index 8d41ae5c506b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets an autoscale setting - * - * @summary Gets an autoscale setting - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/getAutoscaleSetting.json - */ -async function getAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.get( - resourceGroupName, - autoscaleSettingName - ); - console.log(result); -} - -async function main() { - getAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsListByResourceGroupSample.ts deleted file mode 100644 index 27a63fcea6f6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the autoscale settings for a resource group - * - * @summary Lists the autoscale settings for a resource group - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSetting.json - */ -async function listAutoscaleSettings() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.autoscaleSettings.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAutoscaleSettings(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsListBySubscriptionSample.ts deleted file mode 100644 index 726e2114046d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the autoscale settings for a subscription - * - * @summary Lists the autoscale settings for a subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/listAutoscaleSettingBySubscription.json - */ -async function listAutoscaleSettingsBySubs() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.autoscaleSettings.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAutoscaleSettingsBySubs(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsUpdateSample.ts deleted file mode 100644 index 5b30e31e28df..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/autoscaleSettingsUpdateSample.ts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AutoscaleSettingResourcePatch, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/patchAutoscaleSetting.json - */ -async function patchAnAutoscaleSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "TestingMetricsScaleSet"; - const autoscaleSettingName = "MySetting"; - const autoscaleSettingResource: AutoscaleSettingResourcePatch = { - enabled: true, - notifications: [ - { - email: { - customEmails: ["gu@ms.com", "ge@ns.net"], - sendToSubscriptionAdministrator: true, - sendToSubscriptionCoAdministrators: true - }, - operation: "Scale", - webhooks: [{ properties: {}, serviceUri: "http://myservice.com" }] - } - ], - predictiveAutoscalePolicy: { scaleMode: "Enabled" }, - profiles: [ - { - name: "adios", - capacity: { default: "1", maximum: "10", minimum: "1" }, - fixedDate: { - end: new Date("2015-03-05T14:30:00Z"), - start: new Date("2015-03-05T14:00:00Z"), - timeZone: "UTC" - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1" - } - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2" - } - } - ] - }, - { - name: "saludos", - capacity: { default: "1", maximum: "10", minimum: "1" }, - recurrence: { - frequency: "Week", - schedule: { days: ["1"], hours: [5], minutes: [15], timeZone: "UTC" } - }, - rules: [ - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 10, - timeAggregation: "Average", - timeGrain: "PT1M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT5M", - direction: "Increase", - value: "1" - } - }, - { - metricTrigger: { - dividePerInstance: false, - metricName: "Percentage CPU", - metricResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - operator: "GreaterThan", - statistic: "Average", - threshold: 15, - timeAggregation: "Average", - timeGrain: "PT2M", - timeWindow: "PT5M" - }, - scaleAction: { - type: "ChangeCount", - cooldown: "PT6M", - direction: "Decrease", - value: "2" - } - } - ] - } - ], - tags: { key1: "value1" }, - targetResourceUri: - "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.autoscaleSettings.update( - resourceGroupName, - autoscaleSettingName, - autoscaleSettingResource - ); - console.log(result); -} - -async function main() { - patchAnAutoscaleSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesCreateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesCreateSample.ts deleted file mode 100644 index cd950812a39c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesCreateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AzureMonitorWorkspaceResource, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update a workspace - * - * @summary Create or update a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesCreate.json - */ -async function createOrUpdateWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const azureMonitorWorkspaceProperties: AzureMonitorWorkspaceResource = { - location: "eastus" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.create( - resourceGroupName, - azureMonitorWorkspaceName, - azureMonitorWorkspaceProperties - ); - console.log(result); -} - -async function main() { - createOrUpdateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesDeleteSample.ts deleted file mode 100644 index 540b8c1a8c3e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete a workspace - * - * @summary Delete a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesDelete.json - */ -async function deleteWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.delete( - resourceGroupName, - azureMonitorWorkspaceName - ); - console.log(result); -} - -async function main() { - deleteWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesGetSample.ts deleted file mode 100644 index 9d42224702c5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the specific Azure Monitor workspace - * - * @summary Returns the specific Azure Monitor workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesGet.json - */ -async function getWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.get( - resourceGroupName, - azureMonitorWorkspaceName - ); - console.log(result); -} - -async function main() { - getWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesListByResourceGroupSample.ts deleted file mode 100644 index d33e9e1033e5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all workspaces in the specified resource group - * - * @summary Lists all workspaces in the specified resource group - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListByResourceGroup.json - */ -async function listMonitorWorkspacesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.azureMonitorWorkspaces.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMonitorWorkspacesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesListBySubscriptionSample.ts deleted file mode 100644 index 67073eac8ea5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all workspaces in the specified subscription - * - * @summary Lists all workspaces in the specified subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesListBySubscription.json - */ -async function listWorkspacesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.azureMonitorWorkspaces.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listWorkspacesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesUpdateSample.ts deleted file mode 100644 index 16f3bf41e057..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/azureMonitorWorkspacesUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AzureMonitorWorkspaceResourceForUpdate, - AzureMonitorWorkspacesUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates part of a workspace - * - * @summary Updates part of a workspace - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/AzureMonitorWorkspacesUpdate.json - */ -async function updateWorkspace() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const azureMonitorWorkspaceName = "myAzureMonitorWorkspace"; - const azureMonitorWorkspaceProperties: AzureMonitorWorkspaceResourceForUpdate = { - tags: { tag1: "A", tag2: "B", tag3: "C" } - }; - const options: AzureMonitorWorkspacesUpdateOptionalParams = { - azureMonitorWorkspaceProperties - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.azureMonitorWorkspaces.update( - resourceGroupName, - azureMonitorWorkspaceName, - options - ); - console.log(result); -} - -async function main() { - updateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/baselinesListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/baselinesListSample.ts deleted file mode 100644 index 14eb069dd324..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/baselinesListSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BaselinesListOptionalParams, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to **Lists the metric baseline values for a resource**. - * - * @summary **Lists the metric baseline values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2019-03-01/examples/metricBaselines.json - */ -async function getMetricBaselines() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1"; - const timespan = "2019-03-12T11:00:00.000Z/2019-03-12T12:00:00.000Z"; - const interval = "PT1H"; - const aggregation = "average"; - const sensitivities = "Low,Medium"; - const options: BaselinesListOptionalParams = { - timespan, - interval, - aggregation, - sensitivities - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.baselines.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getMetricBaselines(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsCreateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsCreateSample.ts deleted file mode 100644 index 519b967cab5f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsCreateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataCollectionEndpointResource, - DataCollectionEndpointsCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a data collection endpoint. - * - * @summary Creates or updates a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsCreate.json - */ -async function createOrUpdateDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const body: DataCollectionEndpointResource = { - location: "eastus", - networkAcls: { publicNetworkAccess: "Enabled" } - }; - const options: DataCollectionEndpointsCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.create( - resourceGroupName, - dataCollectionEndpointName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsDeleteSample.ts deleted file mode 100644 index 7a0edbdcc6fb..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a data collection endpoint. - * - * @summary Deletes a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsDelete.json - */ -async function deleteDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.delete( - resourceGroupName, - dataCollectionEndpointName - ); - console.log(result); -} - -async function main() { - deleteDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsGetSample.ts deleted file mode 100644 index 8b65d70d4b9f..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the specified data collection endpoint. - * - * @summary Returns the specified data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsGet.json - */ -async function getDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.get( - resourceGroupName, - dataCollectionEndpointName - ); - console.log(result); -} - -async function main() { - getDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsListByResourceGroupSample.ts deleted file mode 100644 index 733401f8e149..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data collection endpoints in the specified resource group. - * - * @summary Lists all data collection endpoints in the specified resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListByResourceGroup.json - */ -async function listDataCollectionEndpointsByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionEndpoints.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionEndpointsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsListBySubscriptionSample.ts deleted file mode 100644 index f9a0d214965b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data collection endpoints in the specified subscription - * - * @summary Lists all data collection endpoints in the specified subscription - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsListBySubscription.json - */ -async function listDataCollectionEndpointsBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionEndpoints.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionEndpointsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsUpdateSample.ts deleted file mode 100644 index b0b5564c3a59..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionEndpointsUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ResourceForUpdate, - DataCollectionEndpointsUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates part of a data collection endpoint. - * - * @summary Updates part of a data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionEndpointsUpdate.json - */ -async function updateDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myCollectionEndpoint"; - const body: ResourceForUpdate = { tags: { tag1: "A", tag2: "B", tag3: "C" } }; - const options: DataCollectionEndpointsUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionEndpoints.update( - resourceGroupName, - dataCollectionEndpointName, - options - ); - console.log(result); -} - -async function main() { - updateDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsCreateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsCreateSample.ts deleted file mode 100644 index 758df428def8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsCreateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataCollectionRuleAssociationProxyOnlyResource, - DataCollectionRuleAssociationsCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates an association. - * - * @summary Creates or updates an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsCreate.json - */ -async function createOrUpdateAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const body: DataCollectionRuleAssociationProxyOnlyResource = { - dataCollectionRuleId: - "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Insights/dataCollectionRules/myCollectionRule" - }; - const options: DataCollectionRuleAssociationsCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.create( - resourceUri, - associationName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsDeleteSample.ts deleted file mode 100644 index 1034e30e337a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes an association. - * - * @summary Deletes an association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsDelete.json - */ -async function deleteAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.delete( - resourceUri, - associationName - ); - console.log(result); -} - -async function main() { - deleteAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsGetSample.ts deleted file mode 100644 index 35540040a92e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the specified association. - * - * @summary Returns the specified association. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsGet.json - */ -async function getAssociation() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const associationName = "myAssociation"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRuleAssociations.get( - resourceUri, - associationName - ); - console.log(result); -} - -async function main() { - getAssociation(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts deleted file mode 100644 index 6d97bace404b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists associations for the specified data collection endpoint. - * - * @summary Lists associations for the specified data collection endpoint. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByDataCollectionEndpoint.json - */ -async function listAssociationsForSpecifiedDataCollectionEndpoint() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionEndpointName = "myDataCollectionEndpointName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByDataCollectionEndpoint( - resourceGroupName, - dataCollectionEndpointName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedDataCollectionEndpoint(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByResourceSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByResourceSample.ts deleted file mode 100644 index 11ffcd21d8f5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByResourceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists associations for the specified resource. - * - * @summary Lists associations for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByResource.json - */ -async function listAssociationsForSpecifiedResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByResource( - resourceUri - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByRuleSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByRuleSample.ts deleted file mode 100644 index 6cccd9d83a75..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRuleAssociationsListByRuleSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists associations for the specified data collection rule. - * - * @summary Lists associations for the specified data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByRule.json - */ -async function listAssociationsForSpecifiedDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRuleAssociations.listByRule( - resourceGroupName, - dataCollectionRuleName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAssociationsForSpecifiedDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesCreateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesCreateSample.ts deleted file mode 100644 index db801c866f14..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesCreateSample.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DataCollectionRuleResource, - DataCollectionRulesCreateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a data collection rule. - * - * @summary Creates or updates a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesCreate.json - */ -async function createOrUpdateDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const body: DataCollectionRuleResource = { - dataFlows: [ - { - destinations: ["centralWorkspace"], - streams: [ - "Microsoft-Perf", - "Microsoft-Syslog", - "Microsoft-WindowsEvent" - ] - } - ], - dataSources: { - performanceCounters: [ - { - name: "cloudTeamCoreCounters", - counterSpecifiers: [ - "\\Processor(_Total)\\% Processor Time", - "\\Memory\\Committed Bytes", - "\\LogicalDisk(_Total)\\Free Megabytes", - "\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" - ], - samplingFrequencyInSeconds: 15, - streams: ["Microsoft-Perf"] - }, - { - name: "appTeamExtraCounters", - counterSpecifiers: ["\\Process(_Total)\\Thread Count"], - samplingFrequencyInSeconds: 30, - streams: ["Microsoft-Perf"] - } - ], - syslog: [ - { - name: "cronSyslog", - facilityNames: ["cron"], - logLevels: ["Debug", "Critical", "Emergency"], - streams: ["Microsoft-Syslog"] - }, - { - name: "syslogBase", - facilityNames: ["syslog"], - logLevels: ["Alert", "Critical", "Emergency"], - streams: ["Microsoft-Syslog"] - } - ], - windowsEventLogs: [ - { - name: "cloudSecurityTeamEvents", - streams: ["Microsoft-WindowsEvent"], - xPathQueries: ["Security!"] - }, - { - name: "appTeam1AppEvents", - streams: ["Microsoft-WindowsEvent"], - xPathQueries: [ - "System![System[(Level = 1 or Level = 2 or Level = 3)]]", - "Application!*[System[(Level = 1 or Level = 2 or Level = 3)]]" - ] - } - ] - }, - destinations: { - logAnalytics: [ - { - name: "centralWorkspace", - workspaceResourceId: - "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/centralTeamWorkspace" - } - ] - }, - location: "eastus" - }; - const options: DataCollectionRulesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.create( - resourceGroupName, - dataCollectionRuleName, - options - ); - console.log(result); -} - -async function main() { - createOrUpdateDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesDeleteSample.ts deleted file mode 100644 index 4becc7faf8c8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a data collection rule. - * - * @summary Deletes a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesDelete.json - */ -async function deleteDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.delete( - resourceGroupName, - dataCollectionRuleName - ); - console.log(result); -} - -async function main() { - deleteDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesGetSample.ts deleted file mode 100644 index 833b20532bdb..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns the specified data collection rule. - * - * @summary Returns the specified data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesGet.json - */ -async function getDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.get( - resourceGroupName, - dataCollectionRuleName - ); - console.log(result); -} - -async function main() { - getDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesListByResourceGroupSample.ts deleted file mode 100644 index 3a5ad5f3084a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data collection rules in the specified resource group. - * - * @summary Lists all data collection rules in the specified resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListByResourceGroup.json - */ -async function listDataCollectionRulesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRules.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionRulesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesListBySubscriptionSample.ts deleted file mode 100644 index 509f9ffdb351..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all data collection rules in the specified subscription. - * - * @summary Lists all data collection rules in the specified subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListBySubscription.json - */ -async function listDataCollectionRulesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.dataCollectionRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDataCollectionRulesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesUpdateSample.ts deleted file mode 100644 index 3cedeb4a88a2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/dataCollectionRulesUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ResourceForUpdate, - DataCollectionRulesUpdateOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates part of a data collection rule. - * - * @summary Updates part of a data collection rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesUpdate.json - */ -async function updateDataCollectionRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "703362b3-f278-4e4b-9179-c76eaf41ffc2"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "myResourceGroup"; - const dataCollectionRuleName = "myCollectionRule"; - const body: ResourceForUpdate = { tags: { tag1: "A", tag2: "B", tag3: "C" } }; - const options: DataCollectionRulesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.dataCollectionRules.update( - resourceGroupName, - dataCollectionRuleName, - options - ); - console.log(result); -} - -async function main() { - updateDataCollectionRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCategoryGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCategoryGetSample.ts deleted file mode 100644 index 769917b066a8..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCategoryGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the diagnostic settings category for the specified resource. - * - * @summary Gets the diagnostic settings category for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "WorkflowRuntime"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettingsCategory.get(resourceUri, name); - console.log(result); -} - -async function main() { - getsTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCategoryListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCategoryListSample.ts deleted file mode 100644 index a7d2472c1194..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCategoryListSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the diagnostic settings categories for the specified resource. - * - * @summary Lists the diagnostic settings categories for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettingsCategory.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCreateOrUpdateSample.ts deleted file mode 100644 index 31843adcbddf..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { DiagnosticSettingsResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates diagnostic settings for the specified resource. - * - * @summary Creates or updates diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json - */ -async function createsOrUpdatesTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const parameters: DiagnosticSettingsResource = { - eventHubAuthorizationRuleId: - "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - categoryGroup: "allLogs", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - marketplacePartnerId: - "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1", - metrics: [ - { - category: "WorkflowMetrics", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - workspaceId: "" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.createOrUpdate( - resourceUri, - name, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates diagnostic settings for the specified resource. - * - * @summary Creates or updates diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSettingCategory.json - */ -async function createsOrUpdatesTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const parameters: DiagnosticSettingsResource = { - eventHubAuthorizationRuleId: - "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule", - eventHubName: "myeventhub", - logAnalyticsDestinationType: "Dedicated", - logs: [ - { - category: "WorkflowRuntime", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - marketplacePartnerId: - "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1", - metrics: [ - { - category: "WorkflowMetrics", - enabled: true, - retentionPolicy: { days: 0, enabled: false } - } - ], - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - workspaceId: "" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.createOrUpdate( - resourceUri, - name, - parameters - ); - console.log(result); -} - -async function main() { - createsOrUpdatesTheDiagnosticSetting(); - createsOrUpdatesTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsDeleteSample.ts deleted file mode 100644 index d99ca747b606..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes existing diagnostic settings for the specified resource. - * - * @summary Deletes existing diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json - */ -async function deletesTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.delete(resourceUri, name); - console.log(result); -} - -async function main() { - deletesTheDiagnosticSetting(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsGetSample.ts deleted file mode 100644 index 51552f38193b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsGetSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the active diagnostic settings for the specified resource. - * - * @summary Gets the active diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.get(resourceUri, name); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the active diagnostic settings for the specified resource. - * - * @summary Gets the active diagnostic settings for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingCategory.json - */ -async function getsTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const name = "mysetting"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.diagnosticSettings.get(resourceUri, name); - console.log(result); -} - -async function main() { - getsTheDiagnosticSetting(); - getsTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsListSample.ts deleted file mode 100644 index 0927d272c404..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/diagnosticSettingsListSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the active diagnostic settings list for the specified resource. - * - * @summary Gets the active diagnostic settings list for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json - */ -async function getsTheDiagnosticSetting() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettings.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the active diagnostic settings list for the specified resource. - * - * @summary Gets the active diagnostic settings list for the specified resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategory.json - */ -async function getsTheDiagnosticSettingForCategory() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.diagnosticSettings.list(resourceUri)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsTheDiagnosticSetting(); - getsTheDiagnosticSettingForCategory(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/eventCategoriesListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/eventCategoriesListSample.ts deleted file mode 100644 index 43a5ac1c8845..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/eventCategoriesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * - * @summary Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetEventCategories.json - */ -async function getEventCategories() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.eventCategories.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getEventCategories(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesCreateOrUpdateSample.ts deleted file mode 100644 index ace58a8b0b8e..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { LogProfileResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update a log profile in Azure Monitoring REST API. - * - * @summary Create or update a log profile in Azure Monitoring REST API. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/createOrUpdateLogProfile.json - */ -async function createOrUpdateALogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "Rac46PostSwapRG"; - const parameters: LogProfileResource = { - categories: ["Write", "Delete", "Action"], - location: "", - locations: ["global"], - retentionPolicy: { days: 3, enabled: true }, - serviceBusRuleId: "", - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", - tags: {} - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.createOrUpdate( - logProfileName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateALogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesDeleteSample.ts deleted file mode 100644 index c264d326b6a3..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesDeleteSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes the log profile. - * - * @summary Deletes the log profile. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/deleteLogProfile.json - */ -async function deleteLogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "b67f7fec-69fc-4974-9099-a26bd6ffeda3"; - const logProfileName = "Rac46PostSwapRG"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.delete(logProfileName); - console.log(result); -} - -async function main() { - deleteLogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesGetSample.ts deleted file mode 100644 index 9e2f9f31105a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the log profile. - * - * @summary Gets the log profile. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/getLogProfile.json - */ -async function getLogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "default"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.get(logProfileName); - console.log(result); -} - -async function main() { - getLogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesListSample.ts deleted file mode 100644 index 717850be0c5a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to List the log profiles. - * - * @summary List the log profiles. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/listLogProfile.json - */ -async function listLogProfiles() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.logProfiles.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listLogProfiles(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesUpdateSample.ts deleted file mode 100644 index 32c9825f24f7..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/logProfilesUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { LogProfileResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2016-03-01/examples/patchLogProfile.json - */ -async function patchALogProfile() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "df602c9c-7aa0-407d-a6fb-eb20c8bd1192"; - const logProfileName = "Rac46PostSwapRG"; - const logProfilesResource: LogProfileResourcePatch = { - categories: ["Write", "Delete", "Action"], - locations: ["global"], - retentionPolicy: { days: 3, enabled: true }, - serviceBusRuleId: "", - storageAccountId: - "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", - tags: { key1: "value1" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.logProfiles.update( - logProfileName, - logProfilesResource - ); - console.log(result); -} - -async function main() { - patchALogProfile(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsCreateOrUpdateSample.ts deleted file mode 100644 index d609df81bd95..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsCreateOrUpdateSample.ts +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MetricAlertResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json - */ -async function createOrUpdateADynamicAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - alertSensitivity: "Medium", - criterionType: "DynamicThresholdCriterion", - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 4, - numberOfEvaluationPeriods: 4 - }, - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterOrLessThan", - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json - */ -async function createOrUpdateADynamicAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - alertSensitivity: "Medium", - criterionType: "DynamicThresholdCriterion", - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 4, - numberOfEvaluationPeriods: 4 - }, - ignoreDataBefore: new Date("2019-04-04T21:00:00.000Z"), - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterOrLessThan", - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" - ], - severity: 3, - tags: {}, - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateWebTestMetricAlert.json - */ -async function createOrUpdateAWebTestAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "rg-example"; - const ruleName = "webtest-name-example"; - const parameters: MetricAlertResource = { - description: - 'Automatically created alert rule for availability test "component-example" a', - actions: [], - criteria: { - componentId: - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example", - failedLocationCount: 2, - odataType: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", - webTestId: - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example", - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example" - ], - severity: 4, - tags: { - "hiddenLink:/subscriptions/12345678123412341234123456789101/resourcegroups/rgExample/providers/microsoftInsights/components/webtestNameExample": - "Resource", - "hiddenLink:/subscriptions/12345678123412341234123456789101/resourcegroups/rgExample/providers/microsoftInsights/webtests/componentExample": - "Resource" - }, - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertMultipleResource.json - */ -async function createOrUpdateAnAlertRuleForMultipleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertSingleResource.json - */ -async function createOrUpdateAnAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "\\Processor(_Total)\\% Processor Time", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "Pt1m", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" - ], - severity: 3, - tags: {}, - windowSize: "Pt15m" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertResourceGroup.json - */ -async function createOrUpdateAnAlertRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest1"; - const ruleName = "MetricAlertAtResourceGroupLevel"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" - ], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertSubscription.json - */ -async function createOrUpdateAnAlertRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertAtSubscriptionLevel"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "Percentage CPU", - metricNamespace: "microsoft.compute/virtualmachines", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1M", - location: "global", - scopes: ["/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"], - severity: 3, - tags: {}, - targetResourceRegion: "southcentralus", - targetResourceType: "Microsoft.Compute/virtualMachines", - windowSize: "PT15M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update an metric alert definition. - * - * @summary Create or update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/createOrUpdateMetricAlertWithDimensions.json - */ -async function createOrUpdateAnAlertRulesWithDimensions() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleDimensions"; - const parameters: MetricAlertResource = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "Metric1", - criterionType: "StaticThresholdCriterion", - dimensions: [ - { name: "ActivityName", operator: "Include", values: ["*"] }, - { name: "StatusCode", operator: "Include", values: ["200"] } - ], - metricName: "Availability", - metricNamespace: "Microsoft.KeyVault/vaults", - operator: "GreaterThan", - threshold: 55, - timeAggregation: "Average" - } - ], - odataType: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "PT1H", - location: "global", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" - ], - severity: 3, - tags: {}, - windowSize: "P1D" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateADynamicAlertRuleForMultipleResources(); - createOrUpdateADynamicAlertRuleForSingleResource(); - createOrUpdateAWebTestAlertRule(); - createOrUpdateAnAlertRuleForMultipleResource(); - createOrUpdateAnAlertRuleForSingleResource(); - createOrUpdateAnAlertRuleOnResourceGroupS(); - createOrUpdateAnAlertRuleOnSubscription(); - createOrUpdateAnAlertRulesWithDimensions(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsDeleteSample.ts deleted file mode 100644 index 30628e3520d6..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsDeleteSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Delete an alert rule definition. - * - * @summary Delete an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/deleteMetricAlert.json - */ -async function deleteAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.delete(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - deleteAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsGetSample.ts deleted file mode 100644 index c1b733567e66..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsGetSample.ts +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertMultipleResource.json - */ -async function getADynamicAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getDynamicMetricAlertSingleResource.json - */ -async function getADynamicAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getWebTestMetricAlert.json - */ -async function getAWebTestAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "12345678-1234-1234-1234-123456789101"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "rg-example"; - const ruleName = "webtest-name-example"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertMultipleResource.json - */ -async function getAnAlertRuleForMultipleResources() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertOnMultipleResources"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertSingleResource.json - */ -async function getAnAlertRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertResourceGroup.json - */ -async function getAnAlertRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest1"; - const ruleName = "MetricAlertAtResourceGroupLevel"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieve an alert rule definition. - * - * @summary Retrieve an alert rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertSubscription.json - */ -async function getAnAlertRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "MetricAlertAtSubscriptionLevel"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.get(resourceGroupName, ruleName); - console.log(result); -} - -async function main() { - getADynamicAlertRuleForMultipleResources(); - getADynamicAlertRuleForSingleResource(); - getAWebTestAlertRule(); - getAnAlertRuleForMultipleResources(); - getAnAlertRuleForSingleResource(); - getAnAlertRuleOnResourceGroupS(); - getAnAlertRuleOnSubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsListByResourceGroupSample.ts deleted file mode 100644 index 3396a7fc63bf..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve alert rule definitions in a resource group. - * - * @summary Retrieve alert rule definitions in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json - */ -async function listMetricAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricAlerts.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsListBySubscriptionSample.ts deleted file mode 100644 index 8e5e162a5570..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve alert rule definitions in a subscription. - * - * @summary Retrieve alert rule definitions in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/listMetricAlert.json - */ -async function listMetricAlertRules() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricAlerts.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listMetricAlertRules(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsStatusListByNameSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsStatusListByNameSample.ts deleted file mode 100644 index 37c18dacacb1..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsStatusListByNameSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve an alert rule status. - * - * @summary Retrieve an alert rule status. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatusByName.json - */ -async function getAnAlertRuleStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "009f6022-67ec-423e-9aa7-691182870588"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "EastUs"; - const ruleName = "custom1"; - const statusName = - "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlertsStatus.listByName( - resourceGroupName, - ruleName, - statusName - ); - console.log(result); -} - -async function main() { - getAnAlertRuleStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsStatusListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsStatusListSample.ts deleted file mode 100644 index 250b43d4748c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsStatusListSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve an alert rule status. - * - * @summary Retrieve an alert rule status. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/getMetricAlertStatus.json - */ -async function getAnAlertRuleStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlertsStatus.list( - resourceGroupName, - ruleName - ); - console.log(result); -} - -async function main() { - getAnAlertRuleStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsUpdateSample.ts deleted file mode 100644 index 28c118771553..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricAlertsUpdateSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MetricAlertResourcePatch, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update an metric alert definition. - * - * @summary Update an metric alert definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/examples/UpdateMetricAlert.json - */ -async function createOrUpdateAnAlertRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "gigtest"; - const ruleName = "chiricutin"; - const parameters: MetricAlertResourcePatch = { - description: "This is the description of the rule1", - actions: [ - { - actionGroupId: - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - webHookProperties: { key11: "value11", key12: "value12" } - } - ], - autoMitigate: true, - criteria: { - allOf: [ - { - name: "High_CPU_80", - criterionType: "StaticThresholdCriterion", - dimensions: [], - metricName: "\\Processor(_Total)\\% Processor Time", - operator: "GreaterThan", - threshold: 80.5, - timeAggregation: "Average" - } - ], - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" - }, - enabled: true, - evaluationFrequency: "Pt1m", - scopes: [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" - ], - severity: 3, - tags: {}, - windowSize: "Pt15m" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricAlerts.update( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAnAlertRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricDefinitionsListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricDefinitionsListSample.ts deleted file mode 100644 index db4ec4a363d5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricDefinitionsListSample.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MetricDefinitionsListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsApplicationInsights.json - */ -async function getApplicationInsightsMetricDefinitionsWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions"; - const metricnamespace = "microsoft.insights/components"; - const options: MetricDefinitionsListOptionalParams = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitions.json - */ -async function getMetricDefinitionsWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricDefinitions"; - const metricnamespace = "Microsoft.Web/sites"; - const options: MetricDefinitionsListOptionalParams = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists the metric definitions for the resource. - * - * @summary Lists the metric definitions for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsMetricClass.json - */ -async function getStorageCacheMetricDefinitionsWithMetricClass() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache"; - const metricnamespace = "microsoft.storagecache/caches"; - const options: MetricDefinitionsListOptionalParams = { metricnamespace }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricDefinitions.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getApplicationInsightsMetricDefinitionsWithoutFilter(); - getMetricDefinitionsWithoutFilter(); - getStorageCacheMetricDefinitionsWithMetricClass(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricNamespacesListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricNamespacesListSample.ts deleted file mode 100644 index 3df200d50713..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricNamespacesListSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MetricNamespacesListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists the metric namespaces for the resource. - * - * @summary Lists the metric namespaces for the resource. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/examples/GetMetricNamespaces.json - */ -async function getMetricNamespacesWithoutFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill"; - const startTime = "2020-08-31T15:53:00Z"; - const options: MetricNamespacesListOptionalParams = { startTime }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.metricNamespaces.list(resourceUri, options)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getMetricNamespacesWithoutFilter(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricsListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricsListSample.ts deleted file mode 100644 index de1242962f04..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/metricsListSample.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MetricsListOptionalParams, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetric.json - */ -async function getMetricForData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"; - const timespan = "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z"; - const interval = "PT1M"; - const aggregation = "Average,count"; - const top = 3; - const orderby = "Average asc"; - const filter = "BlobType eq '*'"; - const metricnamespace = "Microsoft.Storage/storageAccounts/blobServices"; - const options: MetricsListOptionalParams = { - timespan, - interval, - aggregation, - top, - orderby, - filter, - metricnamespace - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricMetadata.json - */ -async function getMetricForMetadata() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default"; - const timespan = "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z"; - const interval = "PT1M"; - const aggregation = "Average,count"; - const top = 3; - const orderby = "Average asc"; - const filter = "BlobType eq '*'"; - const metricnamespace = "Microsoft.Storage/storageAccounts/blobServices"; - const options: MetricsListOptionalParams = { - timespan, - interval, - aggregation, - top, - orderby, - filter, - metricnamespace - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -/** - * This sample demonstrates how to **Lists the metric values for a resource**. - * - * @summary **Lists the metric values for a resource**. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricError.json - */ -async function getMetricWithError() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo"; - const timespan = "2021-06-07T21:51:00Z/2021-06-08T01:51:00Z"; - const interval = "FULL"; - const metricnames = "MongoRequestsCount,MongoRequests"; - const aggregation = "average"; - const metricnamespace = "microsoft.documentdb/databaseaccounts"; - const options: MetricsListOptionalParams = { - timespan, - interval, - metricnames, - aggregation, - metricnamespace - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.metricsOperations.list(resourceUri, options); - console.log(result); -} - -async function main() { - getMetricForData(); - getMetricForMetadata(); - getMetricWithError(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/monitorOperationsListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/monitorOperationsListSample.ts deleted file mode 100644 index c39df4e1ffa2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/monitorOperationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists available Operations for this Resource Provider - * - * @summary Lists available Operations for this Resource Provider - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Monitor/preview/2021-06-03-preview/examples/OperationsGet.json - */ -async function getOperationsList() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.monitorOperations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getOperationsList(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/operationsListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index b286ddbb34f4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Lists all of the available operations from Microsoft.Insights provider. - * - * @summary Lists all of the available operations from Microsoft.Insights provider. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/OperationList.json - */ -async function getAListOfOperationsForAResourceProvider() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.operations.list(); - console.log(result); -} - -async function main() { - getAListOfOperationsForAResourceProvider(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/predictiveMetricGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/predictiveMetricGetSample.ts deleted file mode 100644 index 46141b8812d7..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/predictiveMetricGetSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to get predictive autoscale metric future data - * - * @summary get predictive autoscale metric future data - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/GetPredictiveMetric.json - */ -async function getMetricForData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "myRG"; - const autoscaleSettingName = "vmss1-Autoscale-775"; - const timespan = "2021-10-14T22:00:00.000Z/2021-10-16T22:00:00.000Z"; - const interval = "PT1H"; - const metricNamespace = "Microsoft.Compute/virtualMachineScaleSets"; - const metricName = "PercentageCPU"; - const aggregation = "Total"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.predictiveMetric.get( - resourceGroupName, - autoscaleSettingName, - timespan, - interval, - metricNamespace, - metricName, - aggregation - ); - console.log(result); -} - -async function main() { - getMetricForData(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts deleted file mode 100644 index 58c9ae6e5230..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PrivateEndpointConnection, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. - * - * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionUpdate.json - */ -async function approveOrRejectAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const parameters: PrivateEndpointConnection = { - privateLinkServiceConnectionState: { - description: "Approved by johndoe@contoso.com", - status: "Approved" - } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - scopeName, - privateEndpointConnectionName, - parameters - ); - console.log(result); -} - -async function main() { - approveOrRejectAPrivateEndpointConnectionWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts deleted file mode 100644 index 3328788b882d..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a private endpoint connection with a given name. - * - * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionDelete.json - */ -async function deletesAPrivateEndpointConnectionWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.beginDeleteAndWait( - resourceGroupName, - scopeName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - deletesAPrivateEndpointConnectionWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsGetSample.ts deleted file mode 100644 index 61b6812cba6a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a private endpoint connection. - * - * @summary Gets a private endpoint connection. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const privateEndpointConnectionName = "private-endpoint-connection-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.get( - resourceGroupName, - scopeName, - privateEndpointConnectionName - ); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts deleted file mode 100644 index 3ad2bbb647f0..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateEndpointConnectionsListByPrivateLinkScopeSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all private endpoint connections on a private link scope. - * - * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionList.json - */ -async function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateEndpointConnections.listByPrivateLinkScope( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkResourcesGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkResourcesGetSample.ts deleted file mode 100644 index a44ca23c11f4..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkResourcesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * - * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const groupName = "azuremonitor"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkResources.get( - resourceGroupName, - scopeName, - groupName - ); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts deleted file mode 100644 index b2d1f95086c2..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkResourcesListByPrivateLinkScopeSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * - * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json - */ -async function getsPrivateEndpointConnection() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - getsPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopeOperationStatusGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopeOperationStatusGetSample.ts deleted file mode 100644 index 8f40d8c5a8f5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopeOperationStatusGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Get the status of an azure asynchronous operation associated with a private link scope operation. - * - * @summary Get the status of an azure asynchronous operation associated with a private link scope operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/privateLinkScopeOperationStatuses.json - */ -async function getSpecificOperationStatus() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "613192d7-503f-477a-9cfe-4efc3ee2bd60"; - const asyncOperationId = "713192d7-503f-477a-9cfe-4efc3ee2bd11"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopeOperationStatus.get( - asyncOperationId, - resourceGroupName - ); - console.log(result); -} - -async function main() { - getSpecificOperationStatus(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesCreateOrUpdateSample.ts deleted file mode 100644 index c0e06fc98bfb..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScopedResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Approve or reject a private endpoint connection with a given name. - * - * @summary Approve or reject a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceUpdate.json - */ -async function updateAScopedResourceInAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const parameters: ScopedResource = { - linkedResourceId: - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/components/my-component" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.beginCreateOrUpdateAndWait( - resourceGroupName, - scopeName, - name, - parameters - ); - console.log(result); -} - -async function main() { - updateAScopedResourceInAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesDeleteSample.ts deleted file mode 100644 index da8128cf28d5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a private endpoint connection with a given name. - * - * @summary Deletes a private endpoint connection with a given name. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceDelete.json - */ -async function deletesAScopedResourceWithAGivenName() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.beginDeleteAndWait( - resourceGroupName, - scopeName, - name - ); - console.log(result); -} - -async function main() { - deletesAScopedResourceWithAGivenName(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesGetSample.ts deleted file mode 100644 index 248dc344aea7..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a scoped resource in a private link scope. - * - * @summary Gets a scoped resource in a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceGet.json - */ -async function getsPrivateLinkScopedResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const name = "scoped-resource-name"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopedResources.get( - resourceGroupName, - scopeName, - name - ); - console.log(result); -} - -async function main() { - getsPrivateLinkScopedResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts deleted file mode 100644 index 2157e3c141ff..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopedResourcesListByPrivateLinkScopeSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets all private endpoint connections on a private link scope. - * - * @summary Gets all private endpoint connections on a private link scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopedResourceList.json - */ -async function getsListOfScopedResourcesInAPrivateLinkScope() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-1111-2222-3333-444444444444"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup"; - const scopeName = "MyPrivateLinkScope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopedResources.listByPrivateLinkScope( - resourceGroupName, - scopeName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getsListOfScopedResourcesInAPrivateLinkScope(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesCreateOrUpdateSample.ts deleted file mode 100644 index 484867612812..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesCreateOrUpdateSample.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AzureMonitorPrivateLinkScope, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * - * @summary Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesCreate.json - */ -async function privateLinkScopeCreate() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope = { - accessModeSettings: { - exclusions: [], - ingestionAccessMode: "Open", - queryAccessMode: "Open" - }, - location: "Global" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * - * @summary Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesUpdate.json - */ -async function privateLinkScopeUpdate() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope = { - accessModeSettings: { - exclusions: [], - ingestionAccessMode: "Open", - queryAccessMode: "Open" - }, - location: "Global", - tags: { tag1: "Value1" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.createOrUpdate( - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload - ); - console.log(result); -} - -async function main() { - privateLinkScopeCreate(); - privateLinkScopeUpdate(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesDeleteSample.ts deleted file mode 100644 index 72fa958e3561..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a Azure Monitor PrivateLinkScope. - * - * @summary Deletes a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesDelete.json - */ -async function privateLinkScopesDelete() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.beginDeleteAndWait( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - privateLinkScopesDelete(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesGetSample.ts deleted file mode 100644 index bc31e306902a..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Returns a Azure Monitor PrivateLinkScope. - * - * @summary Returns a Azure Monitor PrivateLinkScope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesGet.json - */ -async function privateLinkScopeGet() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.get( - resourceGroupName, - scopeName - ); - console.log(result); -} - -async function main() { - privateLinkScopeGet(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesListByResourceGroupSample.ts deleted file mode 100644 index e5c093f8e3de..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * - * @summary Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesListByResourceGroup.json - */ -async function privateLinkScopeListByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopes.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateLinkScopeListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesListSample.ts deleted file mode 100644 index 47d4083d2f79..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * - * @summary Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesList.json - */ -async function privateLinkScopesListJson() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "86dc51d3-92ed-4d7e-947a-775ea79b4919"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.privateLinkScopes.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - privateLinkScopesListJson(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesUpdateTagsSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesUpdateTagsSample.ts deleted file mode 100644 index d6956ec9e02c..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/privateLinkScopesUpdateTagsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { TagsResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * - * @summary Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopesUpdateTagsOnly.json - */ -async function privateLinkScopeUpdateTagsOnly() { - const subscriptionId = process.env["MONITOR_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "my-resource-group"; - const scopeName = "my-privatelinkscope"; - const privateLinkScopeTags: TagsResource = { - tags: { tag1: "Value1", tag2: "Value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.privateLinkScopes.updateTags( - resourceGroupName, - scopeName, - privateLinkScopeTags - ); - console.log(result); -} - -async function main() { - privateLinkScopeUpdateTagsOnly(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesCreateOrUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesCreateOrUpdateSample.ts deleted file mode 100644 index c22ab70cb00b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesCreateOrUpdateSample.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ScheduledQueryRuleResource, MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRule.json - */ -async function createOrUpdateAScheduledQueryRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const parameters: ScheduledQueryRuleResource = { - description: "Performance rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup" - ], - customProperties: { key11: "value11", key12: "value12" } - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [ - { - name: "ComputerIp", - operator: "Exclude", - values: ["192.168.1.1"] - }, - { name: "OSType", operator: "Include", values: ["*"] } - ], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1 - }, - metricMeasureColumn: "% Processor Time", - operator: "GreaterThan", - query: 'Perf | where ObjectName == "Processor"', - resourceIdColumn: "resourceId", - threshold: 70, - timeAggregation: "Average" - } - ] - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: [ - "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1" - ], - severity: 4, - skipQueryValidation: true, - windowSize: "PT10M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRuleResourceGroup.json - */ -async function createOrUpdateAScheduledQueryRuleOnResourceGroupS() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const parameters: ScheduledQueryRuleResource = { - description: "Health check rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup" - ], - customProperties: { key11: "value11", key12: "value12" } - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1 - }, - operator: "GreaterThan", - query: "Heartbeat", - threshold: 360, - timeAggregation: "Count" - } - ] - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: [ - "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1" - ], - severity: 4, - skipQueryValidation: true, - targetResourceTypes: ["Microsoft.Compute/virtualMachines"], - windowSize: "PT10M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a scheduled query rule. - * - * @summary Creates or updates a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/createOrUpdateScheduledQueryRuleSubscription.json - */ -async function createOrUpdateAScheduledQueryRuleOnSubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const parameters: ScheduledQueryRuleResource = { - description: "Performance rule", - actions: { - actionGroups: [ - "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup" - ], - customProperties: { key11: "value11", key12: "value12" } - }, - checkWorkspaceAlertsStorageConfigured: true, - criteria: { - allOf: [ - { - dimensions: [ - { - name: "ComputerIp", - operator: "Exclude", - values: ["192.168.1.1"] - }, - { name: "OSType", operator: "Include", values: ["*"] } - ], - failingPeriods: { - minFailingPeriodsToAlert: 1, - numberOfEvaluationPeriods: 1 - }, - metricMeasureColumn: "% Processor Time", - operator: "GreaterThan", - query: 'Perf | where ObjectName == "Processor"', - resourceIdColumn: "resourceId", - threshold: 70, - timeAggregation: "Average" - } - ] - }, - enabled: true, - evaluationFrequency: "PT5M", - location: "eastus", - muteActionsDuration: "PT30M", - ruleResolveConfiguration: { autoResolved: true, timeToResolve: "PT10M" }, - scopes: ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147"], - severity: 4, - skipQueryValidation: true, - targetResourceTypes: ["Microsoft.Compute/virtualMachines"], - windowSize: "PT10M" - }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.createOrUpdate( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAScheduledQueryRuleForSingleResource(); - createOrUpdateAScheduledQueryRuleOnResourceGroupS(); - createOrUpdateAScheduledQueryRuleOnSubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesDeleteSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesDeleteSample.ts deleted file mode 100644 index 9e34f0b8d669..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Deletes a scheduled query rule. - * - * @summary Deletes a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/deleteScheduledQueryRule.json - */ -async function deleteAScheduledQueryRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.delete( - resourceGroupName, - ruleName - ); - console.log(result); -} - -async function main() { - deleteAScheduledQueryRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesGetSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesGetSample.ts deleted file mode 100644 index e77734253abe..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve an scheduled query rule definition. - * - * @summary Retrieve an scheduled query rule definition. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/getScheduledQueryRule.json - */ -async function getAScheduledQueryRuleForSingleResource() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "perf"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.get( - resourceGroupName, - ruleName - ); - console.log(result); -} - -async function main() { - getAScheduledQueryRuleForSingleResource(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesListByResourceGroupSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesListByResourceGroupSample.ts deleted file mode 100644 index f474165d969b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve scheduled query rule definitions in a resource group. - * - * @summary Retrieve scheduled query rule definitions in a resource group. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesByResourceGroup.json - */ -async function listScheduledQueryRulesByResourceGroup() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scheduledQueryRules.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listScheduledQueryRulesByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesListBySubscriptionSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesListBySubscriptionSample.ts deleted file mode 100644 index ec1cce5bfe7b..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieve a scheduled query rule definitions in a subscription. - * - * @summary Retrieve a scheduled query rule definitions in a subscription. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/listScheduledQueryRulesBySubscription.json - */ -async function listScheduledQueryRulesBySubscription() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.scheduledQueryRules.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listScheduledQueryRulesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesUpdateSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesUpdateSample.ts deleted file mode 100644 index ccadc3a95389..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/scheduledQueryRulesUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ScheduledQueryRuleResourcePatch, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Update a scheduled query rule. - * - * @summary Update a scheduled query rule. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2022-08-01-preview/examples/patchScheduledQueryRule.json - */ -async function createOrUpdateAScheduledQueryRule() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "dd4bfc94-a096-412b-9c43-4bd13e35afbc"; - const resourceGroupName = - process.env["MONITOR_RESOURCE_GROUP"] || "QueryResourceGroupName"; - const ruleName = "heartbeat"; - const parameters: ScheduledQueryRuleResourcePatch = { enabled: false }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.scheduledQueryRules.update( - resourceGroupName, - ruleName, - parameters - ); - console.log(result); -} - -async function main() { - createOrUpdateAScheduledQueryRule(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/tenantActivityLogsListSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/tenantActivityLogsListSample.ts deleted file mode 100644 index 519961fabae5..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/tenantActivityLogsListSample.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TenantActivityLogsListOptionalParams, - MonitorClient -} from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsFiltered.json - */ -async function getTenantActivityLogsWithFilter() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const options: TenantActivityLogsListOptionalParams = { filter }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsFilteredAndSelected.json - */ -async function getTenantActivityLogsWithFilterAndSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const filter = - "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options: TenantActivityLogsListOptionalParams = { filter, select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsSelected.json - */ -async function getTenantActivityLogsWithSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const select = - "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level"; - const options: TenantActivityLogsListOptionalParams = { select }; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list(options)) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * - * @summary Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetTenantActivityLogsNoParams.json - */ -async function getTenantActivityLogsWithoutFilterOrSelect() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.tenantActivityLogs.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTenantActivityLogsWithFilter(); - getTenantActivityLogsWithFilterAndSelect(); - getTenantActivityLogsWithSelect(); - getTenantActivityLogsWithoutFilterOrSelect(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/vmInsightsGetOnboardingStatusSample.ts b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/vmInsightsGetOnboardingStatusSample.ts deleted file mode 100644 index 96e4892e9ecc..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/src/vmInsightsGetOnboardingStatusSample.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { MonitorClient } from "@azure/arm-monitor"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusVMScaleSet.json - */ -async function getStatusForAVMScaleSetThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/my-service-cluster/providers/Microsoft.Compute/virtualMachineScaleSets/scale-set-01"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVMUnknown.json - */ -async function getStatusForAVMThatHasNotYetReportedData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSingleVM.json - */ -async function getStatusForAVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/vm-resource-group/providers/Microsoft.Compute/virtualMachines/ubuntu-vm"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusResourceGroup.json - */ -async function getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = - "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87/resourceGroups/resource-group-with-vms"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -/** - * This sample demonstrates how to Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * - * @summary Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2018-11-27-preview/examples/getOnboardingStatusSubscription.json - */ -async function getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData() { - const subscriptionId = - process.env["MONITOR_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceUri = "subscriptions/3d51de47-8d1c-4d24-b42f-bcae075dfa87"; - const credential = new DefaultAzureCredential(); - const client = new MonitorClient(credential, subscriptionId); - const result = await client.vMInsights.getOnboardingStatus(resourceUri); - console.log(result); -} - -async function main() { - getStatusForAVMScaleSetThatIsActivelyReportingData(); - getStatusForAVMThatHasNotYetReportedData(); - getStatusForAVMThatIsActivelyReportingData(); - getStatusForAResourceGroupThatHasAtLeastOneVMThatIsActivelyReportingData(); - getStatusForASubscriptionThatHasAtLeastOneVMThatIsActivelyReportingData(); -} - -main().catch(console.error); diff --git a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/tsconfig.json b/sdk/monitor/arm-monitor/samples/v8-beta/typescript/tsconfig.json deleted file mode 100644 index e26ce2a6d8f7..000000000000 --- a/sdk/monitor/arm-monitor/samples/v8-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/monitor/arm-monitor/src/lroImpl.ts b/sdk/monitor/arm-monitor/src/lroImpl.ts deleted file mode 100644 index dd803cd5e28c..000000000000 --- a/sdk/monitor/arm-monitor/src/lroImpl.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { AbortSignalLike } from "@azure/abort-controller"; -import { LongRunningOperation, LroResponse } from "@azure/core-lro"; - -export function createLroSpec(inputs: { - sendOperationFn: (args: any, spec: any) => Promise>; - args: Record; - spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record; -}): LongRunningOperation { - const { args, spec, sendOperationFn } = inputs; - return { - requestMethod: spec.httpMethod, - requestPath: spec.path!, - sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: ( - path: string, - options?: { abortSignal?: AbortSignalLike } - ) => { - const { requestBody, ...restSpec } = spec; - return sendOperationFn(args, { - ...restSpec, - httpMethod: "GET", - path, - abortSignal: options?.abortSignal - }); - } - }; -} diff --git a/sdk/monitor/arm-monitor/src/models/index.ts b/sdk/monitor/arm-monitor/src/models/index.ts index dc51201fb334..756b997c74ef 100644 --- a/sdk/monitor/arm-monitor/src/models/index.ts +++ b/sdk/monitor/arm-monitor/src/models/index.ts @@ -8,528 +8,154 @@ import * as coreClient from "@azure/core-client"; -export type RuleConditionUnion = - | RuleCondition - | ThresholdRuleCondition - | LocationThresholdRuleCondition - | ManagementEventRuleCondition; -export type RuleDataSourceUnion = - | RuleDataSource - | RuleMetricDataSource - | RuleManagementEventDataSource; -export type RuleActionUnion = RuleAction | RuleEmailAction | RuleWebhookAction; -export type MetricAlertCriteriaUnion = - | MetricAlertCriteria - | MetricAlertSingleResourceMultipleMetricCriteria - | WebtestLocationAvailabilityCriteria - | MetricAlertMultipleResourceMultipleMetricCriteria; -export type MultiMetricCriteriaUnion = - | MultiMetricCriteria - | MetricCriteria - | DynamicMetricCriteria; - -/** Represents a collection of autoscale setting resources. */ -export interface AutoscaleSettingResourceCollection { - /** the values for the autoscale setting resources. */ - value: AutoscaleSettingResource[]; - /** URL to get the next set of results. */ +/** A pageable list of resources */ +export interface AzureMonitorWorkspaceResourceListResult { + /** A list of resources */ + value: AzureMonitorWorkspaceResource[]; + /** The URL to use for getting the next set of results */ nextLink?: string; } -/** Autoscale profile. */ -export interface AutoscaleProfile { - /** the name of the profile. */ - name: string; - /** the number of instances that can be used during this profile. */ - capacity: ScaleCapacity; - /** the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. */ - rules: ScaleRule[]; - /** the specific date-time for the profile. This element is not used if the Recurrence element is used. */ - fixedDate?: TimeWindow; - /** the repeating times at which this profile begins. This element is not used if the FixedDate element is used. */ - recurrence?: Recurrence; -} - -/** The number of instances that can be used during this profile. */ -export interface ScaleCapacity { - /** the minimum number of instances for the resource. */ - minimum: string; - /** the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores that are available in the subscription. */ - maximum: string; - /** the number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default. */ - default: string; -} - -/** A rule that provide the triggers and parameters for the scaling action. */ -export interface ScaleRule { - /** the trigger that results in a scaling action. */ - metricTrigger: MetricTrigger; - /** the parameters for the scaling action. */ - scaleAction: ScaleAction; -} - -/** The trigger that results in a scaling action. */ -export interface MetricTrigger { - /** the name of the metric that defines what the rule monitors. */ - metricName: string; - /** the namespace of the metric that defines what the rule monitors. */ - metricNamespace?: string; - /** the resource identifier of the resource the rule monitors. */ - metricResourceUri: string; - /** the location of the resource the rule monitors. */ - metricResourceLocation?: string; - /** the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute. */ - timeGrain: string; - /** the metric statistic type. How the metrics from multiple instances are combined. */ - statistic: MetricStatisticType; - /** the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. */ - timeWindow: string; - /** time aggregation type. How the data that is collected should be combined over time. The default value is Average. */ - timeAggregation: TimeAggregationType; - /** the operator that is used to compare the metric data and the threshold. */ - operator: ComparisonOperationType; - /** the threshold of the metric that triggers the scale action. */ - threshold: number; - /** List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. */ - dimensions?: ScaleRuleMetricDimension[]; - /** a value indicating whether metric should divide per instance. */ - dividePerInstance?: boolean; -} - -/** Specifies an auto scale rule metric dimension. */ -export interface ScaleRuleMetricDimension { - /** Name of the dimension. */ - dimensionName: string; - /** the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values */ - operator: ScaleRuleMetricDimensionOperationType; - /** list of dimension values. For example: ["App1","App2"]. */ - values: string[]; -} - -/** The parameters for the scaling action. */ -export interface ScaleAction { - /** the scale direction. Whether the scaling action increases or decreases the number of instances. */ - direction: ScaleDirection; - /** the type of action that should occur when the scale rule fires. */ - type: ScaleType; - /** the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. */ - value?: string; - /** the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format. */ - cooldown: string; -} - -/** A specific date-time for the profile. */ -export interface TimeWindow { - /** the timezone of the start and end times for the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time */ - timeZone?: string; - /** the start time for the profile in ISO 8601 format. */ - start: Date; - /** the end time for the profile in ISO 8601 format. */ - end: Date; -} - -/** The repeating times at which this profile begins. This element is not used if the FixedDate element is used. */ -export interface Recurrence { - /** the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. */ - frequency: RecurrenceFrequency; - /** the scheduling constraints for when the profile begins. */ - schedule: RecurrentSchedule; -} - -/** The scheduling constraints for when the profile begins. */ -export interface RecurrentSchedule { - /** the timezone for the hours of the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time */ - timeZone: string; - /** the collection of days that the profile takes effect on. Possible values are Sunday through Saturday. */ - days: string[]; - /** A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported). */ - hours: number[]; - /** A collection of minutes at which the profile takes effect at. */ - minutes: number[]; -} - -/** Autoscale notification. */ -export interface AutoscaleNotification { - /** the operation associated with the notification and its value must be "scale" */ - operation: "Scale"; - /** the email notification. */ - email?: EmailNotification; - /** the collection of webhook notifications. */ - webhooks?: WebhookNotification[]; -} - -/** Email notification of an autoscale event. */ -export interface EmailNotification { - /** a value indicating whether to send email to subscription administrator. */ - sendToSubscriptionAdministrator?: boolean; - /** a value indicating whether to send email to subscription co-administrators. */ - sendToSubscriptionCoAdministrators?: boolean; - /** the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored. */ - customEmails?: string[]; -} - -/** Webhook notification of an autoscale event. */ -export interface WebhookNotification { - /** the service address to receive the notification. */ - serviceUri?: string; - /** a property bag of settings. This value can be empty. */ - properties?: { [propertyName: string]: string }; -} - -/** The parameters for enabling predictive autoscale. */ -export interface PredictiveAutoscalePolicy { - /** the predictive autoscale mode */ - scaleMode: PredictiveAutoscalePolicyScaleMode; - /** the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format. */ - scaleLookAheadTime?: string; -} - -/** The autoscale setting resource. */ -export interface Resource { +/** Properties of an Azure Monitor workspace */ +export interface AzureMonitorWorkspace { /** - * Azure resource Id + * The immutable ID of the Azure Monitor workspace. This property is read-only. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly accountId?: string; /** - * Azure resource name + * Information about metrics for the Azure Monitor workspace * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly metrics?: AzureMonitorWorkspaceMetrics; /** - * Azure resource type + * The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** Resource location */ - location: string; - /** Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. */ - tags?: { [propertyName: string]: string }; + readonly provisioningState?: ProvisioningState; /** - * The system metadata related to the response. + * The Data Collection Rule and Endpoint used for ingestion by default. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** Describes the format of Error response. */ -export interface AutoscaleErrorResponse { - /** The error object. */ - error?: AutoscaleErrorResponseError; + readonly defaultIngestionSettings?: AzureMonitorWorkspaceDefaultIngestionSettings; /** - * The system metadata related to the response. + * List of private endpoint connections * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; -} - -/** The error object. */ -export interface AutoscaleErrorResponseError { - /** One of a server-defined set of error codes. */ - code?: string; - /** A human-readable representation of the error. */ - message?: string; - /** The target of the particular error. */ - target?: string; - /** A human-readable representation of the error's details. */ - details?: string; -} - -/** The autoscale setting object for patch operations. */ -export interface AutoscaleSettingResourcePatch { - /** Resource tags */ - tags?: { [propertyName: string]: string }; - /** the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. */ - profiles?: AutoscaleProfile[]; - /** the collection of notifications. */ - notifications?: AutoscaleNotification[]; - /** the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. */ - enabled?: boolean; - /** the predictive autoscale policy mode. */ - predictiveAutoscalePolicy?: PredictiveAutoscalePolicy; - /** the name of the autoscale setting. */ - name?: string; - /** the resource identifier of the resource that the autoscale setting should be added to. */ - targetResourceUri?: string; - /** the location of the resource that the autoscale setting should be added to. */ - targetResourceLocation?: string; -} - -/** The response to a metrics query. */ -export interface PredictiveResponse { - /** The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. */ - timespan?: string; - /** The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. */ - interval?: string; - /** The metrics being queried */ - metricName?: string; - /** resource of the predictive metric. */ - targetResourceId?: string; - /** the value of the collection. */ - data?: PredictiveValue[]; -} - -/** Represents a predictive metric value in the given bucket. */ -export interface PredictiveValue { - /** the timestamp for the metric value in ISO 8601 format. */ - timeStamp: Date; - /** Predictive value in this time bucket. */ - value: number; -} - -/** Result of the request to list Microsoft.Insights operations. It contains a list of operations and a URL link to get the next set of results. */ -export interface OperationListResult { - /** List of operations supported by the Microsoft.Insights provider. */ - value?: Operation[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** Microsoft Insights API operation definition. */ -export interface Operation { - /** Operation name: {provider}/{resource}/{operation} */ - name?: string; - /** Display metadata associated with the operation. */ - display?: OperationDisplay; -} - -/** Display metadata associated with the operation. */ -export interface OperationDisplay { - /** Service provider: Microsoft.Insights */ - provider?: string; - /** Resource on which the operation is performed: AlertRules, Autoscale, etc. */ - resource?: string; - /** Operation type: Read, write, delete, etc. */ - operation?: string; -} - -/** An alert incident indicates the activation status of an alert rule. */ -export interface Incident { + readonly privateEndpointConnections?: PrivateEndpointConnection[]; /** - * Incident name. + * Gets or sets allow or disallow public network access to workspace * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly publicNetworkAccess?: PublicNetworkAccess; +} + +/** Information about metrics for the workspace */ +export interface Metrics { /** - * Rule name that is associated with the incident. + * The Prometheus query endpoint for the workspace * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ruleName?: string; + readonly prometheusQueryEndpoint?: string; /** - * A boolean to indicate whether the incident is active or resolved. + * An internal identifier for the metrics container. Only to be used by the system * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isActive?: boolean; + readonly internalId?: string; +} + +/** Settings for data ingestion */ +export interface IngestionSettings { /** - * The time at which the incident was activated in ISO8601 format. + * The Azure resource Id of the default data collection rule for this workspace. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly activatedTime?: Date; + readonly dataCollectionRuleResourceId?: string; /** - * The time at which the incident was resolved in ISO8601 format. If null, it means the incident is still active. + * The Azure resource Id of the default data collection endpoint for this workspace. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resolvedTime?: Date; -} - -/** Describes the format of Error response. */ -export interface ErrorResponse { - /** Error code */ - code?: string; - /** Error message indicating why the operation failed. */ - message?: string; -} - -/** The List incidents operation response. */ -export interface IncidentListResult { - /** the incident collection. */ - value?: Incident[]; -} - -/** The condition that results in the alert rule being activated. */ -export interface RuleCondition { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: - | "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" - | "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" - | "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"; - /** the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. */ - dataSource?: RuleDataSourceUnion; -} - -/** The resource from which the rule collects its data. */ -export interface RuleDataSource { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: - | "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" - | "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"; - /** the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. */ - resourceUri?: string; - /** the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. */ - legacyResourceId?: string; - /** the location of the resource. */ - resourceLocation?: string; - /** the namespace of the metric. */ - metricNamespace?: string; -} - -/** The action that is performed when the alert rule becomes active, and when an alert condition is resolved. */ -export interface RuleAction { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: - | "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" - | "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"; + readonly dataCollectionEndpointResourceId?: string; } -/** An azure resource object */ -export interface ResourceAutoGenerated { +/** Private endpoint connection denoting the underlying private endpoint, its connection status, and its properties */ +export interface PrivateEndpointConnection { /** - * Azure resource Id + * Fully qualified resource ID * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * Azure resource name + * The name of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * Azure resource type + * The type of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; - /** Resource location */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - -/** The alert rule object for patch operations. */ -export interface AlertRuleResourcePatch { - /** Resource tags */ - tags?: { [propertyName: string]: string }; - /** the name of the alert rule. */ - name?: string; - /** the description of the alert rule that will be included in the alert email. */ - description?: string; - /** the provisioning state. */ - provisioningState?: string; - /** the flag that indicates whether the alert rule is enabled. */ - isEnabled?: boolean; - /** the condition that results in the alert rule being activated. */ - condition?: RuleConditionUnion; - /** action that is performed when the alert rule becomes active, and when an alert condition is resolved. */ - action?: RuleActionUnion; - /** the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. */ - actions?: RuleActionUnion[]; /** - * Last time the rule was updated in ISO8601 format. + * The properties of the private endpoint connection * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastUpdatedTime?: Date; -} - -/** Represents a collection of alert rule resources. */ -export interface AlertRuleResourceCollection { - /** the values for the alert rule resources. */ - value?: AlertRuleResource[]; -} - -/** Specifies the retention policy for the log. */ -export interface RetentionPolicy { - /** a value indicating whether the retention policy is enabled. */ - enabled: boolean; - /** the number of days for the retention in days. A value of 0 will retain the events indefinitely. */ - days: number; + readonly properties?: PrivateEndpointConnectionProperties; } -/** An azure resource object */ -export interface ResourceAutoGenerated2 { +/** The properties of the private endpoint connection */ +export interface PrivateEndpointConnectionPropertiesAutoGenerated { /** - * Azure resource Id + * Gets provisioning state of the private endpoint connection * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly provisioningState?: ProvisioningState; /** - * Azure resource name + * Gets or sets the private endpoint which the connection belongs to * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly privateEndpoint?: PrivateEndpointConnectionPropertiesPrivateEndpoint; /** - * Azure resource type + * The private link resource group ids * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** Resource location */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - -/** The log profile resource for patch operations. */ -export interface LogProfileResourcePatch { - /** Resource tags */ - tags?: { [propertyName: string]: string }; - /** the resource id of the storage account to which you would like to send the Activity Log. */ - storageAccountId?: string; - /** The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. */ - serviceBusRuleId?: string; - /** List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location. */ - locations?: string[]; - /** the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.' */ - categories?: string[]; - /** the retention policy for the events in the log. */ - retentionPolicy?: RetentionPolicy; -} - -/** Represents a collection of log profiles. */ -export interface LogProfileCollection { - /** the values of the log profiles. */ - value: LogProfileResource[]; + readonly groupIds?: string[]; + /** + * Gets or sets connection state of the private endpoint connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateLinkServiceConnectionState?: PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState; } -/** Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric. */ -export interface MetricSettings { - /** the timegrain of the metric in ISO8601 format. */ - timeGrain?: string; - /** Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation. */ - category?: string; - /** a value indicating whether this category is enabled. */ - enabled: boolean; - /** the retention policy for this category. */ - retentionPolicy?: RetentionPolicy; +/** The private endpoint which the connection belongs to */ +export interface PrivateEndpoint { + /** + * ARM resource ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; } -/** Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. */ -export interface LogSettings { - /** Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation. */ - category?: string; - /** Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation. */ - categoryGroup?: string; - /** a value indicating whether this log is enabled. */ - enabled: boolean; - /** the retention policy for this log. */ - retentionPolicy?: RetentionPolicy; +/** The connection state of the private endpoint connection */ +export interface PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: Status; + /** + * The reason for approval/rejection of the connection + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionsRequired?: string; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface ResourceAutoGenerated3 { +export interface Resource { /** * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * NOTE: This property will not be serialized. It can only be populated by the server. @@ -545,4662 +171,343 @@ export interface ResourceAutoGenerated3 { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; } -/** Represents a collection of alert rule resources. */ -export interface DiagnosticSettingsResourceCollection { - /** The collection of diagnostic settings resources;. */ - value?: DiagnosticSettingsResource[]; +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } -/** Represents a collection of diagnostic setting category resources. */ -export interface DiagnosticSettingsCategoryResourceCollection { - /** The collection of diagnostic settings category resources. */ - value?: DiagnosticSettingsCategoryResource[]; +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; } -/** An email receiver. */ -export interface EmailReceiver { - /** The name of the email receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The email address of this receiver. */ - emailAddress: string; - /** Indicates whether to use common alert schema. */ - useCommonAlertSchema?: boolean; +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; /** - * The receiver status of the e-mail. + * The error message. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: ReceiverStatus; -} - -/** An SMS receiver. */ -export interface SmsReceiver { - /** The name of the SMS receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The country code of the SMS receiver. */ - countryCode: string; - /** The phone number of the SMS receiver. */ - phoneNumber: string; + readonly message?: string; /** - * The status of the receiver. + * The error target. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: ReceiverStatus; -} - -/** A webhook receiver. */ -export interface WebhookReceiver { - /** The name of the webhook receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The URI where webhooks should be sent. */ - serviceUri: string; - /** Indicates whether to use common alert schema. */ - useCommonAlertSchema?: boolean; - /** Indicates whether or not use AAD authentication. */ - useAadAuth?: boolean; - /** Indicates the webhook app object Id for aad auth. */ - objectId?: string; - /** Indicates the identifier uri for aad auth. */ - identifierUri?: string; - /** Indicates the tenant id for aad auth. */ - tenantId?: string; -} - -/** An Itsm receiver. */ -export interface ItsmReceiver { - /** The name of the Itsm receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** OMS LA instance identifier. */ - workspaceId: string; - /** Unique identification of ITSM connection among multiple defined in above workspace. */ - connectionId: string; - /** JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well. */ - ticketConfiguration: string; - /** Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' */ - region: string; -} - -/** The Azure mobile App push notification receiver. */ -export interface AzureAppPushReceiver { - /** The name of the Azure mobile app push receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The email address registered for the Azure mobile app. */ - emailAddress: string; -} - -/** The Azure Automation Runbook notification receiver. */ -export interface AutomationRunbookReceiver { - /** The Azure automation account Id which holds this runbook and authenticate to Azure resource. */ - automationAccountId: string; - /** The name for this runbook. */ - runbookName: string; - /** The resource id for webhook linked to this runbook. */ - webhookResourceId: string; - /** Indicates whether this instance is global runbook. */ - isGlobalRunbook: boolean; - /** Indicates name of the webhook. */ - name?: string; - /** The URI where webhooks should be sent. */ - serviceUri?: string; - /** Indicates whether to use common alert schema. */ - useCommonAlertSchema?: boolean; -} - -/** A voice receiver. */ -export interface VoiceReceiver { - /** The name of the voice receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The country code of the voice receiver. */ - countryCode: string; - /** The phone number of the voice receiver. */ - phoneNumber: string; -} - -/** A logic app receiver. */ -export interface LogicAppReceiver { - /** The name of the logic app receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The azure resource id of the logic app receiver. */ - resourceId: string; - /** The callback url where http request sent to. */ - callbackUrl: string; - /** Indicates whether to use common alert schema. */ - useCommonAlertSchema?: boolean; -} - -/** An azure function receiver. */ -export interface AzureFunctionReceiver { - /** The name of the azure function receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The azure resource id of the function app. */ - functionAppResourceId: string; - /** The function name in the function app. */ - functionName: string; - /** The http trigger url where http request sent to. */ - httpTriggerUrl: string; - /** Indicates whether to use common alert schema. */ - useCommonAlertSchema?: boolean; -} - -/** An arm role receiver. */ -export interface ArmRoleReceiver { - /** The name of the arm role receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The arm role id. */ - roleId: string; - /** Indicates whether to use common alert schema. */ - useCommonAlertSchema?: boolean; -} - -/** An Event hub receiver. */ -export interface EventHubReceiver { - /** The name of the Event hub receiver. Names must be unique across all receivers within an action group. */ - name: string; - /** The Event Hub namespace */ - eventHubNameSpace: string; - /** The name of the specific Event Hub queue */ - eventHubName: string; - /** Indicates whether to use common alert schema. */ - useCommonAlertSchema?: boolean; - /** The tenant Id for the subscription containing this event hub */ - tenantId?: string; - /** The Id for the subscription containing this event hub */ - subscriptionId: string; -} - -/** An azure resource object */ -export interface AzureResource { + readonly target?: string; /** - * Azure resource Id + * The error details. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly details?: ErrorDetail[]; /** - * Azure resource name + * The error additional info. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { /** - * Azure resource type + * The additional info type. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; - /** Resource location */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; } -/** An action group object for the body of patch operations. */ -export interface ActionGroupPatchBody { +/** Definition of ARM tracked top level resource properties for update operation */ +export interface AzureMonitorWorkspaceResourceForUpdate { /** Resource tags */ tags?: { [propertyName: string]: string }; - /** Indicates whether this action group is enabled. If an action group is not enabled, then none of its actions will be activated. */ - enabled?: boolean; -} - -/** The request body which contain contact detail metadata */ -export interface NotificationRequestBody { - /** The value of the supported alert type. Supported alert type values are: servicehealth, metricstaticthreshold, metricsdynamicthreshold, logalertv2, smartalert, webtestalert, logalertv1numresult, logalertv1metricmeasurement, resourcehealth, activitylog, actualcostbudget, forecastedbudget */ - alertType: string; - /** The list of email receivers that are part of this action group. */ - emailReceivers?: EmailReceiver[]; - /** The list of SMS receivers that are part of this action group. */ - smsReceivers?: SmsReceiver[]; - /** The list of webhook receivers that are part of this action group. */ - webhookReceivers?: WebhookReceiver[]; - /** The list of ITSM receivers that are part of this action group. */ - itsmReceivers?: ItsmReceiver[]; - /** The list of AzureAppPush receivers that are part of this action group. */ - azureAppPushReceivers?: AzureAppPushReceiver[]; - /** The list of AutomationRunbook receivers that are part of this action group. */ - automationRunbookReceivers?: AutomationRunbookReceiver[]; - /** The list of voice receivers that are part of this action group. */ - voiceReceivers?: VoiceReceiver[]; - /** The list of logic app receivers that are part of this action group. */ - logicAppReceivers?: LogicAppReceiver[]; - /** The list of azure function receivers that are part of this action group. */ - azureFunctionReceivers?: AzureFunctionReceiver[]; - /** The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. */ - armRoleReceivers?: ArmRoleReceiver[]; - /** The list of event hub receivers that are part of this action group. */ - eventHubReceivers?: EventHubReceiver[]; } -/** The details of the test notification results. */ -export interface TestNotificationDetailsResponse { - /** The context info */ - context?: Context; - /** The overall state */ - state: string; - /** The completed time */ - completedTime?: string; - /** The created time */ - createdTime?: string; - /** The list of action detail */ - actionDetails?: ActionDetail[]; +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** The context info */ -export interface Context { - /** The source of the notification request */ - notificationSource?: string; - /** The context id type */ - contextType?: string; -} - -/** The action detail */ -export interface ActionDetail { - /** The mechanism type */ - mechanismType?: string; - /** The name of the action */ - name?: string; - /** The status of the action */ - status?: string; - /** The substatus of the action */ - subState?: string; - /** The send time */ - sendTime?: string; - /** The detail of the friendly error message */ - detail?: string; -} - -/** A list of action groups. */ -export interface ActionGroupList { - /** The list of action groups. */ - value?: ActionGroupResource[]; - /** Provides the link to retrieve the next set of elements. */ - nextLink?: string; -} - -/** Describes a receiver that should be resubscribed. */ -export interface EnableRequest { - /** The name of the receiver to resubscribe. */ - receiverName: string; -} - -/** Represents collection of events. */ -export interface EventDataCollection { - /** this list that includes the Azure audit logs. */ - value: EventData[]; - /** Provides the link to retrieve the next set of events. */ - nextLink?: string; -} - -/** The Azure event log entries are of type EventData */ -export interface EventData { - /** - * The sender authorization information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly authorization?: SenderAuthorization; - /** - * key value pairs to identify ARM permissions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly claims?: { [propertyName: string]: string }; - /** - * the email address of the user who has performed the operation, the UPN claim or SPN claim based on availability. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly caller?: string; - /** - * the description of the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * the Id of this event as required by ARM for RBAC. It contains the EventDataID and a timestamp information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * the event data Id. This is a unique identifier for an event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventDataId?: string; - /** - * the correlation Id, usually a GUID in the string format. The correlation Id is shared among the events that belong to the same uber operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly correlationId?: string; - /** - * the event name. This value should not be confused with OperationName. For practical purposes, OperationName might be more appealing to end users. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventName?: LocalizableString; - /** - * the event category. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly category?: LocalizableString; - /** - * the HTTP request info. Usually includes the 'clientRequestId', 'clientIpAddress' (IP address of the user who initiated the event) and 'method' (HTTP method e.g. PUT). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly httpRequest?: HttpRequestInfo; - /** - * the event level - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly level?: EventLevel; - /** - * the resource group name of the impacted resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceGroupName?: string; - /** - * the resource provider name of the impacted resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceProviderName?: LocalizableString; - /** - * the resource uri that uniquely identifies the resource that caused this event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** - * the resource type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: LocalizableString; - /** - * It is usually a GUID shared among the events corresponding to single operation. This value should not be confused with EventName. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationId?: string; - /** - * the operation name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationName?: LocalizableString; - /** - * the set of pairs (usually a Dictionary) that includes details about the event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly properties?: { [propertyName: string]: string }; - /** - * a string describing the status of the operation. Some typical values are: Started, In progress, Succeeded, Failed, Resolved. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: LocalizableString; - /** - * the event sub status. Most of the time, when included, this captures the HTTP status code of the REST call. Common values are: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP Status Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code: 504) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subStatus?: LocalizableString; +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { /** - * the timestamp of when the event was generated by the Azure service processing the request corresponding the event. It in ISO 8601 format. + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly eventTimestamp?: Date; + readonly name?: string; /** - * the timestamp of when the event became available for querying via this API. It is in ISO 8601 format. This value should not be confused eventTimestamp. As there might be a delay between the occurrence time of the event, and the time that the event is submitted to the Azure logging infrastructure. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly submissionTimestamp?: Date; + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; /** - * the Azure subscription Id usually a GUID. + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subscriptionId?: string; + readonly origin?: Origin; /** - * the Azure tenant Id + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; -} - -/** the authorization used by the user who has performed the operation that led to this event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and the 'scope' */ -export interface SenderAuthorization { - /** the permissible actions. For instance: microsoft.support/supporttickets/write */ - action?: string; - /** the role of the user. For instance: Subscription Admin */ - role?: string; - /** the scope. */ - scope?: string; -} - -/** The localizable string class. */ -export interface LocalizableString { - /** the invariant value. */ - value: string; - /** the locale specific value. */ - localizedValue?: string; -} - -/** The Http request info. */ -export interface HttpRequestInfo { - /** the client request id. */ - clientRequestId?: string; - /** the client Ip Address */ - clientIpAddress?: string; - /** the Http request method. */ - method?: string; - /** the Uri. */ - uri?: string; -} - -/** A collection of event categories. Currently possible values are: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. */ -export interface EventCategoryCollection { - /** the list that includes the Azure event categories. */ - value: LocalizableString[]; -} - -/** Represents collection of metric definitions. */ -export interface MetricDefinitionCollection { - /** the values for the metric definitions. */ - value: MetricDefinition[]; -} - -/** Metric definition class specifies the metadata for a metric. */ -export interface MetricDefinition { - /** Flag to indicate whether the dimension is required. */ - isDimensionRequired?: boolean; - /** the resource identifier of the resource that emitted the metric. */ - resourceId?: string; - /** the namespace the metric belongs to. */ - namespace?: string; - /** the name and the display name of the metric, i.e. it is a localizable string. */ - name?: LocalizableString; - /** Detailed description of this metric. */ - displayDescription?: string; - /** Custom category name for this metric. */ - category?: string; - /** The class of the metric. */ - metricClass?: MetricClass; - /** The unit of the metric. */ - unit?: MetricUnit; - /** the primary aggregation type value defining how to use the values for display. */ - primaryAggregationType?: AggregationType; - /** the collection of what aggregation types are supported. */ - supportedAggregationTypes?: AggregationType[]; - /** the collection of what aggregation intervals are available to be queried. */ - metricAvailabilities?: MetricAvailability[]; - /** the resource identifier of the metric definition. */ - id?: string; - /** the name and the display name of the dimension, i.e. it is a localizable string. */ - dimensions?: LocalizableString[]; -} - -/** Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. */ -export interface MetricAvailability { - /** the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. */ - timeGrain?: string; - /** the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. */ - retention?: string; -} - -/** The response to a metrics query. */ -export interface Response { - /** The integer value representing the relative cost of the query. */ - cost?: number; - /** The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. */ - timespan: string; - /** The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. */ - interval?: string; - /** The namespace of the metrics being queried */ - namespace?: string; - /** The region of the resource being queried for metrics. */ - resourceregion?: string; - /** the value of the collection. */ - value: Metric[]; -} - -/** The result data of a query. */ -export interface Metric { - /** the metric Id. */ - id: string; - /** the resource type of the metric resource. */ - type: string; - /** the name and the display name of the metric, i.e. it is localizable string. */ - name: LocalizableString; - /** Detailed description of this metric. */ - displayDescription?: string; - /** 'Success' or the error details on query failures for this metric. */ - errorCode?: string; - /** Error message encountered querying this specific metric. */ - errorMessage?: string; - /** The unit of the metric. */ - unit: MetricUnit; - /** the time series returned when a data query is performed. */ - timeseries: TimeSeriesElement[]; -} - -/** A time series result type. The discriminator value is always TimeSeries in this case. */ -export interface TimeSeriesElement { - /** the metadata values returned if $filter was specified in the call. */ - metadatavalues?: MetadataValue[]; - /** An array of data points representing the metric values. This is only returned if a result type of data is specified. */ - data?: MetricValue[]; -} - -/** Represents a metric metadata value. */ -export interface MetadataValue { - /** the name of the metadata. */ - name?: LocalizableString; - /** the value of the metadata. */ - value?: string; -} - -/** Represents a metric value. */ -export interface MetricValue { - /** the timestamp for the metric value in ISO 8601 format. */ - timeStamp: Date; - /** the average value in the time range. */ - average?: number; - /** the least value in the time range. */ - minimum?: number; - /** the greatest value in the time range. */ - maximum?: number; - /** the sum of all of the values in the time range. */ - total?: number; - /** the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. */ - count?: number; -} - -/** A list of metric baselines. */ -export interface MetricBaselinesResponse { - /** The list of metric baselines. */ - value?: SingleMetricBaseline[]; -} - -/** The baseline results of a single metric. */ -export interface SingleMetricBaseline { - /** The metric baseline Id. */ - id: string; - /** The resource type of the metric baseline resource. */ - type: string; - /** The name of the metric for which the baselines were retrieved. */ - name: string; - /** The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. */ - timespan: string; - /** The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. */ - interval: string; - /** The namespace of the metrics been queried. */ - namespace?: string; - /** The baseline for each time series that was queried. */ - baselines: TimeSeriesBaseline[]; -} - -/** The baseline values for a single time series. */ -export interface TimeSeriesBaseline { - /** The aggregation type of the metric. */ - aggregation: string; - /** The dimensions of this time series. */ - dimensions?: MetricSingleDimension[]; - /** The list of timestamps of the baselines. */ - timestamps: Date[]; - /** The baseline values for each sensitivity. */ - data: SingleBaseline[]; - /** The baseline metadata values. */ - metadataValues?: BaselineMetadata[]; -} - -/** The metric dimension name and value. */ -export interface MetricSingleDimension { - /** Name of the dimension. */ - name: string; - /** Value of the dimension. */ - value: string; -} - -/** The baseline values for a single sensitivity value. */ -export interface SingleBaseline { - /** the sensitivity of the baseline. */ - sensitivity: BaselineSensitivity; - /** The low thresholds of the baseline. */ - lowThresholds: number[]; - /** The high thresholds of the baseline. */ - highThresholds: number[]; -} - -/** Represents a baseline metadata value. */ -export interface BaselineMetadata { - /** Name of the baseline metadata. */ - name: string; - /** Value of the baseline metadata. */ - value: string; -} - -/** Represents a collection of alert rule resources. */ -export interface MetricAlertResourceCollection { - /** the values for the alert rule resources. */ - value?: MetricAlertResource[]; -} - -/** The rule criteria that defines the conditions of the alert rule. */ -export interface MetricAlertCriteria { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: - | "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" - | "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" - | "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"; - /** Describes unknown properties. The value of an unknown property can be of "any" type. */ - [property: string]: any; -} - -/** An alert action. */ -export interface MetricAlertAction { - /** the id of the action group to use. */ - actionGroupId?: string; - /** This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook. */ - webHookProperties?: { [propertyName: string]: string }; + readonly actionType?: ActionType; } -/** An azure resource object */ -export interface ResourceAutoGenerated4 { - /** - * Azure resource Id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; +/** Localized display information for this particular operation. */ +export interface OperationDisplay { /** - * Azure resource name + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly provider?: string; /** - * Azure resource type + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; - /** Resource location */ - location: string; - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - -/** The metric alert resource for patch operations. */ -export interface MetricAlertResourcePatch { - /** Resource tags */ - tags?: { [propertyName: string]: string }; - /** the description of the metric alert that will be included in the alert email. */ - description?: string; - /** Alert severity {0, 1, 2, 3, 4} */ - severity?: number; - /** the flag that indicates whether the metric alert is enabled. */ - enabled?: boolean; - /** the list of resource id's that this metric alert is scoped to. */ - scopes?: string[]; - /** how often the metric alert is evaluated represented in ISO 8601 duration format. */ - evaluationFrequency?: string; - /** the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. */ - windowSize?: string; - /** the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. */ - targetResourceType?: string; - /** the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. */ - targetResourceRegion?: string; - /** defines the specific alert criteria information. */ - criteria?: MetricAlertCriteriaUnion; - /** the flag that indicates whether the alert should be auto resolved or not. The default is true. */ - autoMitigate?: boolean; - /** the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. */ - actions?: MetricAlertAction[]; + readonly resource?: string; /** - * Last time the rule was updated in ISO8601 format. + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastUpdatedTime?: Date; + readonly operation?: string; /** - * the value indicating whether this alert rule is migrated. + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isMigrated?: boolean; + readonly description?: string; } -/** Represents a collection of alert rule resources. */ -export interface MetricAlertStatusCollection { - /** the values for the alert rule resources. */ - value?: MetricAlertStatus[]; -} +/** Resource properties */ +export interface AzureMonitorWorkspaceResourceProperties + extends AzureMonitorWorkspace {} -/** An alert status. */ -export interface MetricAlertStatus { - /** The status name. */ - name?: string; - /** The alert rule arm id. */ - id?: string; - /** The extended resource type name. */ - type?: string; - /** The alert status properties of the metric alert status. */ - properties?: MetricAlertStatusProperties; -} +/** Information about metrics for the Azure Monitor workspace */ +export interface AzureMonitorWorkspaceMetrics extends Metrics {} -/** An alert status properties. */ -export interface MetricAlertStatusProperties { - /** An object describing the type of the dimensions. */ - dimensions?: { [propertyName: string]: string }; - /** status value */ - status?: string; - /** UTC time when the status was checked. */ - timestamp?: Date; -} +/** The Data Collection Rule and Endpoint used for ingestion by default. */ +export interface AzureMonitorWorkspaceDefaultIngestionSettings + extends IngestionSettings {} -/** Represents a collection of scheduled query rule resources. */ -export interface ScheduledQueryRuleResourceCollection { - /** The values for the scheduled query rule resources. */ - value?: ScheduledQueryRuleResource[]; - /** - * Provides the link to retrieve the next set of elements. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} +/** The properties of the private endpoint connection */ +export interface PrivateEndpointConnectionProperties + extends PrivateEndpointConnectionPropertiesAutoGenerated {} -/** The scheduled query rule resource. */ -export interface ScheduledQueryRuleResource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The identity of the resource. */ - identity?: Identity; +/** Gets or sets the private endpoint which the connection belongs to */ +export interface PrivateEndpointConnectionPropertiesPrivateEndpoint + extends PrivateEndpoint {} + +/** Gets or sets connection state of the private endpoint connection */ +export interface PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + extends PrivateLinkServiceConnectionState {} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The geo-location where the resource lives */ location: string; - /** Indicates the type of scheduled query rule. The default is LogAlert. */ - kind?: Kind; +} + +/** An Azure Monitor Workspace definition */ +export interface AzureMonitorWorkspaceResource extends TrackedResource { /** - * The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + * Resource entity tag (ETag) * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly etag?: string; /** - * SystemData of ScheduledQueryRule. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** - * The api-version used when creating this alert rule - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdWithApiVersion?: string; - /** - * True if alert rule is legacy Log Analytic rule + * The immutable ID of the Azure Monitor workspace. This property is read-only. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isLegacyLogAnalyticsRule?: boolean; - /** The description of the scheduled query rule. */ - description?: string; - /** The display name of the alert rule */ - displayName?: string; - /** Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert. */ - severity?: AlertSeverity; - /** The flag which indicates whether this scheduled query rule is enabled. Value should be true or false */ - enabled?: boolean; - /** This determines if traffic is allowed over public network. By default it is enabled. */ - publicNetworkAccess?: PublicNetworkAccess; - /** The list of resource id's that this scheduled query rule is scoped to. */ - scopes?: string[]; - /** How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert. */ - evaluationFrequency?: string; - /** The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert. */ - windowSize?: string; - /** If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. */ - overrideQueryTimeRange?: string; - /** List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert */ - targetResourceTypes?: string[]; - /** The rule criteria that defines the conditions of the scheduled query rule. */ - criteria?: ScheduledQueryRuleCriteria; - /** Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert. */ - muteActionsDuration?: string; - /** Actions to invoke when the alert fires. */ - actions?: Actions; + readonly accountId?: string; /** - * The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false. + * Information about metrics for the Azure Monitor workspace * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isWorkspaceAlertsStorageConfigured?: boolean; - /** The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind LogAlert. */ - checkWorkspaceAlertsStorageConfigured?: boolean; - /** The flag which indicates whether the provided query should be validated or not. The default is false. Relevant only for rules of the kind LogAlert. */ - skipQueryValidation?: boolean; - /** The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of the kind LogAlert. */ - autoMitigate?: boolean; - /** Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. */ - ruleResolveConfiguration?: RuleResolveConfiguration; -} - -/** Identity for the resource. */ -export interface Identity { + readonly metrics?: AzureMonitorWorkspaceMetrics; /** - * The principal ID of resource identity. + * The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly provisioningState?: ProvisioningState; /** - * The tenant ID of resource. + * The Data Collection Rule and Endpoint used for ingestion by default. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; - /** Type of managed service identity. */ - type: IdentityType; - /** The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; -} - -/** User assigned identity properties. */ -export interface UserIdentityProperties { + readonly defaultIngestionSettings?: AzureMonitorWorkspaceDefaultIngestionSettings; /** - * The principal id of user assigned identity. + * List of private endpoint connections * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; /** - * The client id of user assigned identity. + * Gets or sets allow or disallow public network access to workspace * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clientId?: string; -} - -/** The rule criteria that defines the conditions of the scheduled query rule. */ -export interface ScheduledQueryRuleCriteria { - /** A list of conditions to evaluate against the specified scopes */ - allOf?: Condition[]; -} - -/** A condition of the scheduled query rule. */ -export interface Condition { - /** Log query alert */ - query?: string; - /** Aggregation type. Relevant and required only for rules of the kind LogAlert. */ - timeAggregation?: TimeAggregation; - /** The column containing the metric measure number. Relevant only for rules of the kind LogAlert. */ - metricMeasureColumn?: string; - /** The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert. */ - resourceIdColumn?: string; - /** List of Dimensions conditions */ - dimensions?: Dimension[]; - /** The criteria operator. Relevant and required only for rules of the kind LogAlert. */ - operator?: ConditionOperator; - /** the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert. */ - threshold?: number; - /** The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert. */ - failingPeriods?: ConditionFailingPeriods; - /** The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric. */ - metricName?: string; + readonly publicNetworkAccess?: PublicNetworkAccess; } -/** Dimension splitting and filtering definition */ -export interface Dimension { - /** Name of the dimension */ - name: string; - /** Operator for dimension values */ - operator: DimensionOperator; - /** List of dimension values */ - values: string[]; +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Creating */ + Creating = "Creating", + /** Succeeded */ + Succeeded = "Succeeded", + /** Deleting */ + Deleting = "Deleting", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled" } -/** The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert. */ -export interface ConditionFailingPeriods { - /** The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1 */ - numberOfEvaluationPeriods?: number; - /** The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1 */ - minFailingPeriodsToAlert?: number; -} +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Succeeded** \ + * **Deleting** \ + * **Failed** \ + * **Canceled** + */ +export type ProvisioningState = string; -/** Actions to invoke when the alert fires. */ -export interface Actions { - /** Action Group resource Ids to invoke when the alert fires. */ - actionGroups?: string[]; - /** The properties of an alert payload. */ - customProperties?: { [propertyName: string]: string }; +/** Known values of {@link Status} that the service accepts. */ +export enum KnownStatus { + /** Approved */ + Approved = "Approved", + /** Rejected */ + Rejected = "Rejected", + /** Removed */ + Removed = "Removed" } -/** TBD. Relevant only for rules of the kind LogAlert. */ -export interface RuleResolveConfiguration { - /** The flag that indicates whether or not to auto resolve a fired alert. */ - autoResolved?: boolean; - /** The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format. */ - timeToResolve?: string; -} +/** + * Defines values for Status. \ + * {@link KnownStatus} can be used interchangeably with Status, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Approved** \ + * **Rejected** \ + * **Removed** + */ +export type Status = string; -/** Describes the format of Error response. */ -export interface ErrorContract { - /** The error details. */ - error?: ErrorResponseDetails; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */ -export interface ErrorResponseDetails { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorResponseDetails[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorResponseAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorResponseAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** The scheduled query rule resource for patch operations. */ -export interface ScheduledQueryRuleResourcePatch { - /** The identity of the resource. */ - identity?: Identity; - /** Resource tags */ - tags?: { [propertyName: string]: string }; - /** - * The api-version used when creating this alert rule - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdWithApiVersion?: string; - /** - * True if alert rule is legacy Log Analytic rule - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isLegacyLogAnalyticsRule?: boolean; - /** The description of the scheduled query rule. */ - description?: string; - /** The display name of the alert rule */ - displayName?: string; - /** Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert. */ - severity?: AlertSeverity; - /** The flag which indicates whether this scheduled query rule is enabled. Value should be true or false */ - enabled?: boolean; - /** This determines if traffic is allowed over public network. By default it is enabled. */ - publicNetworkAccess?: PublicNetworkAccess; - /** The list of resource id's that this scheduled query rule is scoped to. */ - scopes?: string[]; - /** How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert. */ - evaluationFrequency?: string; - /** The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert. */ - windowSize?: string; - /** If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. */ - overrideQueryTimeRange?: string; - /** List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert */ - targetResourceTypes?: string[]; - /** The rule criteria that defines the conditions of the scheduled query rule. */ - criteria?: ScheduledQueryRuleCriteria; - /** Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert. */ - muteActionsDuration?: string; - /** Actions to invoke when the alert fires. */ - actions?: Actions; - /** - * The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isWorkspaceAlertsStorageConfigured?: boolean; - /** The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind LogAlert. */ - checkWorkspaceAlertsStorageConfigured?: boolean; - /** The flag which indicates whether the provided query should be validated or not. The default is false. Relevant only for rules of the kind LogAlert. */ - skipQueryValidation?: boolean; - /** The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of the kind LogAlert. */ - autoMitigate?: boolean; - /** Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. */ - ruleResolveConfiguration?: RuleResolveConfiguration; -} - -/** Represents collection of metric namespaces. */ -export interface MetricNamespaceCollection { - /** The values for the metric namespaces. */ - value: MetricNamespace[]; -} - -/** Metric namespace class specifies the metadata for a metric namespace. */ -export interface MetricNamespace { - /** The ID of the metric namespace. */ - id?: string; - /** The type of the namespace. */ - type?: string; - /** The escaped name of the namespace. */ - name?: string; - /** Kind of namespace */ - classification?: NamespaceClassification; - /** Properties which include the fully qualified namespace name. */ - properties?: MetricNamespaceName; -} - -/** The fully qualified metric namespace name. */ -export interface MetricNamespaceName { - /** The metric namespace name. */ - metricNamespaceName?: string; -} - -/** Information about a container with data for a given resource. */ -export interface DataContainer { - /** Log Analytics workspace information. */ - workspace: WorkspaceInfo; -} - -/** Information about a Log Analytics Workspace. */ -export interface WorkspaceInfo { - /** Azure Resource Manager identifier of the Log Analytics Workspace. */ - id: string; - /** Location of the Log Analytics workspace. */ - location: string; - /** Log Analytics workspace identifier. */ - customerId: string; -} - -/** An azure resource object */ -export interface ProxyResource { - /** - * Azure resource Id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Azure resource name - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Azure resource type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - -/** An error response from the API. */ -export interface ResponseWithError { - /** Error information. */ - error: ErrorModel; -} - -/** Error details. */ -export interface ErrorModel { - /** Error code identifying the specific error. */ - code: string; - /** Error message in the caller's locale. */ - message?: string; -} - -/** Describes the list of Azure Monitor PrivateLinkScope resources. */ -export interface AzureMonitorPrivateLinkScopeListResult { - /** List of Azure Monitor PrivateLinkScope definitions. */ - value: AzureMonitorPrivateLinkScope[]; - /** The URI to get the next set of Azure Monitor PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set. */ - nextLink?: string; -} - -/** The Private Endpoint resource. */ -export interface PrivateEndpoint { - /** - * The ARM identifier for Private Endpoint - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; -} - -/** A collection of information about the state of the connection between service consumer and provider. */ -export interface PrivateLinkServiceConnectionState { - /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ - status?: PrivateEndpointServiceConnectionStatus; - /** The reason for approval/rejection of the connection. */ - description?: string; - /** A message indicating if changes on the service provider require any updates on the consumer. */ - actionsRequired?: string; -} - -/** Properties that define the scope private link mode settings. */ -export interface AccessModeSettings { - /** Specifies the default access mode of queries through associated private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. */ - queryAccessMode: AccessMode; - /** Specifies the default access mode of ingestion through associated private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. */ - ingestionAccessMode: AccessMode; - /** List of exclusions that override the default access mode settings for specific private endpoint connections. */ - exclusions?: AccessModeSettingsExclusion[]; -} - -/** Properties that define the scope private link mode settings exclusion item. This setting applies to a specific private endpoint connection and overrides the default settings for that private endpoint connection. */ -export interface AccessModeSettingsExclusion { - /** The private endpoint connection name associated to the private endpoint on which we want to apply the specific access mode settings. */ - privateEndpointConnectionName?: string; - /** Specifies the access mode of queries through the specified private endpoint connection in the exclusion. */ - queryAccessMode?: AccessMode; - /** Specifies the access mode of ingestion through the specified private endpoint connection in the exclusion. */ - ingestionAccessMode?: AccessMode; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface DefaultErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. */ -export interface TagsResource { - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - -/** The status of operation. */ -export interface OperationStatus { - /** The operation Id. */ - id?: string; - /** The operation name. */ - name?: string; - /** Start time of the job in standard ISO8601 format. */ - startTime?: Date; - /** End time of the job in standard ISO8601 format. */ - endTime?: Date; - /** The status of the operation. */ - status?: string; - /** The error detail of the operation if any. */ - error?: ErrorDetail; -} - -/** A list of private link resources */ -export interface PrivateLinkResourceListResult { - /** Array of private link resources */ - value?: PrivateLinkResource[]; -} - -/** List of private endpoint connection associated with the specified storage account */ -export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ - value?: PrivateEndpointConnection[]; -} - -/** A list of scoped resources in a private link scope. */ -export interface ScopedResourceListResult { - /** - * Array of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ScopedResource[]; - /** - * Link to retrieve next page of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** An Activity Log Alert rule condition that is met when all its member conditions are met. */ -export interface AlertRuleAllOfCondition { - /** The list of Activity Log Alert rule conditions. */ - allOf: AlertRuleAnyOfOrLeafCondition[]; +/** Known values of {@link PublicNetworkAccess} that the service accepts. */ +export enum KnownPublicNetworkAccess { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" } /** - * An Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event. - * This condition must contain 'field' and either 'equals' or 'containsAny'. + * Defines values for PublicNetworkAccess. \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** */ -export interface AlertRuleLeafCondition { - /** - * The name of the Activity Log event's field that this condition will examine. - * The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. - */ - field?: string; - /** The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. */ - equals?: string; - /** The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met. */ - containsAny?: string[]; -} - -/** A list of Activity Log Alert rule actions. */ -export interface ActionList { - /** The list of the Action Groups. */ - actionGroups?: ActionGroup[]; -} - -/** A pointer to an Azure Action Group. */ -export interface ActionGroup { - /** The resource ID of the Action Group. This cannot be null or empty. */ - actionGroupId: string; - /** the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. */ - webhookProperties?: { [propertyName: string]: string }; -} +export type PublicNetworkAccess = string; -/** An Azure resource object. */ -export interface AzureResourceAutoGenerated { - /** - * The resource Id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always be 'global'. */ - location?: string; - /** The tags of the resource. */ - tags?: { [propertyName: string]: string }; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" } -/** The error response. */ -export interface ErrorResponseAutoGenerated { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message indicating why the operation failed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; -} +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; -/** An Activity Log Alert rule object for the body of patch operations. */ -export interface AlertRulePatchObject { - /** The resource tags */ - tags?: { [propertyName: string]: string }; - /** Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated. */ - enabled?: boolean; +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system" } -/** A list of Activity Log Alert rules. */ -export interface AlertRuleList { - /** The list of Activity Log Alert rules. */ - value?: ActivityLogAlertResource[]; - /** Provides the link to retrieve the next set of elements. */ - nextLink?: string; -} +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; -/** A pageable list of resources. */ -export interface DataCollectionEndpointResourceListResult { - /** A list of resources. */ - value: DataCollectionEndpointResource[]; - /** The URL to use for getting the next set of results. */ - nextLink?: string; -} - -/** Definition of ARM tracked top level resource. */ -export interface DataCollectionEndpointResource { - /** The geo-location where the resource lives. */ - location: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The kind of the resource. */ - kind?: KnownDataCollectionEndpointResourceKind; - /** - * Fully qualified ID of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Resource entity tag (ETag). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: DataCollectionEndpointResourceSystemData; - /** Description of the data collection endpoint. */ - description?: string; - /** The immutable ID of this data collection endpoint resource. This property is READ-ONLY. */ - immutableId?: string; - /** The endpoint used by clients to access their configuration. */ - configurationAccess?: DataCollectionEndpointConfigurationAccess; - /** The endpoint used by clients to ingest logs. */ - logsIngestion?: DataCollectionEndpointLogsIngestion; - /** Network access control rules for the endpoints. */ - networkAcls?: DataCollectionEndpointNetworkAcls; - /** - * The resource provisioning state. This property is READ-ONLY. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: KnownDataCollectionEndpointProvisioningState; -} - -/** Definition of data collection endpoint. */ -export interface DataCollectionEndpoint { - /** Description of the data collection endpoint. */ - description?: string; - /** The immutable ID of this data collection endpoint resource. This property is READ-ONLY. */ - immutableId?: string; - /** The endpoint used by clients to access their configuration. */ - configurationAccess?: DataCollectionEndpointConfigurationAccess; - /** The endpoint used by clients to ingest logs. */ - logsIngestion?: DataCollectionEndpointLogsIngestion; - /** Network access control rules for the endpoints. */ - networkAcls?: DataCollectionEndpointNetworkAcls; - /** - * The resource provisioning state. This property is READ-ONLY. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: KnownDataCollectionEndpointProvisioningState; -} - -/** Definition of the endpoint used for accessing configuration. */ -export interface ConfigurationAccessEndpointSpec { - /** - * The endpoint. This property is READ-ONLY. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly endpoint?: string; -} - -/** Definition of the endpoint used for ingesting logs. */ -export interface LogsIngestionEndpointSpec { - /** - * The endpoint. This property is READ-ONLY. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly endpoint?: string; -} - -/** Definition of the network rules. */ -export interface NetworkRuleSet { - /** The configuration to set whether network access from public internet to the endpoints are allowed. */ - publicNetworkAccess?: KnownPublicNetworkAccessOptions; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponseCommonV2 { - /** The error object. */ - error?: ErrorDetail; -} - -/** Definition of ARM tracked top level resource properties for update operation. */ -export interface ResourceForUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** A pageable list of resources. */ -export interface DataCollectionRuleAssociationProxyOnlyResourceListResult { - /** A list of resources. */ - value: DataCollectionRuleAssociationProxyOnlyResource[]; - /** The URL to use for getting the next set of results. */ - nextLink?: string; -} - -/** Definition of generic ARM proxy resource. */ -export interface DataCollectionRuleAssociationProxyOnlyResource { - /** - * Fully qualified ID of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Resource entity tag (ETag). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: DataCollectionRuleAssociationProxyOnlyResourceSystemData; - /** Description of the association. */ - description?: string; - /** The resource ID of the data collection rule that is to be associated. */ - dataCollectionRuleId?: string; - /** The resource ID of the data collection endpoint that is to be associated. */ - dataCollectionEndpointId?: string; - /** - * The resource provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: KnownDataCollectionRuleAssociationProvisioningState; - /** - * Metadata about the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly metadata?: DataCollectionRuleAssociationMetadata; -} - -/** Definition of association of a data collection rule with a monitored Azure resource. */ -export interface DataCollectionRuleAssociation { - /** Description of the association. */ - description?: string; - /** The resource ID of the data collection rule that is to be associated. */ - dataCollectionRuleId?: string; - /** The resource ID of the data collection endpoint that is to be associated. */ - dataCollectionEndpointId?: string; - /** - * The resource provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: KnownDataCollectionRuleAssociationProvisioningState; - /** - * Metadata about the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly metadata?: DataCollectionRuleAssociationMetadata; -} - -/** Metadata about the resource */ -export interface Metadata { - /** - * Azure offering managing this resource on-behalf-of customer. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisionedBy?: string; -} - -/** A pageable list of resources. */ -export interface DataCollectionRuleResourceListResult { - /** A list of resources. */ - value: DataCollectionRuleResource[]; - /** The URL to use for getting the next set of results. */ - nextLink?: string; -} - -/** Definition of ARM tracked top level resource. */ -export interface DataCollectionRuleResource { - /** The geo-location where the resource lives. */ - location: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The kind of the resource. */ - kind?: KnownDataCollectionRuleResourceKind; - /** - * Fully qualified ID of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Resource entity tag (ETag). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: DataCollectionRuleResourceSystemData; - /** Description of the data collection rule. */ - description?: string; - /** - * The immutable ID of this data collection rule. This property is READ-ONLY. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly immutableId?: string; - /** The resource ID of the data collection endpoint that this rule can be used with. */ - dataCollectionEndpointId?: string; - /** - * Metadata about the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly metadata?: DataCollectionRuleMetadata; - /** Declaration of custom streams used in this rule. */ - streamDeclarations?: { [propertyName: string]: StreamDeclaration }; - /** - * The specification of data sources. - * This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - */ - dataSources?: DataCollectionRuleDataSources; - /** The specification of destinations. */ - destinations?: DataCollectionRuleDestinations; - /** The specification of data flows. */ - dataFlows?: DataFlow[]; - /** - * The resource provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: KnownDataCollectionRuleProvisioningState; -} - -/** Definition of what monitoring data to collect and where that data should be sent. */ -export interface DataCollectionRule { - /** Description of the data collection rule. */ - description?: string; - /** - * The immutable ID of this data collection rule. This property is READ-ONLY. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly immutableId?: string; - /** The resource ID of the data collection endpoint that this rule can be used with. */ - dataCollectionEndpointId?: string; - /** - * Metadata about the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly metadata?: DataCollectionRuleMetadata; - /** Declaration of custom streams used in this rule. */ - streamDeclarations?: { [propertyName: string]: StreamDeclaration }; - /** - * The specification of data sources. - * This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - */ - dataSources?: DataCollectionRuleDataSources; - /** The specification of destinations. */ - destinations?: DataCollectionRuleDestinations; - /** The specification of data flows. */ - dataFlows?: DataFlow[]; - /** - * The resource provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: KnownDataCollectionRuleProvisioningState; -} - -/** Declaration of a custom stream. */ -export interface StreamDeclaration { - /** List of columns used by data in this stream. */ - columns?: ColumnDefinition[]; -} - -/** Definition of custom data column. */ -export interface ColumnDefinition { - /** The name of the column. */ - name?: string; - /** The type of the column data. */ - type?: KnownColumnDefinitionType; -} - -/** Specification of data sources that will be collected. */ -export interface DataSourcesSpec { - /** The list of performance counter data source configurations. */ - performanceCounters?: PerfCounterDataSource[]; - /** The list of Windows Event Log data source configurations. */ - windowsEventLogs?: WindowsEventLogDataSource[]; - /** The list of Syslog data source configurations. */ - syslog?: SyslogDataSource[]; - /** The list of Azure VM extension data source configurations. */ - extensions?: ExtensionDataSource[]; - /** The list of Log files source configurations. */ - logFiles?: LogFilesDataSource[]; - /** The list of IIS logs source configurations. */ - iisLogs?: IisLogsDataSource[]; -} - -/** - * Definition of which performance counters will be collected and how they will be collected by this data collection rule. - * Collected from both Windows and Linux machines where the counter is present. - */ -export interface PerfCounterDataSource { - /** - * List of streams that this data source will be sent to. - * A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - */ - streams?: KnownPerfCounterDataSourceStreams[]; - /** The number of seconds between consecutive counter measurements (samples). */ - samplingFrequencyInSeconds?: number; - /** - * A list of specifier names of the performance counters you want to collect. - * Use a wildcard (*) to collect a counter for all instances. - * To get a list of performance counters on Windows, run the command 'typeperf'. - */ - counterSpecifiers?: string[]; - /** - * A friendly name for the data source. - * This name should be unique across all data sources (regardless of type) within the data collection rule. - */ - name?: string; -} - -/** - * Definition of which Windows Event Log events will be collected and how they will be collected. - * Only collected from Windows machines. - */ -export interface WindowsEventLogDataSource { - /** - * List of streams that this data source will be sent to. - * A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - */ - streams?: KnownWindowsEventLogDataSourceStreams[]; - /** A list of Windows Event Log queries in XPATH format. */ - xPathQueries?: string[]; - /** - * A friendly name for the data source. - * This name should be unique across all data sources (regardless of type) within the data collection rule. - */ - name?: string; -} - -/** - * Definition of which syslog data will be collected and how it will be collected. - * Only collected from Linux machines. - */ -export interface SyslogDataSource { - /** - * List of streams that this data source will be sent to. - * A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - */ - streams?: KnownSyslogDataSourceStreams[]; - /** The list of facility names. */ - facilityNames?: KnownSyslogDataSourceFacilityNames[]; - /** The log levels to collect. */ - logLevels?: KnownSyslogDataSourceLogLevels[]; - /** - * A friendly name for the data source. - * This name should be unique across all data sources (regardless of type) within the data collection rule. - */ - name?: string; +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal" } /** - * Definition of which data will be collected from a separate VM extension that integrates with the Azure Monitor Agent. - * Collected from either Windows and Linux machines, depending on which extension is defined. + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** */ -export interface ExtensionDataSource { - /** - * List of streams that this data source will be sent to. - * A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - */ - streams?: KnownExtensionDataSourceStreams[]; - /** The name of the VM extension. */ - extensionName: string; - /** The extension settings. The format is specific for particular extension. */ - extensionSettings?: Record; - /** The list of data sources this extension needs data from. */ - inputDataSources?: string[]; - /** - * A friendly name for the data source. - * This name should be unique across all data sources (regardless of type) within the data collection rule. - */ - name?: string; -} - -/** Definition of which custom log files will be collected by this data collection rule */ -export interface LogFilesDataSource { - /** - * List of streams that this data source will be sent to. - * A stream indicates what schema will be used for this data source - */ - streams: string[]; - /** File Patterns where the log files are located */ - filePatterns: string[]; - /** The data format of the log files */ - format: KnownLogFilesDataSourceFormat; - /** The log files specific settings. */ - settings?: LogFilesDataSourceSettings; - /** - * A friendly name for the data source. - * This name should be unique across all data sources (regardless of type) within the data collection rule. - */ - name?: string; -} - -/** Settings for different log file formats */ -export interface LogFileSettings { - /** Text settings */ - text?: LogFileSettingsText; -} - -/** Settings for text log files */ -export interface LogFileTextSettings { - /** One of the supported timestamp formats */ - recordStartTimestampFormat: KnownLogFileTextSettingsRecordStartTimestampFormat; -} - -/** Enables IIS logs to be collected by this data collection rule. */ -export interface IisLogsDataSource { - /** IIS streams */ - streams: string[]; - /** Absolute paths file location */ - logDirectories?: string[]; - /** - * A friendly name for the data source. - * This name should be unique across all data sources (regardless of type) within the data collection rule. - */ - name?: string; -} - -/** Specification of destinations that can be used in data flows. */ -export interface DestinationsSpec { - /** List of Log Analytics destinations. */ - logAnalytics?: LogAnalyticsDestination[]; - /** Azure Monitor Metrics destination. */ - azureMonitorMetrics?: DestinationsSpecAzureMonitorMetrics; -} - -/** Log Analytics destination. */ -export interface LogAnalyticsDestination { - /** The resource ID of the Log Analytics workspace. */ - workspaceResourceId?: string; - /** - * The Customer ID of the Log Analytics workspace. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly workspaceId?: string; - /** - * A friendly name for the destination. - * This name should be unique across all destinations (regardless of type) within the data collection rule. - */ - name?: string; -} - -/** Azure Monitor Metrics destination. */ -export interface AzureMonitorMetricsDestination { - /** - * A friendly name for the destination. - * This name should be unique across all destinations (regardless of type) within the data collection rule. - */ - name?: string; -} - -/** Definition of which streams are sent to which destinations. */ -export interface DataFlow { - /** List of streams for this data flow. */ - streams?: KnownDataFlowStreams[]; - /** List of destinations for this data flow. */ - destinations?: string[]; - /** The KQL query to transform stream data. */ - transformKql?: string; - /** The output stream of the transform. Only required if the transform changes data to a different stream. */ - outputStream?: string; -} - -/** A pageable list of resources */ -export interface AzureMonitorWorkspaceResourceListResult { - /** A list of resources */ - value: AzureMonitorWorkspaceResource[]; - /** The URL to use for getting the next set of results */ - nextLink?: string; -} - -/** Properties of an Azure Monitor workspace */ -export interface AzureMonitorWorkspace { - /** - * The immutable ID of the Azure Monitor workspace. This property is read-only. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly accountId?: string; - /** - * Information about metrics for the Azure Monitor workspace - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly metrics?: AzureMonitorWorkspaceMetrics; - /** - * The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The Data Collection Rule and Endpoint used for ingestion by default. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultIngestionSettings?: AzureMonitorWorkspaceDefaultIngestionSettings; -} - -/** Information about metrics for the workspace */ -export interface Metrics { - /** - * The Prometheus query endpoint for the workspace - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly prometheusQueryEndpoint?: string; - /** - * An internal identifier for the metrics container. Only to be used by the system - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly internalId?: string; -} - -/** Settings for data ingestion */ -export interface IngestionSettings { - /** - * The Azure resource Id of the default data collection rule for this workspace. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dataCollectionRuleResourceId?: string; - /** - * The Azure resource Id of the default data collection endpoint for this workspace. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dataCollectionEndpointResourceId?: string; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface ResourceAutoGenerated5 { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponseAutoGenerated2 { - /** The error object. */ - error?: ErrorDetailAutoGenerated; -} - -/** The error detail. */ -export interface ErrorDetailAutoGenerated { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetailAutoGenerated[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** Definition of ARM tracked top level resource properties for update operation */ -export interface AzureMonitorWorkspaceResourceForUpdate { - /** Resource tags */ - tags?: { [propertyName: string]: string }; -} - -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ -export interface OperationListResultAutoGenerated { - /** - * List of operations supported by the resource provider - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: OperationAutoGenerated[]; - /** - * URL to get the next set of operation list results (if there are any). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Details of a REST API operation, returned from the Resource Provider Operations API */ -export interface OperationAutoGenerated { - /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ - display?: OperationDisplayAutoGenerated; - /** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionType?: ActionType; -} - -/** Localized display information for this particular operation. */ -export interface OperationDisplayAutoGenerated { - /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; - /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; -} - -/** The claims for a rule management event data source. */ -export interface RuleManagementEventClaimsDataSource { - /** the email address. */ - emailAddress?: string; -} - -/** How the data that is collected should be combined over time. */ -export interface ManagementEventAggregationCondition { - /** the condition operator. */ - operator?: ConditionOperator; - /** The threshold value that activates the alert. */ - threshold?: number; - /** the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. */ - windowSize?: string; -} - -/** The types of conditions for a multi resource alert. */ -export interface MultiMetricCriteria { - /** Polymorphic discriminator, which specifies the different types this object can be */ - criterionType: "StaticThresholdCriterion" | "DynamicThresholdCriterion"; - /** Describes unknown properties. The value of an unknown property can be of "any" type. */ - [property: string]: any; - /** Name of the criteria. */ - name: string; - /** Name of the metric. */ - metricName: string; - /** Namespace of the metric. */ - metricNamespace?: string; - /** the criteria time aggregation types. */ - timeAggregation: AggregationTypeEnum; - /** List of dimension conditions. */ - dimensions?: MetricDimension[]; - /** Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. */ - skipMetricValidation?: boolean; -} - -/** Specifies a metric dimension. */ -export interface MetricDimension { - /** Name of the dimension. */ - name: string; - /** the dimension operator. Only 'Include' and 'Exclude' are supported */ - operator: string; - /** list of dimension values. */ - values: string[]; -} - -/** The minimum number of violations required within the selected lookback time window required to raise an alert. */ -export interface DynamicThresholdFailingPeriods { - /** The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. */ - numberOfEvaluationPeriods: number; - /** The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. */ - minFailingPeriodsToAlert: number; -} - -/** The autoscale setting resource. */ -export interface AutoscaleSettingResource extends Resource { - /** the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. */ - profiles: AutoscaleProfile[]; - /** the collection of notifications. */ - notifications?: AutoscaleNotification[]; - /** the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. */ - enabled?: boolean; - /** the predictive autoscale policy mode. */ - predictiveAutoscalePolicy?: PredictiveAutoscalePolicy; - /** the name of the autoscale setting. */ - namePropertiesName?: string; - /** the resource identifier of the resource that the autoscale setting should be added to. */ - targetResourceUri?: string; - /** the location of the resource that the autoscale setting should be added to. */ - targetResourceLocation?: string; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface DataCollectionEndpointResourceSystemData extends SystemData {} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface DataCollectionRuleAssociationProxyOnlyResourceSystemData - extends SystemData {} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface DataCollectionRuleResourceSystemData extends SystemData {} - -/** A rule condition based on a metric crossing a threshold. */ -export interface ThresholdRuleCondition extends RuleCondition { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"; - /** the operator used to compare the data and the threshold. */ - operator: ConditionOperator; - /** the threshold value that activates the alert. */ - threshold: number; - /** the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. */ - windowSize?: string; - /** the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric. */ - timeAggregation?: TimeAggregationOperator; -} - -/** A rule condition based on a certain number of locations failing. */ -export interface LocationThresholdRuleCondition extends RuleCondition { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"; - /** the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. */ - windowSize?: string; - /** the number of locations that must fail to activate the alert. */ - failedLocationCount: number; -} - -/** A management event rule condition. */ -export interface ManagementEventRuleCondition extends RuleCondition { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"; - /** How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. */ - aggregation?: ManagementEventAggregationCondition; -} - -/** A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. */ -export interface RuleMetricDataSource extends RuleDataSource { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"; - /** the name of the metric that defines what the rule monitors. */ - metricName?: string; -} - -/** A rule management event data source. The discriminator fields is always RuleManagementEventDataSource in this case. */ -export interface RuleManagementEventDataSource extends RuleDataSource { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"; - /** the event name. */ - eventName?: string; - /** the event source. */ - eventSource?: string; - /** the level. */ - level?: string; - /** The name of the operation that should be checked for. If no name is provided, any operation will match. */ - operationName?: string; - /** the resource group name. */ - resourceGroupName?: string; - /** the resource provider name. */ - resourceProviderName?: string; - /** The status of the operation that should be checked for. If no status is provided, any status will match. */ - status?: string; - /** the substatus. */ - subStatus?: string; - /** the claims. */ - claims?: RuleManagementEventClaimsDataSource; -} - -/** Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case. */ -export interface RuleEmailAction extends RuleAction { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction"; - /** Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated. */ - sendToServiceOwners?: boolean; - /** the list of administrator's custom email addresses to notify of the activation of the alert. */ - customEmails?: string[]; -} - -/** Specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case. */ -export interface RuleWebhookAction extends RuleAction { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"; - /** the service uri to Post the notification when the alert activates or resolves. */ - serviceUri?: string; - /** the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. */ - properties?: { [propertyName: string]: string }; -} - -/** The alert rule resource. */ -export interface AlertRuleResource extends ResourceAutoGenerated { - /** the name of the alert rule. */ - namePropertiesName: string; - /** the description of the alert rule that will be included in the alert email. */ - description?: string; - /** the provisioning state. */ - provisioningState?: string; - /** the flag that indicates whether the alert rule is enabled. */ - isEnabled: boolean; - /** the condition that results in the alert rule being activated. */ - condition: RuleConditionUnion; - /** action that is performed when the alert rule becomes active, and when an alert condition is resolved. */ - action?: RuleActionUnion; - /** the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. */ - actions?: RuleActionUnion[]; - /** - * Last time the rule was updated in ISO8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastUpdatedTime?: Date; -} - -/** The log profile resource. */ -export interface LogProfileResource extends ResourceAutoGenerated2 { - /** the resource id of the storage account to which you would like to send the Activity Log. */ - storageAccountId?: string; - /** The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'. */ - serviceBusRuleId?: string; - /** List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location. */ - locations: string[]; - /** the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.' */ - categories: string[]; - /** the retention policy for the events in the log. */ - retentionPolicy: RetentionPolicy; -} - -/** The diagnostic setting resource. */ -export interface DiagnosticSettingsResource extends ResourceAutoGenerated3 { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** The resource ID of the storage account to which you would like to send Diagnostic Logs. */ - storageAccountId?: string; - /** The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility. */ - serviceBusRuleId?: string; - /** The resource Id for the event hub authorization rule. */ - eventHubAuthorizationRuleId?: string; - /** The name of the event hub. If none is specified, the default event hub will be selected. */ - eventHubName?: string; - /** The list of metric settings. */ - metrics?: MetricSettings[]; - /** The list of logs settings. */ - logs?: LogSettings[]; - /** The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 */ - workspaceId?: string; - /** The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. */ - marketplacePartnerId?: string; - /** A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.) */ - logAnalyticsDestinationType?: string; -} - -/** The diagnostic settings category resource. */ -export interface DiagnosticSettingsCategoryResource - extends ResourceAutoGenerated3 { - /** - * The system metadata related to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** The type of the diagnostic settings category. */ - categoryType?: CategoryType; - /** the collection of what category groups are supported. */ - categoryGroups?: string[]; -} - -/** The Private Endpoint Connection resource. */ -export interface PrivateEndpointConnection extends ResourceAutoGenerated3 { - /** The resource of private end point. */ - privateEndpoint?: PrivateEndpoint; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: PrivateEndpointConnectionProvisioningState; -} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends ResourceAutoGenerated3 { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** A private link resource */ -export interface PrivateLinkResource extends ResourceAutoGenerated3 { - /** - * The private link resource group id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupId?: string; - /** - * The private link resource required member names. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredMembers?: string[]; - /** The private link resource Private link DNS zone name. */ - requiredZoneNames?: string[]; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResourceAutoGenerated extends ResourceAutoGenerated3 {} - -/** An action group resource. */ -export interface ActionGroupResource extends AzureResource { - /** The short name of the action group. This will be used in SMS messages. */ - groupShortName?: string; - /** Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. */ - enabled?: boolean; - /** The list of email receivers that are part of this action group. */ - emailReceivers?: EmailReceiver[]; - /** The list of SMS receivers that are part of this action group. */ - smsReceivers?: SmsReceiver[]; - /** The list of webhook receivers that are part of this action group. */ - webhookReceivers?: WebhookReceiver[]; - /** The list of ITSM receivers that are part of this action group. */ - itsmReceivers?: ItsmReceiver[]; - /** The list of AzureAppPush receivers that are part of this action group. */ - azureAppPushReceivers?: AzureAppPushReceiver[]; - /** The list of AutomationRunbook receivers that are part of this action group. */ - automationRunbookReceivers?: AutomationRunbookReceiver[]; - /** The list of voice receivers that are part of this action group. */ - voiceReceivers?: VoiceReceiver[]; - /** The list of logic app receivers that are part of this action group. */ - logicAppReceivers?: LogicAppReceiver[]; - /** The list of azure function receivers that are part of this action group. */ - azureFunctionReceivers?: AzureFunctionReceiver[]; - /** The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. */ - armRoleReceivers?: ArmRoleReceiver[]; - /** The list of event hub receivers that are part of this action group. */ - eventHubReceivers?: EventHubReceiver[]; -} - -/** Specifies the metric alert criteria for a single resource that has multiple metric criteria. */ -export interface MetricAlertSingleResourceMultipleMetricCriteria - extends MetricAlertCriteria { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"; - /** The list of metric criteria for this 'all of' operation. */ - allOf?: MetricCriteria[]; -} - -/** Specifies the metric alert rule criteria for a web test resource. */ -export interface WebtestLocationAvailabilityCriteria - extends MetricAlertCriteria { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria"; - /** The Application Insights web test Id. */ - webTestId: string; - /** The Application Insights resource Id. */ - componentId: string; - /** The number of failed locations. */ - failedLocationCount: number; -} - -/** Specifies the metric alert criteria for multiple resource that has multiple metric criteria. */ -export interface MetricAlertMultipleResourceMultipleMetricCriteria - extends MetricAlertCriteria { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"; - /** the list of multiple metric criteria for this 'all of' operation. */ - allOf?: MultiMetricCriteriaUnion[]; -} - -/** The metric alert resource. */ -export interface MetricAlertResource extends ResourceAutoGenerated4 { - /** the description of the metric alert that will be included in the alert email. */ - description?: string; - /** Alert severity {0, 1, 2, 3, 4} */ - severity: number; - /** the flag that indicates whether the metric alert is enabled. */ - enabled: boolean; - /** the list of resource id's that this metric alert is scoped to. */ - scopes: string[]; - /** how often the metric alert is evaluated represented in ISO 8601 duration format. */ - evaluationFrequency: string; - /** the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. */ - windowSize: string; - /** the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource. */ - targetResourceType?: string; - /** the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource. */ - targetResourceRegion?: string; - /** defines the specific alert criteria information. */ - criteria: MetricAlertCriteriaUnion; - /** the flag that indicates whether the alert should be auto resolved or not. The default is true. */ - autoMitigate?: boolean; - /** the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. */ - actions?: MetricAlertAction[]; - /** - * Last time the rule was updated in ISO8601 format. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastUpdatedTime?: Date; - /** - * the value indicating whether this alert rule is migrated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isMigrated?: boolean; -} - -/** VM Insights onboarding status for a resource. */ -export interface VMInsightsOnboardingStatus extends ProxyResource { - /** Azure Resource Manager identifier of the resource whose onboarding status is being represented. */ - resourceId?: string; - /** The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, is considered onboarded if at least one resource under it is onboarded. */ - onboardingStatus?: OnboardingStatus; - /** The status of VM Insights data from the resource. When reported as `present` the data array will contain information about the data containers to which data for the specified resource is being routed. */ - dataStatus?: DataStatus; - /** Containers that currently store VM Insights data for the specified resource. */ - data?: DataContainer[]; -} - -/** - * An Activity Log Alert rule condition that is met when all its member conditions are met. - * Each condition can be of one of the following types: - * __Important__: Each type has its unique subset of properties. Properties from different types CANNOT exist in one condition. - * * __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'. - * _Please note, 'anyOf' should __not__ be set in a Leaf Condition._ - * * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions). - * _Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf Condition._ - * - */ -export interface AlertRuleAnyOfOrLeafCondition extends AlertRuleLeafCondition { - /** An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met. */ - anyOf?: AlertRuleLeafCondition[]; -} - -/** An Activity Log Alert rule resource. */ -export interface ActivityLogAlertResource extends AzureResourceAutoGenerated { - /** A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item. */ - scopes?: string[]; - /** The condition that will cause this alert to activate. */ - condition?: AlertRuleAllOfCondition; - /** The actions that will activate when the condition is met. */ - actions?: ActionList; - /** Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated. */ - enabled?: boolean; - /** A description of this Activity Log Alert rule. */ - description?: string; -} - -/** Resource properties. */ -export interface DataCollectionEndpointResourceProperties - extends DataCollectionEndpoint {} - -/** The endpoint used by clients to access their configuration. */ -export interface DataCollectionEndpointConfigurationAccess - extends ConfigurationAccessEndpointSpec {} - -/** The endpoint used by clients to ingest logs. */ -export interface DataCollectionEndpointLogsIngestion - extends LogsIngestionEndpointSpec {} - -/** Network access control rules for the endpoints. */ -export interface DataCollectionEndpointNetworkAcls extends NetworkRuleSet {} - -/** Resource properties. */ -export interface DataCollectionRuleAssociationProxyOnlyResourceProperties - extends DataCollectionRuleAssociation {} - -/** Metadata about the resource */ -export interface DataCollectionRuleAssociationMetadata extends Metadata {} - -/** Metadata about the resource */ -export interface DataCollectionRuleMetadata extends Metadata {} - -/** Resource properties. */ -export interface DataCollectionRuleResourceProperties - extends DataCollectionRule {} - -/** - * The specification of data sources. - * This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - */ -export interface DataCollectionRuleDataSources extends DataSourcesSpec {} - -/** The log files specific settings. */ -export interface LogFilesDataSourceSettings extends LogFileSettings {} - -/** Text settings */ -export interface LogFileSettingsText extends LogFileTextSettings {} - -/** The specification of destinations. */ -export interface DataCollectionRuleDestinations extends DestinationsSpec {} - -/** Azure Monitor Metrics destination. */ -export interface DestinationsSpecAzureMonitorMetrics - extends AzureMonitorMetricsDestination {} - -/** Resource properties */ -export interface AzureMonitorWorkspaceResourceProperties - extends AzureMonitorWorkspace {} - -/** Information about metrics for the Azure Monitor workspace */ -export interface AzureMonitorWorkspaceMetrics extends Metrics {} - -/** The Data Collection Rule and Endpoint used for ingestion by default. */ -export interface AzureMonitorWorkspaceDefaultIngestionSettings - extends IngestionSettings {} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResourceAutoGenerated extends ResourceAutoGenerated5 { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** Criterion to filter metrics. */ -export interface MetricCriteria extends MultiMetricCriteria { - /** Polymorphic discriminator, which specifies the different types this object can be */ - criterionType: "StaticThresholdCriterion"; - /** the criteria operator. */ - operator: Operator; - /** the criteria threshold value that activates the alert. */ - threshold: number; -} - -/** Criterion for dynamic threshold. */ -export interface DynamicMetricCriteria extends MultiMetricCriteria { - /** Polymorphic discriminator, which specifies the different types this object can be */ - criterionType: "DynamicThresholdCriterion"; - /** The operator used to compare the metric value against the threshold. */ - operator: DynamicThresholdOperator; - /** The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. */ - alertSensitivity: DynamicThresholdSensitivity; - /** The minimum number of violations required within the selected lookback time window required to raise an alert. */ - failingPeriods: DynamicThresholdFailingPeriods; - /** Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format) */ - ignoreDataBefore?: Date; -} - -/** An Azure Monitor PrivateLinkScope definition. */ -export interface AzureMonitorPrivateLinkScope extends TrackedResource { - /** - * System data - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** - * Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * List of private endpoint connections. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - /** Access mode settings */ - accessModeSettings: AccessModeSettings; -} - -/** A private link scoped resource */ -export interface ScopedResource extends ProxyResourceAutoGenerated { - /** - * System data - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** The resource id of the scoped Azure monitor resource. */ - linkedResourceId?: string; - /** - * State of the private endpoint connection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** An Azure Monitor Workspace definition */ -export interface AzureMonitorWorkspaceResource - extends TrackedResourceAutoGenerated { - /** - * Resource entity tag (ETag) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The immutable ID of the Azure Monitor workspace. This property is read-only. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly accountId?: string; - /** - * Information about metrics for the Azure Monitor workspace - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly metrics?: AzureMonitorWorkspaceMetrics; - /** - * The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * The Data Collection Rule and Endpoint used for ingestion by default. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultIngestionSettings?: AzureMonitorWorkspaceDefaultIngestionSettings; -} - -/** Defines headers for ActionGroups_postTestNotifications operation. */ -export interface ActionGroupsPostTestNotificationsHeaders { - /** The location header that has the polling uri. */ - location?: string; -} - -/** Defines headers for ActionGroups_createNotificationsAtResourceGroupLevel operation. */ -export interface ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders { - /** The location header that has the polling uri. */ - location?: string; -} - -/** Defines headers for ActionGroups_createNotificationsAtActionGroupResourceLevel operation. */ -export interface ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders { - /** The location header that has the polling uri. */ - location?: string; -} - -/** Known values of {@link ScaleRuleMetricDimensionOperationType} that the service accepts. */ -export enum KnownScaleRuleMetricDimensionOperationType { - /** Equals */ - Equals = "Equals", - /** NotEquals */ - NotEquals = "NotEquals" -} - -/** - * Defines values for ScaleRuleMetricDimensionOperationType. \ - * {@link KnownScaleRuleMetricDimensionOperationType} can be used interchangeably with ScaleRuleMetricDimensionOperationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Equals** \ - * **NotEquals** - */ -export type ScaleRuleMetricDimensionOperationType = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - -/** Known values of {@link CategoryType} that the service accepts. */ -export enum KnownCategoryType { - /** Metrics */ - Metrics = "Metrics", - /** Logs */ - Logs = "Logs" -} - -/** - * Defines values for CategoryType. \ - * {@link KnownCategoryType} can be used interchangeably with CategoryType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Metrics** \ - * **Logs** - */ -export type CategoryType = string; - -/** Known values of {@link MetricClass} that the service accepts. */ -export enum KnownMetricClass { - /** Availability */ - Availability = "Availability", - /** Transactions */ - Transactions = "Transactions", - /** Errors */ - Errors = "Errors", - /** Latency */ - Latency = "Latency", - /** Saturation */ - Saturation = "Saturation" -} - -/** - * Defines values for MetricClass. \ - * {@link KnownMetricClass} can be used interchangeably with MetricClass, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Availability** \ - * **Transactions** \ - * **Errors** \ - * **Latency** \ - * **Saturation** - */ -export type MetricClass = string; - -/** Known values of {@link MetricUnit} that the service accepts. */ -export enum KnownMetricUnit { - /** Count */ - Count = "Count", - /** Bytes */ - Bytes = "Bytes", - /** Seconds */ - Seconds = "Seconds", - /** CountPerSecond */ - CountPerSecond = "CountPerSecond", - /** BytesPerSecond */ - BytesPerSecond = "BytesPerSecond", - /** Percent */ - Percent = "Percent", - /** MilliSeconds */ - MilliSeconds = "MilliSeconds", - /** ByteSeconds */ - ByteSeconds = "ByteSeconds", - /** Unspecified */ - Unspecified = "Unspecified", - /** Cores */ - Cores = "Cores", - /** MilliCores */ - MilliCores = "MilliCores", - /** NanoCores */ - NanoCores = "NanoCores", - /** BitsPerSecond */ - BitsPerSecond = "BitsPerSecond" -} - -/** - * Defines values for MetricUnit. \ - * {@link KnownMetricUnit} can be used interchangeably with MetricUnit, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Count** \ - * **Bytes** \ - * **Seconds** \ - * **CountPerSecond** \ - * **BytesPerSecond** \ - * **Percent** \ - * **MilliSeconds** \ - * **ByteSeconds** \ - * **Unspecified** \ - * **Cores** \ - * **MilliCores** \ - * **NanoCores** \ - * **BitsPerSecond** - */ -export type MetricUnit = string; - -/** Known values of {@link BaselineSensitivity} that the service accepts. */ -export enum KnownBaselineSensitivity { - /** Low */ - Low = "Low", - /** Medium */ - Medium = "Medium", - /** High */ - High = "High" -} - -/** - * Defines values for BaselineSensitivity. \ - * {@link KnownBaselineSensitivity} can be used interchangeably with BaselineSensitivity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Low** \ - * **Medium** \ - * **High** - */ -export type BaselineSensitivity = string; - -/** Known values of {@link Odatatype} that the service accepts. */ -export enum KnownOdatatype { - /** MicrosoftAzureMonitorSingleResourceMultipleMetricCriteria */ - MicrosoftAzureMonitorSingleResourceMultipleMetricCriteria = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", - /** MicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria */ - MicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - /** MicrosoftAzureMonitorWebtestLocationAvailabilityCriteria */ - MicrosoftAzureMonitorWebtestLocationAvailabilityCriteria = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" -} - -/** - * Defines values for Odatatype. \ - * {@link KnownOdatatype} can be used interchangeably with Odatatype, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria** \ - * **Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria** \ - * **Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria** - */ -export type Odatatype = string; - -/** Known values of {@link Kind} that the service accepts. */ -export enum KnownKind { - /** LogAlert */ - LogAlert = "LogAlert", - /** LogToMetric */ - LogToMetric = "LogToMetric" -} - -/** - * Defines values for Kind. \ - * {@link KnownKind} can be used interchangeably with Kind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **LogAlert** \ - * **LogToMetric** - */ -export type Kind = string; - -/** Known values of {@link AlertSeverity} that the service accepts. */ -export enum KnownAlertSeverity { - /** Zero */ - Zero = 0, - /** One */ - One = 1, - /** Two */ - Two = 2, - /** Three */ - Three = 3, - /** Four */ - Four = 4 -} - -/** - * Defines values for AlertSeverity. \ - * {@link KnownAlertSeverity} can be used interchangeably with AlertSeverity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **0** \ - * **1** \ - * **2** \ - * **3** \ - * **4** - */ -export type AlertSeverity = number; - -/** Known values of {@link PublicNetworkAccess} that the service accepts. */ -export enum KnownPublicNetworkAccess { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", - /** SecuredByPerimeter */ - SecuredByPerimeter = "SecuredByPerimeter" -} - -/** - * Defines values for PublicNetworkAccess. \ - * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** \ - * **SecuredByPerimeter** - */ -export type PublicNetworkAccess = string; - -/** Known values of {@link TimeAggregation} that the service accepts. */ -export enum KnownTimeAggregation { - /** Count */ - Count = "Count", - /** Average */ - Average = "Average", - /** Minimum */ - Minimum = "Minimum", - /** Maximum */ - Maximum = "Maximum", - /** Total */ - Total = "Total" -} - -/** - * Defines values for TimeAggregation. \ - * {@link KnownTimeAggregation} can be used interchangeably with TimeAggregation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Count** \ - * **Average** \ - * **Minimum** \ - * **Maximum** \ - * **Total** - */ -export type TimeAggregation = string; - -/** Known values of {@link DimensionOperator} that the service accepts. */ -export enum KnownDimensionOperator { - /** Include */ - Include = "Include", - /** Exclude */ - Exclude = "Exclude" -} - -/** - * Defines values for DimensionOperator. \ - * {@link KnownDimensionOperator} can be used interchangeably with DimensionOperator, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Include** \ - * **Exclude** - */ -export type DimensionOperator = string; - -/** Known values of {@link NamespaceClassification} that the service accepts. */ -export enum KnownNamespaceClassification { - /** Platform */ - Platform = "Platform", - /** Custom */ - Custom = "Custom", - /** Qos */ - Qos = "Qos" -} - -/** - * Defines values for NamespaceClassification. \ - * {@link KnownNamespaceClassification} can be used interchangeably with NamespaceClassification, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Platform** \ - * **Custom** \ - * **Qos** - */ -export type NamespaceClassification = string; - -/** Known values of {@link OnboardingStatus} that the service accepts. */ -export enum KnownOnboardingStatus { - /** Onboarded */ - Onboarded = "onboarded", - /** NotOnboarded */ - NotOnboarded = "notOnboarded", - /** Unknown */ - Unknown = "unknown" -} - -/** - * Defines values for OnboardingStatus. \ - * {@link KnownOnboardingStatus} can be used interchangeably with OnboardingStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **onboarded** \ - * **notOnboarded** \ - * **unknown** - */ -export type OnboardingStatus = string; - -/** Known values of {@link DataStatus} that the service accepts. */ -export enum KnownDataStatus { - /** Present */ - Present = "present", - /** NotPresent */ - NotPresent = "notPresent" -} - -/** - * Defines values for DataStatus. \ - * {@link KnownDataStatus} can be used interchangeably with DataStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **present** \ - * **notPresent** - */ -export type DataStatus = string; - -/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ -export enum KnownPrivateEndpointServiceConnectionStatus { - /** Pending */ - Pending = "Pending", - /** Approved */ - Approved = "Approved", - /** Rejected */ - Rejected = "Rejected" -} - -/** - * Defines values for PrivateEndpointServiceConnectionStatus. \ - * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Pending** \ - * **Approved** \ - * **Rejected** - */ -export type PrivateEndpointServiceConnectionStatus = string; - -/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ -export enum KnownPrivateEndpointConnectionProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Creating */ - Creating = "Creating", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed" -} - -/** - * Defines values for PrivateEndpointConnectionProvisioningState. \ - * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Creating** \ - * **Deleting** \ - * **Failed** - */ -export type PrivateEndpointConnectionProvisioningState = string; - -/** Known values of {@link AccessMode} that the service accepts. */ -export enum KnownAccessMode { - /** Open */ - Open = "Open", - /** PrivateOnly */ - PrivateOnly = "PrivateOnly" -} - -/** - * Defines values for AccessMode. \ - * {@link KnownAccessMode} can be used interchangeably with AccessMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Open** \ - * **PrivateOnly** - */ -export type AccessMode = string; - -/** Known values of {@link KnownPublicNetworkAccessOptions} that the service accepts. */ -export enum KnownKnownPublicNetworkAccessOptions { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled" -} - -/** - * Defines values for KnownPublicNetworkAccessOptions. \ - * {@link KnownKnownPublicNetworkAccessOptions} can be used interchangeably with KnownPublicNetworkAccessOptions, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type KnownPublicNetworkAccessOptions = string; - -/** Known values of {@link KnownDataCollectionEndpointProvisioningState} that the service accepts. */ -export enum KnownKnownDataCollectionEndpointProvisioningState { - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed" -} - -/** - * Defines values for KnownDataCollectionEndpointProvisioningState. \ - * {@link KnownKnownDataCollectionEndpointProvisioningState} can be used interchangeably with KnownDataCollectionEndpointProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Succeeded** \ - * **Failed** - */ -export type KnownDataCollectionEndpointProvisioningState = string; - -/** Known values of {@link KnownDataCollectionEndpointResourceKind} that the service accepts. */ -export enum KnownKnownDataCollectionEndpointResourceKind { - /** Linux */ - Linux = "Linux", - /** Windows */ - Windows = "Windows" -} - -/** - * Defines values for KnownDataCollectionEndpointResourceKind. \ - * {@link KnownKnownDataCollectionEndpointResourceKind} can be used interchangeably with KnownDataCollectionEndpointResourceKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Linux** \ - * **Windows** - */ -export type KnownDataCollectionEndpointResourceKind = string; - -/** Known values of {@link KnownDataCollectionRuleAssociationProvisioningState} that the service accepts. */ -export enum KnownKnownDataCollectionRuleAssociationProvisioningState { - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed" -} - -/** - * Defines values for KnownDataCollectionRuleAssociationProvisioningState. \ - * {@link KnownKnownDataCollectionRuleAssociationProvisioningState} can be used interchangeably with KnownDataCollectionRuleAssociationProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Succeeded** \ - * **Failed** - */ -export type KnownDataCollectionRuleAssociationProvisioningState = string; - -/** Known values of {@link KnownColumnDefinitionType} that the service accepts. */ -export enum KnownKnownColumnDefinitionType { - /** String */ - String = "string", - /** Int */ - Int = "int", - /** Long */ - Long = "long", - /** Real */ - Real = "real", - /** Boolean */ - Boolean = "boolean", - /** Datetime */ - Datetime = "datetime", - /** Dynamic */ - Dynamic = "dynamic" -} - -/** - * Defines values for KnownColumnDefinitionType. \ - * {@link KnownKnownColumnDefinitionType} can be used interchangeably with KnownColumnDefinitionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **string** \ - * **int** \ - * **long** \ - * **real** \ - * **boolean** \ - * **datetime** \ - * **dynamic** - */ -export type KnownColumnDefinitionType = string; - -/** Known values of {@link KnownPerfCounterDataSourceStreams} that the service accepts. */ -export enum KnownKnownPerfCounterDataSourceStreams { - /** MicrosoftPerf */ - MicrosoftPerf = "Microsoft-Perf", - /** MicrosoftInsightsMetrics */ - MicrosoftInsightsMetrics = "Microsoft-InsightsMetrics" -} - -/** - * Defines values for KnownPerfCounterDataSourceStreams. \ - * {@link KnownKnownPerfCounterDataSourceStreams} can be used interchangeably with KnownPerfCounterDataSourceStreams, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Microsoft-Perf** \ - * **Microsoft-InsightsMetrics** - */ -export type KnownPerfCounterDataSourceStreams = string; - -/** Known values of {@link KnownWindowsEventLogDataSourceStreams} that the service accepts. */ -export enum KnownKnownWindowsEventLogDataSourceStreams { - /** MicrosoftWindowsEvent */ - MicrosoftWindowsEvent = "Microsoft-WindowsEvent", - /** MicrosoftEvent */ - MicrosoftEvent = "Microsoft-Event" -} - -/** - * Defines values for KnownWindowsEventLogDataSourceStreams. \ - * {@link KnownKnownWindowsEventLogDataSourceStreams} can be used interchangeably with KnownWindowsEventLogDataSourceStreams, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Microsoft-WindowsEvent** \ - * **Microsoft-Event** - */ -export type KnownWindowsEventLogDataSourceStreams = string; - -/** Known values of {@link KnownSyslogDataSourceStreams} that the service accepts. */ -export enum KnownKnownSyslogDataSourceStreams { - /** MicrosoftSyslog */ - MicrosoftSyslog = "Microsoft-Syslog" -} - -/** - * Defines values for KnownSyslogDataSourceStreams. \ - * {@link KnownKnownSyslogDataSourceStreams} can be used interchangeably with KnownSyslogDataSourceStreams, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Microsoft-Syslog** - */ -export type KnownSyslogDataSourceStreams = string; - -/** Known values of {@link KnownSyslogDataSourceFacilityNames} that the service accepts. */ -export enum KnownKnownSyslogDataSourceFacilityNames { - /** Auth */ - Auth = "auth", - /** Authpriv */ - Authpriv = "authpriv", - /** Cron */ - Cron = "cron", - /** Daemon */ - Daemon = "daemon", - /** Kern */ - Kern = "kern", - /** Lpr */ - Lpr = "lpr", - /** Mail */ - Mail = "mail", - /** Mark */ - Mark = "mark", - /** News */ - News = "news", - /** Syslog */ - Syslog = "syslog", - /** User */ - User = "user", - /** Uucp */ - Uucp = "uucp", - /** Local0 */ - Local0 = "local0", - /** Local1 */ - Local1 = "local1", - /** Local2 */ - Local2 = "local2", - /** Local3 */ - Local3 = "local3", - /** Local4 */ - Local4 = "local4", - /** Local5 */ - Local5 = "local5", - /** Local6 */ - Local6 = "local6", - /** Local7 */ - Local7 = "local7", - /** Asterisk */ - Asterisk = "*" -} - -/** - * Defines values for KnownSyslogDataSourceFacilityNames. \ - * {@link KnownKnownSyslogDataSourceFacilityNames} can be used interchangeably with KnownSyslogDataSourceFacilityNames, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **auth** \ - * **authpriv** \ - * **cron** \ - * **daemon** \ - * **kern** \ - * **lpr** \ - * **mail** \ - * **mark** \ - * **news** \ - * **syslog** \ - * **user** \ - * **uucp** \ - * **local0** \ - * **local1** \ - * **local2** \ - * **local3** \ - * **local4** \ - * **local5** \ - * **local6** \ - * **local7** \ - * ***** - */ -export type KnownSyslogDataSourceFacilityNames = string; - -/** Known values of {@link KnownSyslogDataSourceLogLevels} that the service accepts. */ -export enum KnownKnownSyslogDataSourceLogLevels { - /** Debug */ - Debug = "Debug", - /** Info */ - Info = "Info", - /** Notice */ - Notice = "Notice", - /** Warning */ - Warning = "Warning", - /** Error */ - Error = "Error", - /** Critical */ - Critical = "Critical", - /** Alert */ - Alert = "Alert", - /** Emergency */ - Emergency = "Emergency", - /** Asterisk */ - Asterisk = "*" -} - -/** - * Defines values for KnownSyslogDataSourceLogLevels. \ - * {@link KnownKnownSyslogDataSourceLogLevels} can be used interchangeably with KnownSyslogDataSourceLogLevels, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Debug** \ - * **Info** \ - * **Notice** \ - * **Warning** \ - * **Error** \ - * **Critical** \ - * **Alert** \ - * **Emergency** \ - * ***** - */ -export type KnownSyslogDataSourceLogLevels = string; - -/** Known values of {@link KnownExtensionDataSourceStreams} that the service accepts. */ -export enum KnownKnownExtensionDataSourceStreams { - /** MicrosoftEvent */ - MicrosoftEvent = "Microsoft-Event", - /** MicrosoftInsightsMetrics */ - MicrosoftInsightsMetrics = "Microsoft-InsightsMetrics", - /** MicrosoftPerf */ - MicrosoftPerf = "Microsoft-Perf", - /** MicrosoftSyslog */ - MicrosoftSyslog = "Microsoft-Syslog", - /** MicrosoftWindowsEvent */ - MicrosoftWindowsEvent = "Microsoft-WindowsEvent" -} - -/** - * Defines values for KnownExtensionDataSourceStreams. \ - * {@link KnownKnownExtensionDataSourceStreams} can be used interchangeably with KnownExtensionDataSourceStreams, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Microsoft-Event** \ - * **Microsoft-InsightsMetrics** \ - * **Microsoft-Perf** \ - * **Microsoft-Syslog** \ - * **Microsoft-WindowsEvent** - */ -export type KnownExtensionDataSourceStreams = string; - -/** Known values of {@link KnownLogFilesDataSourceFormat} that the service accepts. */ -export enum KnownKnownLogFilesDataSourceFormat { - /** Text */ - Text = "text" -} - -/** - * Defines values for KnownLogFilesDataSourceFormat. \ - * {@link KnownKnownLogFilesDataSourceFormat} can be used interchangeably with KnownLogFilesDataSourceFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **text** - */ -export type KnownLogFilesDataSourceFormat = string; - -/** Known values of {@link KnownLogFileTextSettingsRecordStartTimestampFormat} that the service accepts. */ -export enum KnownKnownLogFileTextSettingsRecordStartTimestampFormat { - /** ISO8601 */ - ISO8601 = "ISO 8601", - /** YyyyMMDDHHMMSS */ - YyyyMMDDHHMMSS = "YYYY-MM-DD HH:MM:SS", - /** MDYyyyHHMMSSAMPM */ - MDYyyyHHMMSSAMPM = "M/D/YYYY HH:MM:SS AM/PM", - /** MonDDYyyyHHMMSS */ - MonDDYyyyHHMMSS = "Mon DD, YYYY HH:MM:SS", - /** YyMMddHHMmSs */ - YyMMddHHMmSs = "yyMMdd HH:mm:ss", - /** DdMMyyHHMmSs */ - DdMMyyHHMmSs = "ddMMyy HH:mm:ss", - /** MMMDHhMmSs */ - MMMDHhMmSs = "MMM d hh:mm:ss", - /** DdMMMYyyyHHMmSsZzz */ - DdMMMYyyyHHMmSsZzz = "dd/MMM/yyyy:HH:mm:ss zzz", - /** YyyyMMDdTHHMmSsK */ - YyyyMMDdTHHMmSsK = "yyyy-MM-ddTHH:mm:ssK" -} - -/** - * Defines values for KnownLogFileTextSettingsRecordStartTimestampFormat. \ - * {@link KnownKnownLogFileTextSettingsRecordStartTimestampFormat} can be used interchangeably with KnownLogFileTextSettingsRecordStartTimestampFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ISO 8601** \ - * **YYYY-MM-DD HH:MM:SS** \ - * **M\/D\/YYYY HH:MM:SS AM\/PM** \ - * **Mon DD, YYYY HH:MM:SS** \ - * **yyMMdd HH:mm:ss** \ - * **ddMMyy HH:mm:ss** \ - * **MMM d hh:mm:ss** \ - * **dd\/MMM\/yyyy:HH:mm:ss zzz** \ - * **yyyy-MM-ddTHH:mm:ssK** - */ -export type KnownLogFileTextSettingsRecordStartTimestampFormat = string; - -/** Known values of {@link KnownDataFlowStreams} that the service accepts. */ -export enum KnownKnownDataFlowStreams { - /** MicrosoftEvent */ - MicrosoftEvent = "Microsoft-Event", - /** MicrosoftInsightsMetrics */ - MicrosoftInsightsMetrics = "Microsoft-InsightsMetrics", - /** MicrosoftPerf */ - MicrosoftPerf = "Microsoft-Perf", - /** MicrosoftSyslog */ - MicrosoftSyslog = "Microsoft-Syslog", - /** MicrosoftWindowsEvent */ - MicrosoftWindowsEvent = "Microsoft-WindowsEvent" -} - -/** - * Defines values for KnownDataFlowStreams. \ - * {@link KnownKnownDataFlowStreams} can be used interchangeably with KnownDataFlowStreams, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Microsoft-Event** \ - * **Microsoft-InsightsMetrics** \ - * **Microsoft-Perf** \ - * **Microsoft-Syslog** \ - * **Microsoft-WindowsEvent** - */ -export type KnownDataFlowStreams = string; - -/** Known values of {@link KnownDataCollectionRuleProvisioningState} that the service accepts. */ -export enum KnownKnownDataCollectionRuleProvisioningState { - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed" -} - -/** - * Defines values for KnownDataCollectionRuleProvisioningState. \ - * {@link KnownKnownDataCollectionRuleProvisioningState} can be used interchangeably with KnownDataCollectionRuleProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Succeeded** \ - * **Failed** - */ -export type KnownDataCollectionRuleProvisioningState = string; - -/** Known values of {@link KnownDataCollectionRuleResourceKind} that the service accepts. */ -export enum KnownKnownDataCollectionRuleResourceKind { - /** Linux */ - Linux = "Linux", - /** Windows */ - Windows = "Windows" -} - -/** - * Defines values for KnownDataCollectionRuleResourceKind. \ - * {@link KnownKnownDataCollectionRuleResourceKind} can be used interchangeably with KnownDataCollectionRuleResourceKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Linux** \ - * **Windows** - */ -export type KnownDataCollectionRuleResourceKind = string; - -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Creating */ - Creating = "Creating", - /** Succeeded */ - Succeeded = "Succeeded", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled" -} - -/** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Succeeded** \ - * **Deleting** \ - * **Failed** \ - * **Canceled** - */ -export type ProvisioningState = string; - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system" -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal" -} - -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; - -/** Known values of {@link Operator} that the service accepts. */ -export enum KnownOperator { - /** Equals */ - Equals = "Equals", - /** GreaterThan */ - GreaterThan = "GreaterThan", - /** GreaterThanOrEqual */ - GreaterThanOrEqual = "GreaterThanOrEqual", - /** LessThan */ - LessThan = "LessThan", - /** LessThanOrEqual */ - LessThanOrEqual = "LessThanOrEqual" -} - -/** - * Defines values for Operator. \ - * {@link KnownOperator} can be used interchangeably with Operator, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Equals** \ - * **GreaterThan** \ - * **GreaterThanOrEqual** \ - * **LessThan** \ - * **LessThanOrEqual** - */ -export type Operator = string; - -/** Known values of {@link CriterionType} that the service accepts. */ -export enum KnownCriterionType { - /** StaticThresholdCriterion */ - StaticThresholdCriterion = "StaticThresholdCriterion", - /** DynamicThresholdCriterion */ - DynamicThresholdCriterion = "DynamicThresholdCriterion" -} - -/** - * Defines values for CriterionType. \ - * {@link KnownCriterionType} can be used interchangeably with CriterionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **StaticThresholdCriterion** \ - * **DynamicThresholdCriterion** - */ -export type CriterionType = string; - -/** Known values of {@link AggregationTypeEnum} that the service accepts. */ -export enum KnownAggregationTypeEnum { - /** Average */ - Average = "Average", - /** Count */ - Count = "Count", - /** Minimum */ - Minimum = "Minimum", - /** Maximum */ - Maximum = "Maximum", - /** Total */ - Total = "Total" -} - -/** - * Defines values for AggregationTypeEnum. \ - * {@link KnownAggregationTypeEnum} can be used interchangeably with AggregationTypeEnum, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Average** \ - * **Count** \ - * **Minimum** \ - * **Maximum** \ - * **Total** - */ -export type AggregationTypeEnum = string; - -/** Known values of {@link DynamicThresholdOperator} that the service accepts. */ -export enum KnownDynamicThresholdOperator { - /** GreaterThan */ - GreaterThan = "GreaterThan", - /** LessThan */ - LessThan = "LessThan", - /** GreaterOrLessThan */ - GreaterOrLessThan = "GreaterOrLessThan" -} - -/** - * Defines values for DynamicThresholdOperator. \ - * {@link KnownDynamicThresholdOperator} can be used interchangeably with DynamicThresholdOperator, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **GreaterThan** \ - * **LessThan** \ - * **GreaterOrLessThan** - */ -export type DynamicThresholdOperator = string; - -/** Known values of {@link DynamicThresholdSensitivity} that the service accepts. */ -export enum KnownDynamicThresholdSensitivity { - /** Low */ - Low = "Low", - /** Medium */ - Medium = "Medium", - /** High */ - High = "High" -} - -/** - * Defines values for DynamicThresholdSensitivity. \ - * {@link KnownDynamicThresholdSensitivity} can be used interchangeably with DynamicThresholdSensitivity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Low** \ - * **Medium** \ - * **High** - */ -export type DynamicThresholdSensitivity = string; -/** Defines values for MetricStatisticType. */ -export type MetricStatisticType = "Average" | "Min" | "Max" | "Sum" | "Count"; -/** Defines values for TimeAggregationType. */ -export type TimeAggregationType = - | "Average" - | "Minimum" - | "Maximum" - | "Total" - | "Count" - | "Last"; -/** Defines values for ComparisonOperationType. */ -export type ComparisonOperationType = - | "Equals" - | "NotEquals" - | "GreaterThan" - | "GreaterThanOrEqual" - | "LessThan" - | "LessThanOrEqual"; -/** Defines values for ScaleDirection. */ -export type ScaleDirection = "None" | "Increase" | "Decrease"; -/** Defines values for ScaleType. */ -export type ScaleType = - | "ChangeCount" - | "PercentChangeCount" - | "ExactCount" - | "ServiceAllowedNextValue"; -/** Defines values for RecurrenceFrequency. */ -export type RecurrenceFrequency = - | "None" - | "Second" - | "Minute" - | "Hour" - | "Day" - | "Week" - | "Month" - | "Year"; -/** Defines values for PredictiveAutoscalePolicyScaleMode. */ -export type PredictiveAutoscalePolicyScaleMode = - | "Disabled" - | "ForecastOnly" - | "Enabled"; -/** Defines values for ReceiverStatus. */ -export type ReceiverStatus = "NotSpecified" | "Enabled" | "Disabled"; -/** Defines values for EventLevel. */ -export type EventLevel = - | "Critical" - | "Error" - | "Warning" - | "Informational" - | "Verbose"; -/** Defines values for AggregationType. */ -export type AggregationType = - | "None" - | "Average" - | "Count" - | "Minimum" - | "Maximum" - | "Total"; -/** Defines values for ResultType. */ -export type ResultType = "Data" | "Metadata"; -/** Defines values for IdentityType. */ -export type IdentityType = "SystemAssigned" | "UserAssigned" | "None"; -/** Defines values for ConditionOperator. */ -export type ConditionOperator = - | "GreaterThan" - | "GreaterThanOrEqual" - | "LessThan" - | "LessThanOrEqual" - | "Equals"; -/** Defines values for TimeAggregationOperator. */ -export type TimeAggregationOperator = - | "Average" - | "Minimum" - | "Maximum" - | "Total" - | "Last"; - -/** Optional parameters. */ -export interface AutoscaleSettingsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type AutoscaleSettingsListByResourceGroupResponse = AutoscaleSettingResourceCollection; - -/** Optional parameters. */ -export interface AutoscaleSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type AutoscaleSettingsCreateOrUpdateResponse = AutoscaleSettingResource; - -/** Optional parameters. */ -export interface AutoscaleSettingsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface AutoscaleSettingsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AutoscaleSettingsGetResponse = AutoscaleSettingResource; - -/** Optional parameters. */ -export interface AutoscaleSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type AutoscaleSettingsUpdateResponse = AutoscaleSettingResource; - -/** Optional parameters. */ -export interface AutoscaleSettingsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type AutoscaleSettingsListBySubscriptionResponse = AutoscaleSettingResourceCollection; - -/** Optional parameters. */ -export interface AutoscaleSettingsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type AutoscaleSettingsListByResourceGroupNextResponse = AutoscaleSettingResourceCollection; - -/** Optional parameters. */ -export interface AutoscaleSettingsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type AutoscaleSettingsListBySubscriptionNextResponse = AutoscaleSettingResourceCollection; - -/** Optional parameters. */ -export interface PredictiveMetricGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PredictiveMetricGetResponse = PredictiveResponse; - -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface AlertRuleIncidentsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AlertRuleIncidentsGetResponse = Incident; - -/** Optional parameters. */ -export interface AlertRuleIncidentsListByAlertRuleOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByAlertRule operation. */ -export type AlertRuleIncidentsListByAlertRuleResponse = IncidentListResult; - -/** Optional parameters. */ -export interface AlertRulesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type AlertRulesCreateOrUpdateResponse = AlertRuleResource; - -/** Optional parameters. */ -export interface AlertRulesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface AlertRulesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AlertRulesGetResponse = AlertRuleResource; - -/** Optional parameters. */ -export interface AlertRulesUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type AlertRulesUpdateResponse = AlertRuleResource; - -/** Optional parameters. */ -export interface AlertRulesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type AlertRulesListByResourceGroupResponse = AlertRuleResourceCollection; - -/** Optional parameters. */ -export interface AlertRulesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type AlertRulesListBySubscriptionResponse = AlertRuleResourceCollection; - -/** Optional parameters. */ -export interface LogProfilesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface LogProfilesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LogProfilesGetResponse = LogProfileResource; - -/** Optional parameters. */ -export interface LogProfilesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type LogProfilesCreateOrUpdateResponse = LogProfileResource; - -/** Optional parameters. */ -export interface LogProfilesUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type LogProfilesUpdateResponse = LogProfileResource; - -/** Optional parameters. */ -export interface LogProfilesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LogProfilesListResponse = LogProfileCollection; - -/** Optional parameters. */ -export interface DiagnosticSettingsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DiagnosticSettingsGetResponse = DiagnosticSettingsResource; - -/** Optional parameters. */ -export interface DiagnosticSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type DiagnosticSettingsCreateOrUpdateResponse = DiagnosticSettingsResource; - -/** Optional parameters. */ -export interface DiagnosticSettingsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DiagnosticSettingsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type DiagnosticSettingsListResponse = DiagnosticSettingsResourceCollection; - -/** Optional parameters. */ -export interface DiagnosticSettingsCategoryGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DiagnosticSettingsCategoryGetResponse = DiagnosticSettingsCategoryResource; - -/** Optional parameters. */ -export interface DiagnosticSettingsCategoryListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type DiagnosticSettingsCategoryListResponse = DiagnosticSettingsCategoryResourceCollection; - -/** Optional parameters. */ -export interface ActionGroupsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ActionGroupsCreateOrUpdateResponse = ActionGroupResource; - -/** Optional parameters. */ -export interface ActionGroupsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ActionGroupsGetResponse = ActionGroupResource; - -/** Optional parameters. */ -export interface ActionGroupsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ActionGroupsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ActionGroupsUpdateResponse = ActionGroupResource; - -/** Optional parameters. */ -export interface ActionGroupsPostTestNotificationsOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the postTestNotifications operation. */ -export type ActionGroupsPostTestNotificationsResponse = TestNotificationDetailsResponse; - -/** Optional parameters. */ -export interface ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createNotificationsAtResourceGroupLevel operation. */ -export type ActionGroupsCreateNotificationsAtResourceGroupLevelResponse = TestNotificationDetailsResponse; - -/** Optional parameters. */ -export interface ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createNotificationsAtActionGroupResourceLevel operation. */ -export type ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse = TestNotificationDetailsResponse; - -/** Optional parameters. */ -export interface ActionGroupsGetTestNotificationsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getTestNotifications operation. */ -export type ActionGroupsGetTestNotificationsResponse = TestNotificationDetailsResponse; - -/** Optional parameters. */ -export interface ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getTestNotificationsAtResourceGroupLevel operation. */ -export type ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse = TestNotificationDetailsResponse; - -/** Optional parameters. */ -export interface ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getTestNotificationsAtActionGroupResourceLevel operation. */ -export type ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse = TestNotificationDetailsResponse; - -/** Optional parameters. */ -export interface ActionGroupsListBySubscriptionIdOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionId operation. */ -export type ActionGroupsListBySubscriptionIdResponse = ActionGroupList; - -/** Optional parameters. */ -export interface ActionGroupsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ActionGroupsListByResourceGroupResponse = ActionGroupList; - -/** Optional parameters. */ -export interface ActionGroupsEnableReceiverOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ActivityLogsListOptionalParams - extends coreClient.OperationOptions { - /** Used to fetch events with only the given properties.
The **$select** argument is a comma separated list of property names to be returned. Possible values are: *authorization*, *claims*, *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, *subStatus*, *subscriptionId* */ - select?: string; -} - -/** Contains response data for the list operation. */ -export type ActivityLogsListResponse = EventDataCollection; - -/** Optional parameters. */ -export interface ActivityLogsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ActivityLogsListNextResponse = EventDataCollection; - -/** Optional parameters. */ -export interface EventCategoriesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type EventCategoriesListResponse = EventCategoryCollection; - -/** Optional parameters. */ -export interface TenantActivityLogsListOptionalParams - extends coreClient.OperationOptions { - /** Used to fetch events with only the given properties.
The **$select** argument is a comma separated list of property names to be returned. Possible values are: *authorization*, *claims*, *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, *subStatus*, *subscriptionId* */ - select?: string; - /** Reduces the set of data collected.
The **$filter** is very restricted and allows only the following patterns.
- List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceGroupName eq ''.
- List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceUri eq ''.
- List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'.
- List events for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceProvider eq ''.
- List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq ''.
**NOTE**: No other syntax is allowed. */ - filter?: string; -} - -/** Contains response data for the list operation. */ -export type TenantActivityLogsListResponse = EventDataCollection; - -/** Optional parameters. */ -export interface TenantActivityLogsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type TenantActivityLogsListNextResponse = EventDataCollection; - -/** Optional parameters. */ -export interface MetricDefinitionsListOptionalParams - extends coreClient.OperationOptions { - /** Metric namespace to query metric definitions for. */ - metricnamespace?: string; -} - -/** Contains response data for the list operation. */ -export type MetricDefinitionsListResponse = MetricDefinitionCollection; - -/** Optional parameters. */ -export interface MetricsListOptionalParams extends coreClient.OperationOptions { - /** The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "** */ - filter?: string; - /** Metric namespace to query metric definitions for. */ - metricnamespace?: string; - /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */ - timespan?: string; - /** The interval (i.e. timegrain) of the query. */ - interval?: string; - /** The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'** */ - metricnames?: string; - /** The list of aggregation types (comma separated) to retrieve. */ - aggregation?: string; - /** - * The maximum number of records to retrieve. - * Valid only if $filter is specified. - * Defaults to 10. - */ - top?: number; - /** - * The aggregation to use for sorting results and the direction of the sort. - * Only one order can be specified. - * Examples: sum asc. - */ - orderby?: string; - /** Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. */ - resultType?: ResultType; -} - -/** Contains response data for the list operation. */ -export type MetricsListResponse = Response; - -/** Optional parameters. */ -export interface BaselinesListOptionalParams - extends coreClient.OperationOptions { - /** The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "** */ - filter?: string; - /** Metric namespace to query metric definitions for. */ - metricnamespace?: string; - /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */ - timespan?: string; - /** The interval (i.e. timegrain) of the query. */ - interval?: string; - /** The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'** */ - metricnames?: string; - /** The list of aggregation types (comma separated) to retrieve. */ - aggregation?: string; - /** Allows retrieving only metadata of the baseline. On data request all information is retrieved. */ - resultType?: ResultType; - /** The list of sensitivities (comma separated) to retrieve. */ - sensitivities?: string; -} - -/** Contains response data for the list operation. */ -export type BaselinesListResponse = MetricBaselinesResponse; - -/** Optional parameters. */ -export interface MetricAlertsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type MetricAlertsListBySubscriptionResponse = MetricAlertResourceCollection; - -/** Optional parameters. */ -export interface MetricAlertsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type MetricAlertsListByResourceGroupResponse = MetricAlertResourceCollection; - -/** Optional parameters. */ -export interface MetricAlertsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type MetricAlertsGetResponse = MetricAlertResource; - -/** Optional parameters. */ -export interface MetricAlertsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type MetricAlertsCreateOrUpdateResponse = MetricAlertResource; - -/** Optional parameters. */ -export interface MetricAlertsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type MetricAlertsUpdateResponse = MetricAlertResource; - -/** Optional parameters. */ -export interface MetricAlertsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface MetricAlertsStatusListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type MetricAlertsStatusListResponse = MetricAlertStatusCollection; - -/** Optional parameters. */ -export interface MetricAlertsStatusListByNameOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByName operation. */ -export type MetricAlertsStatusListByNameResponse = MetricAlertStatusCollection; - -/** Optional parameters. */ -export interface ScheduledQueryRulesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type ScheduledQueryRulesListBySubscriptionResponse = ScheduledQueryRuleResourceCollection; - -/** Optional parameters. */ -export interface ScheduledQueryRulesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ScheduledQueryRulesListByResourceGroupResponse = ScheduledQueryRuleResourceCollection; - -/** Optional parameters. */ -export interface ScheduledQueryRulesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ScheduledQueryRulesGetResponse = ScheduledQueryRuleResource; - -/** Optional parameters. */ -export interface ScheduledQueryRulesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ScheduledQueryRulesCreateOrUpdateResponse = ScheduledQueryRuleResource; - -/** Optional parameters. */ -export interface ScheduledQueryRulesUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ScheduledQueryRulesUpdateResponse = ScheduledQueryRuleResource; - -/** Optional parameters. */ -export interface ScheduledQueryRulesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ScheduledQueryRulesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ScheduledQueryRulesListBySubscriptionNextResponse = ScheduledQueryRuleResourceCollection; - -/** Optional parameters. */ -export interface ScheduledQueryRulesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ScheduledQueryRulesListByResourceGroupNextResponse = ScheduledQueryRuleResourceCollection; - -/** Optional parameters. */ -export interface MetricNamespacesListOptionalParams - extends coreClient.OperationOptions { - /** The ISO 8601 conform Date start time from which to query for metric namespaces. */ - startTime?: string; -} - -/** Contains response data for the list operation. */ -export type MetricNamespacesListResponse = MetricNamespaceCollection; - -/** Optional parameters. */ -export interface VMInsightsGetOnboardingStatusOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getOnboardingStatus operation. */ -export type VMInsightsGetOnboardingStatusResponse = VMInsightsOnboardingStatus; - -/** Optional parameters. */ -export interface PrivateLinkScopesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type PrivateLinkScopesListResponse = AzureMonitorPrivateLinkScopeListResult; - -/** Optional parameters. */ -export interface PrivateLinkScopesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type PrivateLinkScopesListByResourceGroupResponse = AzureMonitorPrivateLinkScopeListResult; - -/** Optional parameters. */ -export interface PrivateLinkScopesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface PrivateLinkScopesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateLinkScopesGetResponse = AzureMonitorPrivateLinkScope; - -/** Optional parameters. */ -export interface PrivateLinkScopesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type PrivateLinkScopesCreateOrUpdateResponse = AzureMonitorPrivateLinkScope; - -/** Optional parameters. */ -export interface PrivateLinkScopesUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type PrivateLinkScopesUpdateTagsResponse = AzureMonitorPrivateLinkScope; - -/** Optional parameters. */ -export interface PrivateLinkScopesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type PrivateLinkScopesListNextResponse = AzureMonitorPrivateLinkScopeListResult; - -/** Optional parameters. */ -export interface PrivateLinkScopesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type PrivateLinkScopesListByResourceGroupNextResponse = AzureMonitorPrivateLinkScopeListResult; - -/** Optional parameters. */ -export interface PrivateLinkScopeOperationStatusGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateLinkScopeOperationStatusGetResponse = OperationStatus; - -/** Optional parameters. */ -export interface PrivateLinkResourcesListByPrivateLinkScopeOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByPrivateLinkScope operation. */ -export type PrivateLinkResourcesListByPrivateLinkScopeResponse = PrivateLinkResourceListResult; - -/** Optional parameters. */ -export interface PrivateLinkResourcesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateLinkResourcesGetResponse = PrivateLinkResource; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByPrivateLinkScope operation. */ -export type PrivateEndpointConnectionsListByPrivateLinkScopeResponse = PrivateEndpointConnectionListResult; - -/** Optional parameters. */ -export interface PrivateLinkScopedResourcesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateLinkScopedResourcesGetResponse = ScopedResource; - -/** Optional parameters. */ -export interface PrivateLinkScopedResourcesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type PrivateLinkScopedResourcesCreateOrUpdateResponse = ScopedResource; - -/** Optional parameters. */ -export interface PrivateLinkScopedResourcesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByPrivateLinkScope operation. */ -export type PrivateLinkScopedResourcesListByPrivateLinkScopeResponse = ScopedResourceListResult; - -/** Optional parameters. */ -export interface PrivateLinkScopedResourcesListByPrivateLinkScopeNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByPrivateLinkScopeNext operation. */ -export type PrivateLinkScopedResourcesListByPrivateLinkScopeNextResponse = ScopedResourceListResult; - -/** Optional parameters. */ -export interface ActivityLogAlertsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ActivityLogAlertsCreateOrUpdateResponse = ActivityLogAlertResource; - -/** Optional parameters. */ -export interface ActivityLogAlertsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ActivityLogAlertsGetResponse = ActivityLogAlertResource; - -/** Optional parameters. */ -export interface ActivityLogAlertsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ActivityLogAlertsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ActivityLogAlertsUpdateResponse = ActivityLogAlertResource; - -/** Optional parameters. */ -export interface ActivityLogAlertsListBySubscriptionIdOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionId operation. */ -export type ActivityLogAlertsListBySubscriptionIdResponse = AlertRuleList; - -/** Optional parameters. */ -export interface ActivityLogAlertsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ActivityLogAlertsListByResourceGroupResponse = AlertRuleList; - -/** Optional parameters. */ -export interface ActivityLogAlertsListBySubscriptionIdNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionIdNext operation. */ -export type ActivityLogAlertsListBySubscriptionIdNextResponse = AlertRuleList; - -/** Optional parameters. */ -export interface ActivityLogAlertsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ActivityLogAlertsListByResourceGroupNextResponse = AlertRuleList; - -/** Optional parameters. */ -export interface DataCollectionEndpointsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type DataCollectionEndpointsListByResourceGroupResponse = DataCollectionEndpointResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionEndpointsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type DataCollectionEndpointsListBySubscriptionResponse = DataCollectionEndpointResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionEndpointsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DataCollectionEndpointsGetResponse = DataCollectionEndpointResource; - -/** Optional parameters. */ -export interface DataCollectionEndpointsCreateOptionalParams - extends coreClient.OperationOptions { - /** The payload */ - body?: DataCollectionEndpointResource; -} - -/** Contains response data for the create operation. */ -export type DataCollectionEndpointsCreateResponse = DataCollectionEndpointResource; - -/** Optional parameters. */ -export interface DataCollectionEndpointsUpdateOptionalParams - extends coreClient.OperationOptions { - /** The payload */ - body?: ResourceForUpdate; -} - -/** Contains response data for the update operation. */ -export type DataCollectionEndpointsUpdateResponse = DataCollectionEndpointResource; - -/** Optional parameters. */ -export interface DataCollectionEndpointsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DataCollectionEndpointsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type DataCollectionEndpointsListByResourceGroupNextResponse = DataCollectionEndpointResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionEndpointsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type DataCollectionEndpointsListBySubscriptionNextResponse = DataCollectionEndpointResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsListByResourceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResource operation. */ -export type DataCollectionRuleAssociationsListByResourceResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsListByRuleOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByRule operation. */ -export type DataCollectionRuleAssociationsListByRuleResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDataCollectionEndpoint operation. */ -export type DataCollectionRuleAssociationsListByDataCollectionEndpointResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DataCollectionRuleAssociationsGetResponse = DataCollectionRuleAssociationProxyOnlyResource; - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsCreateOptionalParams - extends coreClient.OperationOptions { - /** The payload */ - body?: DataCollectionRuleAssociationProxyOnlyResource; -} - -/** Contains response data for the create operation. */ -export type DataCollectionRuleAssociationsCreateResponse = DataCollectionRuleAssociationProxyOnlyResource; - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsListByResourceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceNext operation. */ -export type DataCollectionRuleAssociationsListByResourceNextResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsListByRuleNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByRuleNext operation. */ -export type DataCollectionRuleAssociationsListByRuleNextResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRuleAssociationsListByDataCollectionEndpointNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDataCollectionEndpointNext operation. */ -export type DataCollectionRuleAssociationsListByDataCollectionEndpointNextResponse = DataCollectionRuleAssociationProxyOnlyResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRulesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type DataCollectionRulesListByResourceGroupResponse = DataCollectionRuleResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRulesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type DataCollectionRulesListBySubscriptionResponse = DataCollectionRuleResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRulesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DataCollectionRulesGetResponse = DataCollectionRuleResource; - -/** Optional parameters. */ -export interface DataCollectionRulesCreateOptionalParams - extends coreClient.OperationOptions { - /** The payload */ - body?: DataCollectionRuleResource; -} - -/** Contains response data for the create operation. */ -export type DataCollectionRulesCreateResponse = DataCollectionRuleResource; - -/** Optional parameters. */ -export interface DataCollectionRulesUpdateOptionalParams - extends coreClient.OperationOptions { - /** The payload */ - body?: ResourceForUpdate; -} - -/** Contains response data for the update operation. */ -export type DataCollectionRulesUpdateResponse = DataCollectionRuleResource; - -/** Optional parameters. */ -export interface DataCollectionRulesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DataCollectionRulesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type DataCollectionRulesListByResourceGroupNextResponse = DataCollectionRuleResourceListResult; - -/** Optional parameters. */ -export interface DataCollectionRulesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type DataCollectionRulesListBySubscriptionNextResponse = DataCollectionRuleResourceListResult; +export type ActionType = string; /** Optional parameters. */ export interface AzureMonitorWorkspacesListByResourceGroupOptionalParams @@ -5263,20 +570,22 @@ export interface MonitorOperationsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type MonitorOperationsListResponse = OperationListResultAutoGenerated; +export type MonitorOperationsListResponse = OperationListResult; /** Optional parameters. */ export interface MonitorOperationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type MonitorOperationsListNextResponse = OperationListResultAutoGenerated; +export type MonitorOperationsListNextResponse = OperationListResult; /** Optional parameters. */ export interface MonitorClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; + /** Api Version */ + apiVersion?: string; /** Overrides client endpoint. */ endpoint?: string; } diff --git a/sdk/monitor/arm-monitor/src/models/mappers.ts b/sdk/monitor/arm-monitor/src/models/mappers.ts index 55b873ac7999..93bd2b185164 100644 --- a/sdk/monitor/arm-monitor/src/models/mappers.ts +++ b/sdk/monitor/arm-monitor/src/models/mappers.ts @@ -8,10 +8,10 @@ import * as coreClient from "@azure/core-client"; -export const AutoscaleSettingResourceCollection: coreClient.CompositeMapper = { +export const AzureMonitorWorkspaceResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AutoscaleSettingResourceCollection", + className: "AzureMonitorWorkspaceResourceListResult", modelProperties: { value: { serializedName: "value", @@ -21,7 +21,7 @@ export const AutoscaleSettingResourceCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "AutoscaleSettingResource" + className: "AzureMonitorWorkspaceResource" } } } @@ -36,78 +36,78 @@ export const AutoscaleSettingResourceCollection: coreClient.CompositeMapper = { } }; -export const AutoscaleProfile: coreClient.CompositeMapper = { +export const AzureMonitorWorkspace: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AutoscaleProfile", + className: "AzureMonitorWorkspace", modelProperties: { - name: { - serializedName: "name", - required: true, + accountId: { + serializedName: "accountId", + readOnly: true, type: { name: "String" } }, - capacity: { - serializedName: "capacity", + metrics: { + serializedName: "metrics", type: { name: "Composite", - className: "ScaleCapacity" + className: "AzureMonitorWorkspaceMetrics" } }, - rules: { - serializedName: "rules", - required: true, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + defaultIngestionSettings: { + serializedName: "defaultIngestionSettings", + type: { + name: "Composite", + className: "AzureMonitorWorkspaceDefaultIngestionSettings" + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRule" + className: "PrivateEndpointConnection" } } } }, - fixedDate: { - serializedName: "fixedDate", - type: { - name: "Composite", - className: "TimeWindow" - } - }, - recurrence: { - serializedName: "recurrence", + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + readOnly: true, type: { - name: "Composite", - className: "Recurrence" + name: "String" } } } } }; -export const ScaleCapacity: coreClient.CompositeMapper = { +export const Metrics: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleCapacity", + className: "Metrics", modelProperties: { - minimum: { - serializedName: "minimum", - required: true, - type: { - name: "String" - } - }, - maximum: { - serializedName: "maximum", - required: true, + prometheusQueryEndpoint: { + serializedName: "prometheusQueryEndpoint", + readOnly: true, type: { name: "String" } }, - default: { - serializedName: "default", - required: true, + internalId: { + serializedName: "internalId", + readOnly: true, type: { name: "String" } @@ -116,241 +116,229 @@ export const ScaleCapacity: coreClient.CompositeMapper = { } }; -export const ScaleRule: coreClient.CompositeMapper = { +export const IngestionSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRule", + className: "IngestionSettings", modelProperties: { - metricTrigger: { - serializedName: "metricTrigger", + dataCollectionRuleResourceId: { + serializedName: "dataCollectionRuleResourceId", + readOnly: true, type: { - name: "Composite", - className: "MetricTrigger" + name: "String" } }, - scaleAction: { - serializedName: "scaleAction", + dataCollectionEndpointResourceId: { + serializedName: "dataCollectionEndpointResourceId", + readOnly: true, type: { - name: "Composite", - className: "ScaleAction" + name: "String" } } } } }; -export const MetricTrigger: coreClient.CompositeMapper = { +export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricTrigger", + className: "PrivateEndpointConnection", modelProperties: { - metricName: { - serializedName: "metricName", - required: true, - type: { - name: "String" - } - }, - metricNamespace: { - serializedName: "metricNamespace", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - metricResourceUri: { - serializedName: "metricResourceUri", - required: true, + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - metricResourceLocation: { - serializedName: "metricResourceLocation", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - timeGrain: { - serializedName: "timeGrain", - required: true, - type: { - name: "TimeSpan" - } - }, - statistic: { - serializedName: "statistic", - required: true, - type: { - name: "Enum", - allowedValues: ["Average", "Min", "Max", "Sum", "Count"] - } - }, - timeWindow: { - serializedName: "timeWindow", - required: true, - type: { - name: "TimeSpan" - } - }, - timeAggregation: { - serializedName: "timeAggregation", - required: true, + properties: { + serializedName: "properties", type: { - name: "Enum", - allowedValues: [ - "Average", - "Minimum", - "Maximum", - "Total", - "Count", - "Last" - ] + name: "Composite", + className: "PrivateEndpointConnectionProperties" } - }, - operator: { - serializedName: "operator", - required: true, + } + } + } +}; + +export const PrivateEndpointConnectionPropertiesAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionPropertiesAutoGenerated", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, type: { - name: "Enum", - allowedValues: [ - "Equals", - "NotEquals", - "GreaterThan", - "GreaterThanOrEqual", - "LessThan", - "LessThanOrEqual" - ] + name: "String" } }, - threshold: { - serializedName: "threshold", - required: true, + privateEndpoint: { + serializedName: "privateEndpoint", type: { - name: "Number" + name: "Composite", + className: "PrivateEndpointConnectionPropertiesPrivateEndpoint" } }, - dimensions: { - serializedName: "dimensions", + groupIds: { + serializedName: "groupIds", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ScaleRuleMetricDimension" + name: "String" } } } }, - dividePerInstance: { - serializedName: "dividePerInstance", + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", type: { - name: "Boolean" + name: "Composite", + className: + "PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState" } } } } }; -export const ScaleRuleMetricDimension: coreClient.CompositeMapper = { +export const PrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRuleMetricDimension", + className: "PrivateEndpoint", modelProperties: { - dimensionName: { - serializedName: "DimensionName", - required: true, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } }, - operator: { - serializedName: "Operator", - required: true, + description: { + serializedName: "description", + readOnly: true, type: { name: "String" } }, - values: { - serializedName: "Values", - required: true, + actionsRequired: { + serializedName: "actionsRequired", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const ScaleAction: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleAction", + className: "Resource", modelProperties: { - direction: { - serializedName: "direction", - required: true, + id: { + serializedName: "id", + readOnly: true, type: { - name: "Enum", - allowedValues: ["None", "Increase", "Decrease"] + name: "String" } }, - type: { - serializedName: "type", - required: true, + name: { + serializedName: "name", + readOnly: true, type: { - name: "Enum", - allowedValues: [ - "ChangeCount", - "PercentChangeCount", - "ExactCount", - "ServiceAllowedNextValue" - ] + name: "String" } }, - value: { - defaultValue: "1", - serializedName: "value", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - cooldown: { - serializedName: "cooldown", - required: true, + systemData: { + serializedName: "systemData", type: { - name: "TimeSpan" + name: "Composite", + className: "SystemData" } } } } }; -export const TimeWindow: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TimeWindow", + className: "SystemData", modelProperties: { - timeZone: { - serializedName: "timeZone", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - start: { - serializedName: "start", - required: true, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", type: { name: "DateTime" } }, - end: { - serializedName: "end", - required: true, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { name: "DateTime" } @@ -359,153 +347,70 @@ export const TimeWindow: coreClient.CompositeMapper = { } }; -export const Recurrence: coreClient.CompositeMapper = { +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Recurrence", + className: "ErrorResponse", modelProperties: { - frequency: { - serializedName: "frequency", - required: true, - type: { - name: "Enum", - allowedValues: [ - "None", - "Second", - "Minute", - "Hour", - "Day", - "Week", - "Month", - "Year" - ] - } - }, - schedule: { - serializedName: "schedule", + error: { + serializedName: "error", type: { name: "Composite", - className: "RecurrentSchedule" + className: "ErrorDetail" } } } } }; -export const RecurrentSchedule: coreClient.CompositeMapper = { +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecurrentSchedule", + className: "ErrorDetail", modelProperties: { - timeZone: { - serializedName: "timeZone", - required: true, + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - days: { - serializedName: "days", - required: true, + message: { + serializedName: "message", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - hours: { - serializedName: "hours", - required: true, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Number" + name: "Composite", + className: "ErrorDetail" } } } }, - minutes: { - serializedName: "minutes", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - } - } - } -}; - -export const AutoscaleNotification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutoscaleNotification", - modelProperties: { - operation: { - defaultValue: "Scale", - isConstant: true, - serializedName: "operation", - type: { - name: "String" - } - }, - email: { - serializedName: "email", - type: { - name: "Composite", - className: "EmailNotification" - } - }, - webhooks: { - serializedName: "webhooks", + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "WebhookNotification" - } - } - } - } - } - } -}; - -export const EmailNotification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EmailNotification", - modelProperties: { - sendToSubscriptionAdministrator: { - defaultValue: false, - serializedName: "sendToSubscriptionAdministrator", - type: { - name: "Boolean" - } - }, - sendToSubscriptionCoAdministrators: { - defaultValue: false, - serializedName: "sendToSubscriptionCoAdministrators", - type: { - name: "Boolean" - } - }, - customEmails: { - serializedName: "customEmails", - type: { - name: "Sequence", - element: { - type: { - name: "String" + className: "ErrorAdditionalInfo" } } } @@ -514,70 +419,11 @@ export const EmailNotification: coreClient.CompositeMapper = { } }; -export const WebhookNotification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WebhookNotification", - modelProperties: { - serviceUri: { - serializedName: "serviceUri", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const PredictiveAutoscalePolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PredictiveAutoscalePolicy", - modelProperties: { - scaleMode: { - serializedName: "scaleMode", - required: true, - type: { - name: "Enum", - allowedValues: ["Disabled", "ForecastOnly", "Enabled"] - } - }, - scaleLookAheadTime: { - serializedName: "scaleLookAheadTime", - type: { - name: "TimeSpan" - } - } - } - } -}; - -export const Resource: coreClient.CompositeMapper = { +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "ErrorAdditionalInfo", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, type: { serializedName: "type", readOnly: true, @@ -585,7544 +431,140 @@ export const Resource: coreClient.CompositeMapper = { name: "String" } }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } -}; - -export const AutoscaleErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutoscaleErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "AutoscaleErrorResponseError" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } -}; - -export const AutoscaleErrorResponseError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutoscaleErrorResponseError", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - }, - target: { - serializedName: "target", - type: { - name: "String" - } - }, - details: { - serializedName: "details", - type: { - name: "String" - } - } - } - } -}; - -export const AutoscaleSettingResourcePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutoscaleSettingResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", + info: { + serializedName: "info", + readOnly: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } - }, - profiles: { - constraints: { - MaxItems: 20 - }, - serializedName: "properties.profiles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleProfile" - } - } - } - }, - notifications: { - serializedName: "properties.notifications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleNotification" - } - } - } - }, - enabled: { - defaultValue: false, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - predictiveAutoscalePolicy: { - serializedName: "properties.predictiveAutoscalePolicy", - type: { - name: "Composite", - className: "PredictiveAutoscalePolicy" - } - }, - name: { - serializedName: "properties.name", - type: { - name: "String" - } - }, - targetResourceUri: { - serializedName: "properties.targetResourceUri", - type: { - name: "String" - } - }, - targetResourceLocation: { - serializedName: "properties.targetResourceLocation", - type: { - name: "String" - } - } - } - } -}; - -export const PredictiveResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PredictiveResponse", - modelProperties: { - timespan: { - serializedName: "timespan", - type: { - name: "String" - } - }, - interval: { - serializedName: "interval", - type: { - name: "TimeSpan" - } - }, - metricName: { - serializedName: "metricName", - type: { - name: "String" - } - }, - targetResourceId: { - serializedName: "targetResourceId", - type: { - name: "String" - } - }, - data: { - serializedName: "data", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PredictiveValue" - } - } - } - } - } - } -}; - -export const PredictiveValue: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PredictiveValue", - modelProperties: { - timeStamp: { - serializedName: "timeStamp", - required: true, - type: { - name: "DateTime" - } - }, - value: { - serializedName: "value", - required: true, - type: { - name: "Number" - } - } - } - } -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - type: { - name: "String" - } - } - } - } -}; - -export const Incident: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Incident", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - ruleName: { - serializedName: "ruleName", - readOnly: true, - type: { - name: "String" - } - }, - isActive: { - serializedName: "isActive", - readOnly: true, - type: { - name: "Boolean" - } - }, - activatedTime: { - serializedName: "activatedTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - resolvedTime: { - serializedName: "resolvedTime", - readOnly: true, - type: { - name: "DateTime" - } - } - } - } -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const IncidentListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IncidentListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Incident" - } - } - } - } - } - } -}; - -export const RuleCondition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuleCondition", - uberParent: "RuleCondition", - polymorphicDiscriminator: { - serializedName: "odata\\.type", - clientName: "odataType" - }, - modelProperties: { - odataType: { - serializedName: "odata\\.type", - required: true, - type: { - name: "String" - } - }, - dataSource: { - serializedName: "dataSource", - type: { - name: "Composite", - className: "RuleDataSource" - } - } - } - } -}; - -export const RuleDataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuleDataSource", - uberParent: "RuleDataSource", - polymorphicDiscriminator: { - serializedName: "odata\\.type", - clientName: "odataType" - }, - modelProperties: { - odataType: { - serializedName: "odata\\.type", - required: true, - type: { - name: "String" - } - }, - resourceUri: { - serializedName: "resourceUri", - type: { - name: "String" - } - }, - legacyResourceId: { - serializedName: "legacyResourceId", - type: { - name: "String" - } - }, - resourceLocation: { - serializedName: "resourceLocation", - type: { - name: "String" - } - }, - metricNamespace: { - serializedName: "metricNamespace", - type: { - name: "String" - } - } - } - } -}; - -export const RuleAction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuleAction", - uberParent: "RuleAction", - polymorphicDiscriminator: { - serializedName: "odata\\.type", - clientName: "odataType" - }, - modelProperties: { - odataType: { - serializedName: "odata\\.type", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const ResourceAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceAutoGenerated", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const AlertRuleResourcePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AlertRuleResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - name: { - serializedName: "properties.name", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "properties.isEnabled", - type: { - name: "Boolean" - } - }, - condition: { - serializedName: "properties.condition", - type: { - name: "Composite", - className: "RuleCondition" - } - }, - action: { - serializedName: "properties.action", - type: { - name: "Composite", - className: "RuleAction" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RuleAction" - } - } - } - }, - lastUpdatedTime: { - serializedName: "properties.lastUpdatedTime", - readOnly: true, - type: { - name: "DateTime" - } - } - } - } -}; - -export const AlertRuleResourceCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AlertRuleResourceCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AlertRuleResource" - } - } - } - } - } - } -}; - -export const RetentionPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RetentionPolicy", - modelProperties: { - enabled: { - serializedName: "enabled", - required: true, - type: { - name: "Boolean" - } - }, - days: { - constraints: { - InclusiveMinimum: 0 - }, - serializedName: "days", - required: true, - type: { - name: "Number" - } - } - } - } -}; - -export const ResourceAutoGenerated2: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceAutoGenerated2", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const LogProfileResourcePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogProfileResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - storageAccountId: { - serializedName: "properties.storageAccountId", - type: { - name: "String" - } - }, - serviceBusRuleId: { - serializedName: "properties.serviceBusRuleId", - type: { - name: "String" - } - }, - locations: { - serializedName: "properties.locations", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - categories: { - serializedName: "properties.categories", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - retentionPolicy: { - serializedName: "properties.retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy" - } - } - } - } -}; - -export const LogProfileCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogProfileCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogProfileResource" - } - } - } - } - } - } -}; - -export const MetricSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricSettings", - modelProperties: { - timeGrain: { - serializedName: "timeGrain", - type: { - name: "TimeSpan" - } - }, - category: { - serializedName: "category", - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", - required: true, - type: { - name: "Boolean" - } - }, - retentionPolicy: { - serializedName: "retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy" - } - } - } - } -}; - -export const LogSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogSettings", - modelProperties: { - category: { - serializedName: "category", - type: { - name: "String" - } - }, - categoryGroup: { - serializedName: "categoryGroup", - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", - required: true, - type: { - name: "Boolean" - } - }, - retentionPolicy: { - serializedName: "retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy" - } - } - } - } -}; - -export const ResourceAutoGenerated3: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceAutoGenerated3", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const DiagnosticSettingsResourceCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticSettingsResourceCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticSettingsResource" - } - } - } - } - } - } -}; - -export const DiagnosticSettingsCategoryResourceCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticSettingsCategoryResourceCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticSettingsCategoryResource" - } - } - } - } - } - } -}; - -export const EmailReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EmailReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - emailAddress: { - serializedName: "emailAddress", - required: true, - type: { - name: "String" - } - }, - useCommonAlertSchema: { - defaultValue: false, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "Enum", - allowedValues: ["NotSpecified", "Enabled", "Disabled"] - } - } - } - } -}; - -export const SmsReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SmsReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - countryCode: { - serializedName: "countryCode", - required: true, - type: { - name: "String" - } - }, - phoneNumber: { - serializedName: "phoneNumber", - required: true, - type: { - name: "String" - } - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "Enum", - allowedValues: ["NotSpecified", "Enabled", "Disabled"] - } - } - } - } -}; - -export const WebhookReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WebhookReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - serviceUri: { - serializedName: "serviceUri", - required: true, - type: { - name: "String" - } - }, - useCommonAlertSchema: { - defaultValue: false, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - }, - useAadAuth: { - defaultValue: false, - serializedName: "useAadAuth", - type: { - name: "Boolean" - } - }, - objectId: { - serializedName: "objectId", - type: { - name: "String" - } - }, - identifierUri: { - serializedName: "identifierUri", - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - type: { - name: "String" - } - } - } - } -}; - -export const ItsmReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ItsmReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - workspaceId: { - serializedName: "workspaceId", - required: true, - type: { - name: "String" - } - }, - connectionId: { - serializedName: "connectionId", - required: true, - type: { - name: "String" - } - }, - ticketConfiguration: { - serializedName: "ticketConfiguration", - required: true, - type: { - name: "String" - } - }, - region: { - serializedName: "region", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const AzureAppPushReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureAppPushReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - emailAddress: { - serializedName: "emailAddress", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const AutomationRunbookReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutomationRunbookReceiver", - modelProperties: { - automationAccountId: { - serializedName: "automationAccountId", - required: true, - type: { - name: "String" - } - }, - runbookName: { - serializedName: "runbookName", - required: true, - type: { - name: "String" - } - }, - webhookResourceId: { - serializedName: "webhookResourceId", - required: true, - type: { - name: "String" - } - }, - isGlobalRunbook: { - serializedName: "isGlobalRunbook", - required: true, - type: { - name: "Boolean" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - serviceUri: { - serializedName: "serviceUri", - type: { - name: "String" - } - }, - useCommonAlertSchema: { - defaultValue: false, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - } - } - } -}; - -export const VoiceReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VoiceReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - countryCode: { - serializedName: "countryCode", - required: true, - type: { - name: "String" - } - }, - phoneNumber: { - serializedName: "phoneNumber", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const LogicAppReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogicAppReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - resourceId: { - serializedName: "resourceId", - required: true, - type: { - name: "String" - } - }, - callbackUrl: { - serializedName: "callbackUrl", - required: true, - type: { - name: "String" - } - }, - useCommonAlertSchema: { - defaultValue: false, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - } - } - } -}; - -export const AzureFunctionReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureFunctionReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - functionAppResourceId: { - serializedName: "functionAppResourceId", - required: true, - type: { - name: "String" - } - }, - functionName: { - serializedName: "functionName", - required: true, - type: { - name: "String" - } - }, - httpTriggerUrl: { - serializedName: "httpTriggerUrl", - required: true, - type: { - name: "String" - } - }, - useCommonAlertSchema: { - defaultValue: false, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ArmRoleReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ArmRoleReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - roleId: { - serializedName: "roleId", - required: true, - type: { - name: "String" - } - }, - useCommonAlertSchema: { - defaultValue: false, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - } - } - } -}; - -export const EventHubReceiver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EventHubReceiver", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - eventHubNameSpace: { - serializedName: "eventHubNameSpace", - required: true, - type: { - name: "String" - } - }, - eventHubName: { - serializedName: "eventHubName", - required: true, - type: { - name: "String" - } - }, - useCommonAlertSchema: { - defaultValue: false, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - }, - tenantId: { - serializedName: "tenantId", - type: { - name: "String" - } - }, - subscriptionId: { - serializedName: "subscriptionId", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const AzureResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const ActionGroupPatchBody: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionGroupPatchBody", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - enabled: { - defaultValue: true, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - } - } - } -}; - -export const NotificationRequestBody: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NotificationRequestBody", - modelProperties: { - alertType: { - constraints: { - MaxLength: 30 - }, - serializedName: "alertType", - required: true, - type: { - name: "String" - } - }, - emailReceivers: { - serializedName: "emailReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailReceiver" - } - } - } - }, - smsReceivers: { - serializedName: "smsReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SmsReceiver" - } - } - } - }, - webhookReceivers: { - serializedName: "webhookReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WebhookReceiver" - } - } - } - }, - itsmReceivers: { - serializedName: "itsmReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ItsmReceiver" - } - } - } - }, - azureAppPushReceivers: { - serializedName: "azureAppPushReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureAppPushReceiver" - } - } - } - }, - automationRunbookReceivers: { - serializedName: "automationRunbookReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutomationRunbookReceiver" - } - } - } - }, - voiceReceivers: { - serializedName: "voiceReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VoiceReceiver" - } - } - } - }, - logicAppReceivers: { - serializedName: "logicAppReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogicAppReceiver" - } - } - } - }, - azureFunctionReceivers: { - serializedName: "azureFunctionReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFunctionReceiver" - } - } - } - }, - armRoleReceivers: { - serializedName: "armRoleReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArmRoleReceiver" - } - } - } - }, - eventHubReceivers: { - serializedName: "eventHubReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EventHubReceiver" - } - } - } - } - } - } -}; - -export const TestNotificationDetailsResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TestNotificationDetailsResponse", - modelProperties: { - context: { - serializedName: "context", - type: { - name: "Composite", - className: "Context" - } - }, - state: { - serializedName: "state", - required: true, - type: { - name: "String" - } - }, - completedTime: { - serializedName: "completedTime", - type: { - name: "String" - } - }, - createdTime: { - serializedName: "createdTime", - type: { - name: "String" - } - }, - actionDetails: { - serializedName: "actionDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActionDetail" - } - } - } - } - } - } -}; - -export const Context: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Context", - modelProperties: { - notificationSource: { - serializedName: "notificationSource", - type: { - name: "String" - } - }, - contextType: { - serializedName: "contextType", - type: { - name: "String" - } - } - } - } -}; - -export const ActionDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionDetail", - modelProperties: { - mechanismType: { - serializedName: "MechanismType", - type: { - name: "String" - } - }, - name: { - serializedName: "Name", - type: { - name: "String" - } - }, - status: { - serializedName: "Status", - type: { - name: "String" - } - }, - subState: { - serializedName: "SubState", - type: { - name: "String" - } - }, - sendTime: { - serializedName: "SendTime", - type: { - name: "String" - } - }, - detail: { - serializedName: "Detail", - type: { - name: "String" - } - } - } - } -}; - -export const ActionGroupList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionGroupList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActionGroupResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const EnableRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EnableRequest", - modelProperties: { - receiverName: { - serializedName: "receiverName", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const EventDataCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EventDataCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EventData" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const EventData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EventData", - modelProperties: { - authorization: { - serializedName: "authorization", - type: { - name: "Composite", - className: "SenderAuthorization" - } - }, - claims: { - serializedName: "claims", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - caller: { - serializedName: "caller", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - eventDataId: { - serializedName: "eventDataId", - readOnly: true, - type: { - name: "String" - } - }, - correlationId: { - serializedName: "correlationId", - readOnly: true, - type: { - name: "String" - } - }, - eventName: { - serializedName: "eventName", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - category: { - serializedName: "category", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - httpRequest: { - serializedName: "httpRequest", - type: { - name: "Composite", - className: "HttpRequestInfo" - } - }, - level: { - serializedName: "level", - readOnly: true, - type: { - name: "Enum", - allowedValues: [ - "Critical", - "Error", - "Warning", - "Informational", - "Verbose" - ] - } - }, - resourceGroupName: { - serializedName: "resourceGroupName", - readOnly: true, - type: { - name: "String" - } - }, - resourceProviderName: { - serializedName: "resourceProviderName", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - type: { - name: "String" - } - }, - resourceType: { - serializedName: "resourceType", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - operationId: { - serializedName: "operationId", - readOnly: true, - type: { - name: "String" - } - }, - operationName: { - serializedName: "operationName", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - properties: { - serializedName: "properties", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - status: { - serializedName: "status", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - subStatus: { - serializedName: "subStatus", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - eventTimestamp: { - serializedName: "eventTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - submissionTimestamp: { - serializedName: "submissionTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - subscriptionId: { - serializedName: "subscriptionId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const SenderAuthorization: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SenderAuthorization", - modelProperties: { - action: { - serializedName: "action", - type: { - name: "String" - } - }, - role: { - serializedName: "role", - type: { - name: "String" - } - }, - scope: { - serializedName: "scope", - type: { - name: "String" - } - } - } - } -}; - -export const LocalizableString: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LocalizableString", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "String" - } - }, - localizedValue: { - serializedName: "localizedValue", - type: { - name: "String" - } - } - } - } -}; - -export const HttpRequestInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HttpRequestInfo", - modelProperties: { - clientRequestId: { - serializedName: "clientRequestId", - type: { - name: "String" - } - }, - clientIpAddress: { - serializedName: "clientIpAddress", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - type: { - name: "String" - } - }, - uri: { - serializedName: "uri", - type: { - name: "String" - } - } - } - } -}; - -export const EventCategoryCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EventCategoryCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LocalizableString" - } - } - } - } - } - } -}; - -export const MetricDefinitionCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricDefinitionCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricDefinition" - } - } - } - } - } - } -}; - -export const MetricDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricDefinition", - modelProperties: { - isDimensionRequired: { - serializedName: "isDimensionRequired", - type: { - name: "Boolean" - } - }, - resourceId: { - serializedName: "resourceId", - type: { - name: "String" - } - }, - namespace: { - serializedName: "namespace", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - displayDescription: { - serializedName: "displayDescription", - type: { - name: "String" - } - }, - category: { - serializedName: "category", - type: { - name: "String" - } - }, - metricClass: { - serializedName: "metricClass", - type: { - name: "String" - } - }, - unit: { - serializedName: "unit", - type: { - name: "String" - } - }, - primaryAggregationType: { - serializedName: "primaryAggregationType", - type: { - name: "Enum", - allowedValues: [ - "None", - "Average", - "Count", - "Minimum", - "Maximum", - "Total" - ] - } - }, - supportedAggregationTypes: { - serializedName: "supportedAggregationTypes", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "None", - "Average", - "Count", - "Minimum", - "Maximum", - "Total" - ] - } - } - } - }, - metricAvailabilities: { - serializedName: "metricAvailabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAvailability" - } - } - } - }, - id: { - serializedName: "id", - type: { - name: "String" - } - }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LocalizableString" - } - } - } - } - } - } -}; - -export const MetricAvailability: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricAvailability", - modelProperties: { - timeGrain: { - serializedName: "timeGrain", - type: { - name: "TimeSpan" - } - }, - retention: { - serializedName: "retention", - type: { - name: "TimeSpan" - } - } - } - } -}; - -export const Response: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Response", - modelProperties: { - cost: { - constraints: { - InclusiveMinimum: 0 - }, - serializedName: "cost", - type: { - name: "Number" - } - }, - timespan: { - serializedName: "timespan", - required: true, - type: { - name: "String" - } - }, - interval: { - serializedName: "interval", - type: { - name: "TimeSpan" - } - }, - namespace: { - serializedName: "namespace", - type: { - name: "String" - } - }, - resourceregion: { - serializedName: "resourceregion", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Metric" - } - } - } - } - } - } -}; - -export const Metric: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Metric", - modelProperties: { - id: { - serializedName: "id", - required: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - displayDescription: { - serializedName: "displayDescription", - type: { - name: "String" - } - }, - errorCode: { - serializedName: "errorCode", - type: { - name: "String" - } - }, - errorMessage: { - serializedName: "errorMessage", - type: { - name: "String" - } - }, - unit: { - serializedName: "unit", - required: true, - type: { - name: "String" - } - }, - timeseries: { - serializedName: "timeseries", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TimeSeriesElement" - } - } - } - } - } - } -}; - -export const TimeSeriesElement: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TimeSeriesElement", - modelProperties: { - metadatavalues: { - serializedName: "metadatavalues", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataValue" - } - } - } - }, - data: { - serializedName: "data", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricValue" - } - } - } - } - } - } -}; - -export const MetadataValue: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetadataValue", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - -export const MetricValue: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricValue", - modelProperties: { - timeStamp: { - serializedName: "timeStamp", - required: true, - type: { - name: "DateTime" - } - }, - average: { - serializedName: "average", - type: { - name: "Number" - } - }, - minimum: { - serializedName: "minimum", - type: { - name: "Number" - } - }, - maximum: { - serializedName: "maximum", - type: { - name: "Number" - } - }, - total: { - serializedName: "total", - type: { - name: "Number" - } - }, - count: { - serializedName: "count", - type: { - name: "Number" - } - } - } - } -}; - -export const MetricBaselinesResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricBaselinesResponse", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SingleMetricBaseline" - } - } - } - } - } - } -}; - -export const SingleMetricBaseline: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SingleMetricBaseline", - modelProperties: { - id: { - serializedName: "id", - required: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - timespan: { - serializedName: "properties.timespan", - required: true, - type: { - name: "String" - } - }, - interval: { - serializedName: "properties.interval", - required: true, - type: { - name: "TimeSpan" - } - }, - namespace: { - serializedName: "properties.namespace", - type: { - name: "String" - } - }, - baselines: { - serializedName: "properties.baselines", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TimeSeriesBaseline" - } - } - } - } - } - } -}; - -export const TimeSeriesBaseline: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TimeSeriesBaseline", - modelProperties: { - aggregation: { - serializedName: "aggregation", - required: true, - type: { - name: "String" - } - }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricSingleDimension" - } - } - } - }, - timestamps: { - serializedName: "timestamps", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "DateTime" - } - } - } - }, - data: { - serializedName: "data", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SingleBaseline" - } - } - } - }, - metadataValues: { - serializedName: "metadataValues", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BaselineMetadata" - } - } - } - } - } - } -}; - -export const MetricSingleDimension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricSingleDimension", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const SingleBaseline: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SingleBaseline", - modelProperties: { - sensitivity: { - serializedName: "sensitivity", - required: true, - type: { - name: "String" - } - }, - lowThresholds: { - serializedName: "lowThresholds", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - }, - highThresholds: { - serializedName: "highThresholds", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - } - } - } -}; - -export const BaselineMetadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BaselineMetadata", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const MetricAlertResourceCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricAlertResourceCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertResource" - } - } - } - } - } - } -}; - -export const MetricAlertCriteria: coreClient.CompositeMapper = { - serializedName: "MetricAlertCriteria", - type: { - name: "Composite", - className: "MetricAlertCriteria", - uberParent: "MetricAlertCriteria", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: { - serializedName: "odata\\.type", - clientName: "odataType" - }, - modelProperties: { - odataType: { - serializedName: "odata\\.type", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const MetricAlertAction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricAlertAction", - modelProperties: { - actionGroupId: { - serializedName: "actionGroupId", - type: { - name: "String" - } - }, - webHookProperties: { - serializedName: "webHookProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const ResourceAutoGenerated4: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceAutoGenerated4", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const MetricAlertResourcePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricAlertResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - severity: { - serializedName: "properties.severity", - type: { - name: "Number" - } - }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - evaluationFrequency: { - serializedName: "properties.evaluationFrequency", - type: { - name: "TimeSpan" - } - }, - windowSize: { - serializedName: "properties.windowSize", - type: { - name: "TimeSpan" - } - }, - targetResourceType: { - serializedName: "properties.targetResourceType", - type: { - name: "String" - } - }, - targetResourceRegion: { - serializedName: "properties.targetResourceRegion", - type: { - name: "String" - } - }, - criteria: { - serializedName: "properties.criteria", - type: { - name: "Composite", - className: "MetricAlertCriteria" - } - }, - autoMitigate: { - serializedName: "properties.autoMitigate", - type: { - name: "Boolean" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertAction" - } - } - } - }, - lastUpdatedTime: { - serializedName: "properties.lastUpdatedTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - isMigrated: { - serializedName: "properties.isMigrated", - readOnly: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const MetricAlertStatusCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricAlertStatusCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertStatus" - } - } - } - } - } - } -}; - -export const MetricAlertStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricAlertStatus", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "MetricAlertStatusProperties" - } - } - } - } -}; - -export const MetricAlertStatusProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricAlertStatusProperties", - modelProperties: { - dimensions: { - serializedName: "dimensions", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - timestamp: { - serializedName: "timestamp", - type: { - name: "DateTime" - } - } - } - } -}; - -export const ScheduledQueryRuleResourceCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScheduledQueryRuleResourceCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScheduledQueryRuleResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ScheduledQueryRuleResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScheduledQueryRuleResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - type: { - name: "String" - } - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - createdWithApiVersion: { - serializedName: "properties.createdWithApiVersion", - readOnly: true, - type: { - name: "String" - } - }, - isLegacyLogAnalyticsRule: { - serializedName: "properties.isLegacyLogAnalyticsRule", - readOnly: true, - type: { - name: "Boolean" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String" - } - }, - severity: { - serializedName: "properties.severity", - type: { - name: "Number" - } - }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - publicNetworkAccess: { - defaultValue: "Enabled", - serializedName: "properties.publicNetworkAccess", - type: { - name: "String" - } - }, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - evaluationFrequency: { - serializedName: "properties.evaluationFrequency", - type: { - name: "TimeSpan" - } - }, - windowSize: { - serializedName: "properties.windowSize", - type: { - name: "TimeSpan" - } - }, - overrideQueryTimeRange: { - serializedName: "properties.overrideQueryTimeRange", - type: { - name: "TimeSpan" - } - }, - targetResourceTypes: { - serializedName: "properties.targetResourceTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - criteria: { - serializedName: "properties.criteria", - type: { - name: "Composite", - className: "ScheduledQueryRuleCriteria" - } - }, - muteActionsDuration: { - serializedName: "properties.muteActionsDuration", - type: { - name: "TimeSpan" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Composite", - className: "Actions" - } - }, - isWorkspaceAlertsStorageConfigured: { - serializedName: "properties.isWorkspaceAlertsStorageConfigured", - readOnly: true, - type: { - name: "Boolean" - } - }, - checkWorkspaceAlertsStorageConfigured: { - serializedName: "properties.checkWorkspaceAlertsStorageConfigured", - type: { - name: "Boolean" - } - }, - skipQueryValidation: { - serializedName: "properties.skipQueryValidation", - type: { - name: "Boolean" - } - }, - autoMitigate: { - serializedName: "properties.autoMitigate", - type: { - name: "Boolean" - } - }, - ruleResolveConfiguration: { - serializedName: "properties.ruleResolveConfiguration", - type: { - name: "Composite", - className: "RuleResolveConfiguration" - } - } - } - } -}; - -export const Identity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Identity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, - type: { - name: "Enum", - allowedValues: ["SystemAssigned", "UserAssigned", "None"] - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserIdentityProperties" } - } - } - } - } - } -}; - -export const UserIdentityProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserIdentityProperties", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ScheduledQueryRuleCriteria: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScheduledQueryRuleCriteria", - modelProperties: { - allOf: { - serializedName: "allOf", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Condition" - } - } - } - } - } - } -}; - -export const Condition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Condition", - modelProperties: { - query: { - serializedName: "query", - type: { - name: "String" - } - }, - timeAggregation: { - serializedName: "timeAggregation", - type: { - name: "String" - } - }, - metricMeasureColumn: { - serializedName: "metricMeasureColumn", - type: { - name: "String" - } - }, - resourceIdColumn: { - serializedName: "resourceIdColumn", - type: { - name: "String" - } - }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Dimension" - } - } - } - }, - operator: { - serializedName: "operator", - type: { - name: "Enum", - allowedValues: [ - "GreaterThan", - "GreaterThanOrEqual", - "LessThan", - "LessThanOrEqual", - "Equals" - ] - } - }, - threshold: { - serializedName: "threshold", - type: { - name: "Number" - } - }, - failingPeriods: { - serializedName: "failingPeriods", - type: { - name: "Composite", - className: "ConditionFailingPeriods" - } - }, - metricName: { - serializedName: "metricName", - type: { - name: "String" - } - } - } - } -}; - -export const Dimension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Dimension", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - operator: { - serializedName: "operator", - required: true, - type: { - name: "String" - } - }, - values: { - serializedName: "values", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ConditionFailingPeriods: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConditionFailingPeriods", - modelProperties: { - numberOfEvaluationPeriods: { - defaultValue: 1, - serializedName: "numberOfEvaluationPeriods", - type: { - name: "Number" - } - }, - minFailingPeriodsToAlert: { - defaultValue: 1, - serializedName: "minFailingPeriodsToAlert", - type: { - name: "Number" - } - } - } - } -}; - -export const Actions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Actions", - modelProperties: { - actionGroups: { - serializedName: "actionGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - customProperties: { - serializedName: "customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const RuleResolveConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuleResolveConfiguration", - modelProperties: { - autoResolved: { - serializedName: "autoResolved", - type: { - name: "Boolean" - } - }, - timeToResolve: { - serializedName: "timeToResolve", - type: { - name: "TimeSpan" - } - } - } - } -}; - -export const ErrorContract: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorContract", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorResponseDetails" - } - } - } - } -}; - -export const ErrorResponseDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponseDetails", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String" - } - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorResponseDetails" - } - } - } - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorResponseAdditionalInfo" - } - } - } - } - } - } -}; - -export const ErrorResponseAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponseAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } -}; - -export const ScheduledQueryRuleResourcePatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScheduledQueryRuleResourcePatch", - modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - createdWithApiVersion: { - serializedName: "properties.createdWithApiVersion", - readOnly: true, - type: { - name: "String" - } - }, - isLegacyLogAnalyticsRule: { - serializedName: "properties.isLegacyLogAnalyticsRule", - readOnly: true, - type: { - name: "Boolean" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - displayName: { - serializedName: "properties.displayName", - type: { - name: "String" - } - }, - severity: { - serializedName: "properties.severity", - type: { - name: "Number" - } - }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - publicNetworkAccess: { - defaultValue: "Enabled", - serializedName: "properties.publicNetworkAccess", - type: { - name: "String" - } - }, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - evaluationFrequency: { - serializedName: "properties.evaluationFrequency", - type: { - name: "TimeSpan" - } - }, - windowSize: { - serializedName: "properties.windowSize", - type: { - name: "TimeSpan" - } - }, - overrideQueryTimeRange: { - serializedName: "properties.overrideQueryTimeRange", - type: { - name: "TimeSpan" - } - }, - targetResourceTypes: { - serializedName: "properties.targetResourceTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - criteria: { - serializedName: "properties.criteria", - type: { - name: "Composite", - className: "ScheduledQueryRuleCriteria" - } - }, - muteActionsDuration: { - serializedName: "properties.muteActionsDuration", - type: { - name: "TimeSpan" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Composite", - className: "Actions" - } - }, - isWorkspaceAlertsStorageConfigured: { - serializedName: "properties.isWorkspaceAlertsStorageConfigured", - readOnly: true, - type: { - name: "Boolean" - } - }, - checkWorkspaceAlertsStorageConfigured: { - serializedName: "properties.checkWorkspaceAlertsStorageConfigured", - type: { - name: "Boolean" - } - }, - skipQueryValidation: { - serializedName: "properties.skipQueryValidation", - type: { - name: "Boolean" - } - }, - autoMitigate: { - serializedName: "properties.autoMitigate", - type: { - name: "Boolean" - } - }, - ruleResolveConfiguration: { - serializedName: "properties.ruleResolveConfiguration", - type: { - name: "Composite", - className: "RuleResolveConfiguration" - } - } - } - } -}; - -export const MetricNamespaceCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricNamespaceCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricNamespace" - } - } - } - } - } - } -}; - -export const MetricNamespace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricNamespace", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - classification: { - serializedName: "classification", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "MetricNamespaceName" - } - } - } - } -}; - -export const MetricNamespaceName: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricNamespaceName", - modelProperties: { - metricNamespaceName: { - serializedName: "metricNamespaceName", - type: { - name: "String" - } - } - } - } -}; - -export const DataContainer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataContainer", - modelProperties: { - workspace: { - serializedName: "workspace", - type: { - name: "Composite", - className: "WorkspaceInfo" - } - } - } - } -}; - -export const WorkspaceInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspaceInfo", - modelProperties: { - id: { - serializedName: "id", - required: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - customerId: { - serializedName: "properties.customerId", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ResponseWithError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResponseWithError", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModel" - } - } - } - } -}; - -export const ErrorModel: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - serializedName: "code", - required: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const AzureMonitorPrivateLinkScopeListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureMonitorPrivateLinkScopeListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureMonitorPrivateLinkScope" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpoint", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - modelProperties: { - status: { - serializedName: "status", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - actionsRequired: { - serializedName: "actionsRequired", - type: { - name: "String" - } - } - } - } -}; - -export const AccessModeSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccessModeSettings", - modelProperties: { - queryAccessMode: { - serializedName: "queryAccessMode", - required: true, - type: { - name: "String" - } - }, - ingestionAccessMode: { - serializedName: "ingestionAccessMode", - required: true, - type: { - name: "String" - } - }, - exclusions: { - serializedName: "exclusions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AccessModeSettingsExclusion" - } - } - } - } - } - } -}; - -export const AccessModeSettingsExclusion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccessModeSettingsExclusion", - modelProperties: { - privateEndpointConnectionName: { - serializedName: "privateEndpointConnectionName", - type: { - name: "String" - } - }, - queryAccessMode: { - serializedName: "queryAccessMode", - type: { - name: "String" - } - }, - ingestionAccessMode: { - serializedName: "ingestionAccessMode", - type: { - name: "String" - } - } - } - } -}; - -export const DefaultErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DefaultErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String" - } - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } -}; - -export const TagsResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TagsResource", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const OperationStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationStatus", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - startTime: { - serializedName: "startTime", - nullable: true, - type: { - name: "DateTime" - } - }, - endTime: { - serializedName: "endTime", - nullable: true, - type: { - name: "DateTime" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } -}; - -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource" - } - } - } - } - } - } -}; - -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - } - } - } -}; - -export const ScopedResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ScopedResourceListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScopedResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const AlertRuleAllOfCondition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AlertRuleAllOfCondition", - modelProperties: { - allOf: { - serializedName: "allOf", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AlertRuleAnyOfOrLeafCondition" - } - } - } - } - } - } -}; - -export const AlertRuleLeafCondition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AlertRuleLeafCondition", - modelProperties: { - field: { - serializedName: "field", - type: { - name: "String" - } - }, - equals: { - serializedName: "equals", - type: { - name: "String" - } - }, - containsAny: { - serializedName: "containsAny", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ActionList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionList", - modelProperties: { - actionGroups: { - serializedName: "actionGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActionGroup" - } - } - } - } - } - } -}; - -export const ActionGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionGroup", - modelProperties: { - actionGroupId: { - serializedName: "actionGroupId", - required: true, - type: { - name: "String" - } - }, - webhookProperties: { - serializedName: "webhookProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const AzureResourceAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureResourceAutoGenerated", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - defaultValue: "global", - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponseAutoGenerated", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const AlertRulePatchObject: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AlertRulePatchObject", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - enabled: { - defaultValue: true, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - } - } - } -}; - -export const AlertRuleList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AlertRuleList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActivityLogAlertResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionEndpointResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionEndpointResourceListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataCollectionEndpointResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionEndpointResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionEndpointResource", - modelProperties: { - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - kind: { - serializedName: "kind", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "DataCollectionEndpointResourceSystemData" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - immutableId: { - serializedName: "properties.immutableId", - type: { - name: "String" - } - }, - configurationAccess: { - serializedName: "properties.configurationAccess", - type: { - name: "Composite", - className: "DataCollectionEndpointConfigurationAccess" - } - }, - logsIngestion: { - serializedName: "properties.logsIngestion", - type: { - name: "Composite", - className: "DataCollectionEndpointLogsIngestion" - } - }, - networkAcls: { - serializedName: "properties.networkAcls", - type: { - name: "Composite", - className: "DataCollectionEndpointNetworkAcls" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionEndpoint", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String" - } - }, - immutableId: { - serializedName: "immutableId", - type: { - name: "String" - } - }, - configurationAccess: { - serializedName: "configurationAccess", - type: { - name: "Composite", - className: "DataCollectionEndpointConfigurationAccess" - } - }, - logsIngestion: { - serializedName: "logsIngestion", - type: { - name: "Composite", - className: "DataCollectionEndpointLogsIngestion" - } - }, - networkAcls: { - serializedName: "networkAcls", - type: { - name: "Composite", - className: "DataCollectionEndpointNetworkAcls" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ConfigurationAccessEndpointSpec: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConfigurationAccessEndpointSpec", - modelProperties: { - endpoint: { - serializedName: "endpoint", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const LogsIngestionEndpointSpec: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogsIngestionEndpointSpec", - modelProperties: { - endpoint: { - serializedName: "endpoint", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const NetworkRuleSet: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkRuleSet", - modelProperties: { - publicNetworkAccess: { - serializedName: "publicNetworkAccess", - type: { - name: "String" - } - } - } - } -}; - -export const ErrorResponseCommonV2: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponseCommonV2", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - } -}; - -export const ResourceForUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceForUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const DataCollectionRuleAssociationProxyOnlyResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleAssociationProxyOnlyResourceListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataCollectionRuleAssociationProxyOnlyResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionRuleAssociationProxyOnlyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleAssociationProxyOnlyResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "DataCollectionRuleAssociationProxyOnlyResourceSystemData" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - dataCollectionRuleId: { - serializedName: "properties.dataCollectionRuleId", - type: { - name: "String" - } - }, - dataCollectionEndpointId: { - serializedName: "properties.dataCollectionEndpointId", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - metadata: { - serializedName: "properties.metadata", - type: { - name: "Composite", - className: "DataCollectionRuleAssociationMetadata" - } - } - } - } -}; - -export const DataCollectionRuleAssociation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleAssociation", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String" - } - }, - dataCollectionRuleId: { - serializedName: "dataCollectionRuleId", - type: { - name: "String" - } - }, - dataCollectionEndpointId: { - serializedName: "dataCollectionEndpointId", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - metadata: { - serializedName: "metadata", - type: { - name: "Composite", - className: "DataCollectionRuleAssociationMetadata" - } - } - } - } -}; - -export const Metadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Metadata", - modelProperties: { - provisionedBy: { - serializedName: "provisionedBy", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionRuleResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleResourceListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataCollectionRuleResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionRuleResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleResource", - modelProperties: { - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - kind: { - serializedName: "kind", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "DataCollectionRuleResourceSystemData" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - immutableId: { - serializedName: "properties.immutableId", - readOnly: true, - type: { - name: "String" - } - }, - dataCollectionEndpointId: { - serializedName: "properties.dataCollectionEndpointId", - type: { - name: "String" - } - }, - metadata: { - serializedName: "properties.metadata", - type: { - name: "Composite", - className: "DataCollectionRuleMetadata" - } - }, - streamDeclarations: { - serializedName: "properties.streamDeclarations", - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "StreamDeclaration" } } - } - }, - dataSources: { - serializedName: "properties.dataSources", - type: { - name: "Composite", - className: "DataCollectionRuleDataSources" - } - }, - destinations: { - serializedName: "properties.destinations", - type: { - name: "Composite", - className: "DataCollectionRuleDestinations" - } - }, - dataFlows: { - serializedName: "properties.dataFlows", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataFlow" - } - } - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRule", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String" - } - }, - immutableId: { - serializedName: "immutableId", - readOnly: true, - type: { - name: "String" - } - }, - dataCollectionEndpointId: { - serializedName: "dataCollectionEndpointId", - type: { - name: "String" - } - }, - metadata: { - serializedName: "metadata", - type: { - name: "Composite", - className: "DataCollectionRuleMetadata" - } - }, - streamDeclarations: { - serializedName: "streamDeclarations", - type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "StreamDeclaration" } } - } - }, - dataSources: { - serializedName: "dataSources", - type: { - name: "Composite", - className: "DataCollectionRuleDataSources" - } - }, - destinations: { - serializedName: "destinations", - type: { - name: "Composite", - className: "DataCollectionRuleDestinations" - } - }, - dataFlows: { - serializedName: "dataFlows", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataFlow" - } - } - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const StreamDeclaration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StreamDeclaration", - modelProperties: { - columns: { - serializedName: "columns", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ColumnDefinition" - } - } - } - } - } - } -}; - -export const ColumnDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ColumnDefinition", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const DataSourcesSpec: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataSourcesSpec", - modelProperties: { - performanceCounters: { - serializedName: "performanceCounters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PerfCounterDataSource" - } - } - } - }, - windowsEventLogs: { - serializedName: "windowsEventLogs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WindowsEventLogDataSource" - } - } - } - }, - syslog: { - serializedName: "syslog", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SyslogDataSource" - } - } - } - }, - extensions: { - serializedName: "extensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExtensionDataSource" - } - } - } - }, - logFiles: { - serializedName: "logFiles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogFilesDataSource" - } - } - } - }, - iisLogs: { - serializedName: "iisLogs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IisLogsDataSource" - } - } - } - } - } - } -}; - -export const PerfCounterDataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PerfCounterDataSource", - modelProperties: { - streams: { - serializedName: "streams", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - samplingFrequencyInSeconds: { - serializedName: "samplingFrequencyInSeconds", - type: { - name: "Number" - } - }, - counterSpecifiers: { - serializedName: "counterSpecifiers", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const WindowsEventLogDataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WindowsEventLogDataSource", - modelProperties: { - streams: { - serializedName: "streams", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - xPathQueries: { - serializedName: "xPathQueries", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const SyslogDataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SyslogDataSource", - modelProperties: { - streams: { - serializedName: "streams", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - facilityNames: { - serializedName: "facilityNames", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - logLevels: { - serializedName: "logLevels", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const ExtensionDataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtensionDataSource", - modelProperties: { - streams: { - serializedName: "streams", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - extensionName: { - serializedName: "extensionName", - required: true, - type: { - name: "String" - } - }, - extensionSettings: { - serializedName: "extensionSettings", - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - inputDataSources: { - serializedName: "inputDataSources", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const LogFilesDataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogFilesDataSource", - modelProperties: { - streams: { - serializedName: "streams", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - filePatterns: { - serializedName: "filePatterns", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - format: { - serializedName: "format", - required: true, - type: { - name: "String" - } - }, - settings: { - serializedName: "settings", - type: { - name: "Composite", - className: "LogFilesDataSourceSettings" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const LogFileSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogFileSettings", - modelProperties: { - text: { - serializedName: "text", - type: { - name: "Composite", - className: "LogFileSettingsText" - } - } - } - } -}; - -export const LogFileTextSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogFileTextSettings", - modelProperties: { - recordStartTimestampFormat: { - serializedName: "recordStartTimestampFormat", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const IisLogsDataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IisLogsDataSource", - modelProperties: { - streams: { - serializedName: "streams", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - logDirectories: { - serializedName: "logDirectories", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const DestinationsSpec: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DestinationsSpec", - modelProperties: { - logAnalytics: { - serializedName: "logAnalytics", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogAnalyticsDestination" - } - } - } - }, - azureMonitorMetrics: { - serializedName: "azureMonitorMetrics", - type: { - name: "Composite", - className: "DestinationsSpecAzureMonitorMetrics" - } - } - } - } -}; - -export const LogAnalyticsDestination: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogAnalyticsDestination", - modelProperties: { - workspaceResourceId: { - serializedName: "workspaceResourceId", - type: { - name: "String" - } - }, - workspaceId: { - serializedName: "workspaceId", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const AzureMonitorMetricsDestination: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureMonitorMetricsDestination", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const DataFlow: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataFlow", - modelProperties: { - streams: { - serializedName: "streams", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - destinations: { - serializedName: "destinations", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - transformKql: { - serializedName: "transformKql", - type: { - name: "String" - } - }, - outputStream: { - serializedName: "outputStream", - type: { - name: "String" - } - } - } - } -}; - -export const AzureMonitorWorkspaceResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureMonitorWorkspaceResourceListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureMonitorWorkspaceResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const AzureMonitorWorkspace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureMonitorWorkspace", - modelProperties: { - accountId: { - serializedName: "accountId", - readOnly: true, - type: { - name: "String" - } - }, - metrics: { - serializedName: "metrics", - type: { - name: "Composite", - className: "AzureMonitorWorkspaceMetrics" - } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - defaultIngestionSettings: { - serializedName: "defaultIngestionSettings", - type: { - name: "Composite", - className: "AzureMonitorWorkspaceDefaultIngestionSettings" - } - } - } - } -}; - -export const Metrics: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Metrics", - modelProperties: { - prometheusQueryEndpoint: { - serializedName: "prometheusQueryEndpoint", - readOnly: true, - type: { - name: "String" - } - }, - internalId: { - serializedName: "internalId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const IngestionSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IngestionSettings", - modelProperties: { - dataCollectionRuleResourceId: { - serializedName: "dataCollectionRuleResourceId", - readOnly: true, - type: { - name: "String" - } - }, - dataCollectionEndpointResourceId: { - serializedName: "dataCollectionEndpointResourceId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ResourceAutoGenerated5: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceAutoGenerated5", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } -}; - -export const ErrorResponseAutoGenerated2: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponseAutoGenerated2", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetailAutoGenerated" - } - } - } - } -}; - -export const ErrorDetailAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetailAutoGenerated", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String" - } - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetailAutoGenerated" - } - } - } - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } -}; - -export const AzureMonitorWorkspaceResourceForUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureMonitorWorkspaceResourceForUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const OperationListResultAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResultAutoGenerated", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationAutoGenerated" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const OperationAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationAutoGenerated", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, - type: { - name: "Boolean" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplayAutoGenerated" - } - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String" - } - }, - actionType: { - serializedName: "actionType", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const OperationDisplayAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplayAutoGenerated", - modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const RuleManagementEventClaimsDataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RuleManagementEventClaimsDataSource", - modelProperties: { - emailAddress: { - serializedName: "emailAddress", - type: { - name: "String" - } - } - } - } -}; - -export const ManagementEventAggregationCondition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagementEventAggregationCondition", - modelProperties: { - operator: { - serializedName: "operator", - type: { - name: "Enum", - allowedValues: [ - "GreaterThan", - "GreaterThanOrEqual", - "LessThan", - "LessThanOrEqual", - "Equals" - ] - } - }, - threshold: { - serializedName: "threshold", - type: { - name: "Number" - } - }, - windowSize: { - serializedName: "windowSize", - type: { - name: "TimeSpan" - } - } - } - } -}; - -export const MultiMetricCriteria: coreClient.CompositeMapper = { - serializedName: "MultiMetricCriteria", - type: { - name: "Composite", - className: "MultiMetricCriteria", - uberParent: "MultiMetricCriteria", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: { - serializedName: "criterionType", - clientName: "criterionType" - }, - modelProperties: { - criterionType: { - serializedName: "criterionType", - required: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - metricName: { - serializedName: "metricName", - required: true, - type: { - name: "String" - } - }, - metricNamespace: { - serializedName: "metricNamespace", - type: { - name: "String" - } - }, - timeAggregation: { - serializedName: "timeAggregation", - required: true, - type: { - name: "String" - } - }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricDimension" - } - } - } - }, - skipMetricValidation: { - serializedName: "skipMetricValidation", - type: { - name: "Boolean" - } - } - } - } -}; - -export const MetricDimension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricDimension", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - operator: { - serializedName: "operator", - required: true, - type: { - name: "String" - } - }, - values: { - serializedName: "values", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DynamicThresholdFailingPeriods: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DynamicThresholdFailingPeriods", - modelProperties: { - numberOfEvaluationPeriods: { - serializedName: "numberOfEvaluationPeriods", - required: true, - type: { - name: "Number" - } - }, - minFailingPeriodsToAlert: { - serializedName: "minFailingPeriodsToAlert", - required: true, - type: { - name: "Number" - } - } - } - } -}; - -export const AutoscaleSettingResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutoscaleSettingResource", - modelProperties: { - ...Resource.type.modelProperties, - profiles: { - constraints: { - MaxItems: 20 - }, - serializedName: "properties.profiles", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleProfile" - } - } - } - }, - notifications: { - serializedName: "properties.notifications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleNotification" - } - } - } - }, - enabled: { - defaultValue: false, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - predictiveAutoscalePolicy: { - serializedName: "properties.predictiveAutoscalePolicy", - type: { - name: "Composite", - className: "PredictiveAutoscalePolicy" - } - }, - namePropertiesName: { - serializedName: "properties.name", - type: { - name: "String" - } - }, - targetResourceUri: { - serializedName: "properties.targetResourceUri", - type: { - name: "String" - } - }, - targetResourceLocation: { - serializedName: "properties.targetResourceLocation", - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionEndpointResourceSystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionEndpointResourceSystemData", - modelProperties: { - ...SystemData.type.modelProperties - } - } -}; - -export const DataCollectionRuleAssociationProxyOnlyResourceSystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleAssociationProxyOnlyResourceSystemData", - modelProperties: { - ...SystemData.type.modelProperties - } - } -}; - -export const DataCollectionRuleResourceSystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleResourceSystemData", - modelProperties: { - ...SystemData.type.modelProperties - } - } -}; - -export const ThresholdRuleCondition: coreClient.CompositeMapper = { - serializedName: - "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - type: { - name: "Composite", - className: "ThresholdRuleCondition", - uberParent: "RuleCondition", - polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, - modelProperties: { - ...RuleCondition.type.modelProperties, - operator: { - serializedName: "operator", - required: true, - type: { - name: "Enum", - allowedValues: [ - "GreaterThan", - "GreaterThanOrEqual", - "LessThan", - "LessThanOrEqual", - "Equals" - ] - } - }, - threshold: { - serializedName: "threshold", - required: true, - type: { - name: "Number" - } - }, - windowSize: { - serializedName: "windowSize", - type: { - name: "TimeSpan" - } - }, - timeAggregation: { - serializedName: "timeAggregation", - type: { - name: "Enum", - allowedValues: ["Average", "Minimum", "Maximum", "Total", "Last"] - } - } - } - } -}; - -export const LocationThresholdRuleCondition: coreClient.CompositeMapper = { - serializedName: - "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition", - type: { - name: "Composite", - className: "LocationThresholdRuleCondition", - uberParent: "RuleCondition", - polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, - modelProperties: { - ...RuleCondition.type.modelProperties, - windowSize: { - serializedName: "windowSize", - type: { - name: "TimeSpan" - } - }, - failedLocationCount: { - constraints: { - InclusiveMinimum: 0 - }, - serializedName: "failedLocationCount", - required: true, - type: { - name: "Number" - } - } - } - } -}; - -export const ManagementEventRuleCondition: coreClient.CompositeMapper = { - serializedName: - "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition", - type: { - name: "Composite", - className: "ManagementEventRuleCondition", - uberParent: "RuleCondition", - polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, - modelProperties: { - ...RuleCondition.type.modelProperties, - aggregation: { - serializedName: "aggregation", - type: { - name: "Composite", - className: "ManagementEventAggregationCondition" - } - } - } - } -}; - -export const RuleMetricDataSource: coreClient.CompositeMapper = { - serializedName: - "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - type: { - name: "Composite", - className: "RuleMetricDataSource", - uberParent: "RuleDataSource", - polymorphicDiscriminator: RuleDataSource.type.polymorphicDiscriminator, - modelProperties: { - ...RuleDataSource.type.modelProperties, - metricName: { - serializedName: "metricName", - type: { - name: "String" - } - } - } - } -}; - -export const RuleManagementEventDataSource: coreClient.CompositeMapper = { - serializedName: - "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource", - type: { - name: "Composite", - className: "RuleManagementEventDataSource", - uberParent: "RuleDataSource", - polymorphicDiscriminator: RuleDataSource.type.polymorphicDiscriminator, - modelProperties: { - ...RuleDataSource.type.modelProperties, - eventName: { - serializedName: "eventName", - type: { - name: "String" - } - }, - eventSource: { - serializedName: "eventSource", - type: { - name: "String" - } - }, - level: { - serializedName: "level", - type: { - name: "String" - } - }, - operationName: { - serializedName: "operationName", - type: { - name: "String" - } - }, - resourceGroupName: { - serializedName: "resourceGroupName", - type: { - name: "String" - } - }, - resourceProviderName: { - serializedName: "resourceProviderName", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - subStatus: { - serializedName: "subStatus", - type: { - name: "String" - } - }, - claims: { - serializedName: "claims", - type: { - name: "Composite", - className: "RuleManagementEventClaimsDataSource" - } - } - } - } -}; - -export const RuleEmailAction: coreClient.CompositeMapper = { - serializedName: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", - type: { - name: "Composite", - className: "RuleEmailAction", - uberParent: "RuleAction", - polymorphicDiscriminator: RuleAction.type.polymorphicDiscriminator, - modelProperties: { - ...RuleAction.type.modelProperties, - sendToServiceOwners: { - serializedName: "sendToServiceOwners", - type: { - name: "Boolean" - } - }, - customEmails: { - serializedName: "customEmails", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const RuleWebhookAction: coreClient.CompositeMapper = { - serializedName: - "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", - type: { - name: "Composite", - className: "RuleWebhookAction", - uberParent: "RuleAction", - polymorphicDiscriminator: RuleAction.type.polymorphicDiscriminator, - modelProperties: { - ...RuleAction.type.modelProperties, - serviceUri: { - serializedName: "serviceUri", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const AlertRuleResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AlertRuleResource", - modelProperties: { - ...ResourceAutoGenerated.type.modelProperties, - namePropertiesName: { - serializedName: "properties.name", - required: true, - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "properties.isEnabled", - required: true, - type: { - name: "Boolean" - } - }, - condition: { - serializedName: "properties.condition", - type: { - name: "Composite", - className: "RuleCondition" - } - }, - action: { - serializedName: "properties.action", - type: { - name: "Composite", - className: "RuleAction" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RuleAction" - } - } - } - }, - lastUpdatedTime: { - serializedName: "properties.lastUpdatedTime", - readOnly: true, - type: { - name: "DateTime" - } - } - } - } -}; - -export const LogProfileResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogProfileResource", - modelProperties: { - ...ResourceAutoGenerated2.type.modelProperties, - storageAccountId: { - serializedName: "properties.storageAccountId", - type: { - name: "String" - } - }, - serviceBusRuleId: { - serializedName: "properties.serviceBusRuleId", - type: { - name: "String" - } - }, - locations: { - serializedName: "properties.locations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - categories: { - serializedName: "properties.categories", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - retentionPolicy: { - serializedName: "properties.retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy" - } - } - } - } -}; - -export const DiagnosticSettingsResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticSettingsResource", - modelProperties: { - ...ResourceAutoGenerated3.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - storageAccountId: { - serializedName: "properties.storageAccountId", - type: { - name: "String" - } - }, - serviceBusRuleId: { - serializedName: "properties.serviceBusRuleId", - type: { - name: "String" - } - }, - eventHubAuthorizationRuleId: { - serializedName: "properties.eventHubAuthorizationRuleId", - type: { - name: "String" - } - }, - eventHubName: { - serializedName: "properties.eventHubName", - type: { - name: "String" - } - }, - metrics: { - serializedName: "properties.metrics", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricSettings" - } - } - } - }, - logs: { - serializedName: "properties.logs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogSettings" - } - } - } - }, - workspaceId: { - serializedName: "properties.workspaceId", - type: { - name: "String" - } - }, - marketplacePartnerId: { - serializedName: "properties.marketplacePartnerId", - type: { - name: "String" - } - }, - logAnalyticsDestinationType: { - serializedName: "properties.logAnalyticsDestinationType", - type: { - name: "String" - } - } - } - } -}; - -export const DiagnosticSettingsCategoryResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticSettingsCategoryResource", - modelProperties: { - ...ResourceAutoGenerated3.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - categoryType: { - serializedName: "properties.categoryType", - type: { - name: "String" - } - }, - categoryGroups: { - serializedName: "properties.categoryGroups", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...ResourceAutoGenerated3.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint" - } - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...ResourceAutoGenerated3.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - ...ResourceAutoGenerated3.type.modelProperties, - groupId: { - serializedName: "properties.groupId", - readOnly: true, - type: { - name: "String" - } - }, - requiredMembers: { - serializedName: "properties.requiredMembers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ProxyResourceAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResourceAutoGenerated", - modelProperties: { - ...ResourceAutoGenerated3.type.modelProperties - } - } -}; - -export const ActionGroupResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionGroupResource", - modelProperties: { - ...AzureResource.type.modelProperties, - groupShortName: { - constraints: { - MaxLength: 12 - }, - serializedName: "properties.groupShortName", - type: { - name: "String" - } - }, - enabled: { - defaultValue: true, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - emailReceivers: { - serializedName: "properties.emailReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailReceiver" - } - } - } - }, - smsReceivers: { - serializedName: "properties.smsReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SmsReceiver" - } - } - } - }, - webhookReceivers: { - serializedName: "properties.webhookReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WebhookReceiver" - } - } - } - }, - itsmReceivers: { - serializedName: "properties.itsmReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ItsmReceiver" - } - } - } - }, - azureAppPushReceivers: { - serializedName: "properties.azureAppPushReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureAppPushReceiver" - } - } - } - }, - automationRunbookReceivers: { - serializedName: "properties.automationRunbookReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutomationRunbookReceiver" - } - } - } - }, - voiceReceivers: { - serializedName: "properties.voiceReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VoiceReceiver" - } - } - } - }, - logicAppReceivers: { - serializedName: "properties.logicAppReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogicAppReceiver" - } - } - } - }, - azureFunctionReceivers: { - serializedName: "properties.azureFunctionReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFunctionReceiver" - } - } - } - }, - armRoleReceivers: { - serializedName: "properties.armRoleReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArmRoleReceiver" - } - } - } - }, - eventHubReceivers: { - serializedName: "properties.eventHubReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EventHubReceiver" - } - } - } - } - } - } -}; - -export const MetricAlertSingleResourceMultipleMetricCriteria: coreClient.CompositeMapper = { - serializedName: - "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", - type: { - name: "Composite", - className: "MetricAlertSingleResourceMultipleMetricCriteria", - uberParent: "MetricAlertCriteria", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator, - modelProperties: { - ...MetricAlertCriteria.type.modelProperties, - allOf: { - serializedName: "allOf", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricCriteria" - } - } - } - } - } - } -}; - -export const WebtestLocationAvailabilityCriteria: coreClient.CompositeMapper = { - serializedName: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", - type: { - name: "Composite", - className: "WebtestLocationAvailabilityCriteria", - uberParent: "MetricAlertCriteria", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator, - modelProperties: { - ...MetricAlertCriteria.type.modelProperties, - webTestId: { - serializedName: "webTestId", - required: true, - type: { - name: "String" - } - }, - componentId: { - serializedName: "componentId", - required: true, - type: { - name: "String" - } - }, - failedLocationCount: { - serializedName: "failedLocationCount", - required: true, - type: { - name: "Number" - } - } - } - } -}; - -export const MetricAlertMultipleResourceMultipleMetricCriteria: coreClient.CompositeMapper = { - serializedName: - "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - type: { - name: "Composite", - className: "MetricAlertMultipleResourceMultipleMetricCriteria", - uberParent: "MetricAlertCriteria", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator, - modelProperties: { - ...MetricAlertCriteria.type.modelProperties, - allOf: { - serializedName: "allOf", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MultiMetricCriteria" - } - } - } - } - } - } -}; - -export const MetricAlertResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricAlertResource", - modelProperties: { - ...ResourceAutoGenerated4.type.modelProperties, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - severity: { - serializedName: "properties.severity", - required: true, - type: { - name: "Number" - } - }, - enabled: { - serializedName: "properties.enabled", - required: true, - type: { - name: "Boolean" - } - }, - scopes: { - serializedName: "properties.scopes", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - evaluationFrequency: { - serializedName: "properties.evaluationFrequency", - required: true, - type: { - name: "TimeSpan" - } - }, - windowSize: { - serializedName: "properties.windowSize", - required: true, - type: { - name: "TimeSpan" - } - }, - targetResourceType: { - serializedName: "properties.targetResourceType", - type: { - name: "String" - } - }, - targetResourceRegion: { - serializedName: "properties.targetResourceRegion", - type: { - name: "String" - } - }, - criteria: { - serializedName: "properties.criteria", - type: { - name: "Composite", - className: "MetricAlertCriteria" - } - }, - autoMitigate: { - serializedName: "properties.autoMitigate", - type: { - name: "Boolean" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertAction" - } - } - } - }, - lastUpdatedTime: { - serializedName: "properties.lastUpdatedTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - isMigrated: { - serializedName: "properties.isMigrated", - readOnly: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const VMInsightsOnboardingStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VMInsightsOnboardingStatus", - modelProperties: { - ...ProxyResource.type.modelProperties, - resourceId: { - serializedName: "properties.resourceId", - type: { - name: "String" - } - }, - onboardingStatus: { - serializedName: "properties.onboardingStatus", - type: { - name: "String" - } - }, - dataStatus: { - serializedName: "properties.dataStatus", - type: { - name: "String" - } - }, - data: { - serializedName: "properties.data", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataContainer" - } - } - } - } - } - } -}; - -export const AlertRuleAnyOfOrLeafCondition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AlertRuleAnyOfOrLeafCondition", - modelProperties: { - ...AlertRuleLeafCondition.type.modelProperties, - anyOf: { - serializedName: "anyOf", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AlertRuleLeafCondition" - } - } - } - } - } - } -}; - -export const ActivityLogAlertResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActivityLogAlertResource", - modelProperties: { - ...AzureResourceAutoGenerated.type.modelProperties, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - condition: { - serializedName: "properties.condition", - type: { - name: "Composite", - className: "AlertRuleAllOfCondition" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Composite", - className: "ActionList" - } - }, - enabled: { - defaultValue: true, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - } - } - } -}; - -export const DataCollectionEndpointResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionEndpointResourceProperties", - modelProperties: { - ...DataCollectionEndpoint.type.modelProperties - } - } -}; - -export const DataCollectionEndpointConfigurationAccess: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionEndpointConfigurationAccess", - modelProperties: { - ...ConfigurationAccessEndpointSpec.type.modelProperties - } - } -}; - -export const DataCollectionEndpointLogsIngestion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionEndpointLogsIngestion", - modelProperties: { - ...LogsIngestionEndpointSpec.type.modelProperties - } - } -}; - -export const DataCollectionEndpointNetworkAcls: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionEndpointNetworkAcls", - modelProperties: { - ...NetworkRuleSet.type.modelProperties - } - } -}; - -export const DataCollectionRuleAssociationProxyOnlyResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleAssociationProxyOnlyResourceProperties", - modelProperties: { - ...DataCollectionRuleAssociation.type.modelProperties - } - } -}; - -export const DataCollectionRuleAssociationMetadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleAssociationMetadata", - modelProperties: { - ...Metadata.type.modelProperties - } - } -}; - -export const DataCollectionRuleMetadata: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleMetadata", - modelProperties: { - ...Metadata.type.modelProperties - } - } -}; - -export const DataCollectionRuleResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleResourceProperties", - modelProperties: { - ...DataCollectionRule.type.modelProperties - } - } -}; - -export const DataCollectionRuleDataSources: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCollectionRuleDataSources", - modelProperties: { - ...DataSourcesSpec.type.modelProperties + value: { type: { name: "any" } } + } + } } } }; -export const LogFilesDataSourceSettings: coreClient.CompositeMapper = { +export const AzureMonitorWorkspaceResourceForUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogFilesDataSourceSettings", + className: "AzureMonitorWorkspaceResourceForUpdate", modelProperties: { - ...LogFileSettings.type.modelProperties + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } } } }; -export const LogFileSettingsText: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogFileSettingsText", + className: "OperationListResult", modelProperties: { - ...LogFileTextSettings.type.modelProperties + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } } } }; -export const DataCollectionRuleDestinations: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataCollectionRuleDestinations", + className: "Operation", modelProperties: { - ...DestinationsSpec.type.modelProperties + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String" + } + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String" + } + } } } }; -export const DestinationsSpecAzureMonitorMetrics: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DestinationsSpecAzureMonitorMetrics", + className: "OperationDisplay", modelProperties: { - ...AzureMonitorMetricsDestination.type.modelProperties + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + } } } }; @@ -8157,165 +599,53 @@ export const AzureMonitorWorkspaceDefaultIngestionSettings: coreClient.Composite } }; -export const TrackedResourceAutoGenerated: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResourceAutoGenerated", - modelProperties: { - ...ResourceAutoGenerated5.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const MetricCriteria: coreClient.CompositeMapper = { - serializedName: "StaticThresholdCriterion", +export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricCriteria", - uberParent: "MultiMetricCriteria", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: MultiMetricCriteria.type.polymorphicDiscriminator, + className: "PrivateEndpointConnectionProperties", modelProperties: { - ...MultiMetricCriteria.type.modelProperties, - operator: { - serializedName: "operator", - required: true, - type: { - name: "String" - } - }, - threshold: { - serializedName: "threshold", - required: true, - type: { - name: "Number" - } - } + ...PrivateEndpointConnectionPropertiesAutoGenerated.type.modelProperties } } }; -export const DynamicMetricCriteria: coreClient.CompositeMapper = { - serializedName: "DynamicThresholdCriterion", +export const PrivateEndpointConnectionPropertiesPrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DynamicMetricCriteria", - uberParent: "MultiMetricCriteria", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: MultiMetricCriteria.type.polymorphicDiscriminator, + className: "PrivateEndpointConnectionPropertiesPrivateEndpoint", modelProperties: { - ...MultiMetricCriteria.type.modelProperties, - operator: { - serializedName: "operator", - required: true, - type: { - name: "String" - } - }, - alertSensitivity: { - serializedName: "alertSensitivity", - required: true, - type: { - name: "String" - } - }, - failingPeriods: { - serializedName: "failingPeriods", - type: { - name: "Composite", - className: "DynamicThresholdFailingPeriods" - } - }, - ignoreDataBefore: { - serializedName: "ignoreDataBefore", - type: { - name: "DateTime" - } - } + ...PrivateEndpoint.type.modelProperties } } }; -export const AzureMonitorPrivateLinkScope: coreClient.CompositeMapper = { +export const PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureMonitorPrivateLinkScope", + className: + "PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState", modelProperties: { - ...TrackedResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - }, - accessModeSettings: { - serializedName: "properties.accessModeSettings", - type: { - name: "Composite", - className: "AccessModeSettings" - } - } + ...PrivateLinkServiceConnectionState.type.modelProperties } } }; -export const ScopedResource: coreClient.CompositeMapper = { +export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScopedResource", + className: "TrackedResource", modelProperties: { - ...ProxyResourceAutoGenerated.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - linkedResourceId: { - serializedName: "properties.linkedResourceId", + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + location: { + serializedName: "location", + required: true, type: { name: "String" } @@ -8329,7 +659,7 @@ export const AzureMonitorWorkspaceResource: coreClient.CompositeMapper = { name: "Composite", className: "AzureMonitorWorkspaceResource", modelProperties: { - ...TrackedResourceAutoGenerated.type.modelProperties, + ...TrackedResource.type.modelProperties, etag: { serializedName: "etag", readOnly: true, @@ -8364,49 +694,23 @@ export const AzureMonitorWorkspaceResource: coreClient.CompositeMapper = { name: "Composite", className: "AzureMonitorWorkspaceDefaultIngestionSettings" } - } - } - } -}; - -export const ActionGroupsPostTestNotificationsHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionGroupsPostTestNotificationsHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - } - } - } -}; - -export const ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActionGroupsCreateNotificationsAtResourceGroupLevelHeaders", - modelProperties: { - location: { - serializedName: "location", + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } } - } - } - } -}; - -export const ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: - "ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders", - modelProperties: { - location: { - serializedName: "location", + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + readOnly: true, type: { name: "String" } @@ -8414,23 +718,3 @@ export const ActionGroupsCreateNotificationsAtActionGroupResourceLevelHeaders: c } } }; - -export let discriminators = { - RuleCondition: RuleCondition, - RuleDataSource: RuleDataSource, - RuleAction: RuleAction, - MetricAlertCriteria: MetricAlertCriteria, - MultiMetricCriteria: MultiMetricCriteria, - "RuleCondition.Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition": ThresholdRuleCondition, - "RuleCondition.Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition": LocationThresholdRuleCondition, - "RuleCondition.Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition": ManagementEventRuleCondition, - "RuleDataSource.Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource": RuleMetricDataSource, - "RuleDataSource.Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource": RuleManagementEventDataSource, - "RuleAction.Microsoft.Azure.Management.Insights.Models.RuleEmailAction": RuleEmailAction, - "RuleAction.Microsoft.Azure.Management.Insights.Models.RuleWebhookAction": RuleWebhookAction, - "MetricAlertCriteria.Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria": MetricAlertSingleResourceMultipleMetricCriteria, - "MetricAlertCriteria.Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria": WebtestLocationAvailabilityCriteria, - "MetricAlertCriteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria": MetricAlertMultipleResourceMultipleMetricCriteria, - "MultiMetricCriteria.StaticThresholdCriterion": MetricCriteria, - "MultiMetricCriteria.DynamicThresholdCriterion": DynamicMetricCriteria -}; diff --git a/sdk/monitor/arm-monitor/src/models/parameters.ts b/sdk/monitor/arm-monitor/src/models/parameters.ts index 720e12797aa6..21c9d0d27364 100644 --- a/sdk/monitor/arm-monitor/src/models/parameters.ts +++ b/sdk/monitor/arm-monitor/src/models/parameters.ts @@ -12,31 +12,6 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - AutoscaleSettingResource as AutoscaleSettingResourceMapper, - AutoscaleSettingResourcePatch as AutoscaleSettingResourcePatchMapper, - AlertRuleResource as AlertRuleResourceMapper, - AlertRuleResourcePatch as AlertRuleResourcePatchMapper, - LogProfileResource as LogProfileResourceMapper, - LogProfileResourcePatch as LogProfileResourcePatchMapper, - DiagnosticSettingsResource as DiagnosticSettingsResourceMapper, - ActionGroupResource as ActionGroupResourceMapper, - ActionGroupPatchBody as ActionGroupPatchBodyMapper, - NotificationRequestBody as NotificationRequestBodyMapper, - EnableRequest as EnableRequestMapper, - MetricAlertResource as MetricAlertResourceMapper, - MetricAlertResourcePatch as MetricAlertResourcePatchMapper, - ScheduledQueryRuleResource as ScheduledQueryRuleResourceMapper, - ScheduledQueryRuleResourcePatch as ScheduledQueryRuleResourcePatchMapper, - AzureMonitorPrivateLinkScope as AzureMonitorPrivateLinkScopeMapper, - TagsResource as TagsResourceMapper, - PrivateEndpointConnection as PrivateEndpointConnectionMapper, - ScopedResource as ScopedResourceMapper, - ActivityLogAlertResource as ActivityLogAlertResourceMapper, - AlertRulePatchObject as AlertRulePatchObjectMapper, - DataCollectionEndpointResource as DataCollectionEndpointResourceMapper, - ResourceForUpdate as ResourceForUpdateMapper, - DataCollectionRuleAssociationProxyOnlyResource as DataCollectionRuleAssociationProxyOnlyResourceMapper, - DataCollectionRuleResource as DataCollectionRuleResourceMapper, AzureMonitorWorkspaceResource as AzureMonitorWorkspaceResourceMapper, AzureMonitorWorkspaceResourceForUpdate as AzureMonitorWorkspaceResourceForUpdateMapper } from "../models/mappers"; @@ -65,6 +40,20 @@ export const $host: OperationURLParameter = { skipEncoding: true }; +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "subscriptionId", + required: true, + type: { + name: "String" + } + } +}; + export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -83,7 +72,7 @@ export const resourceGroupName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-10-01", + defaultValue: "2023-04-03", isConstant: true, serializedName: "api-version", type: { @@ -92,13 +81,13 @@ export const apiVersion: OperationQueryParameter = { } }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", +export const azureMonitorWorkspaceName: OperationURLParameter = { + parameterPath: "azureMonitorWorkspaceName", mapper: { constraints: { - MinLength: 1 + Pattern: new RegExp("^(?!-)[a-zA-Z0-9-]+[^-]$") }, - serializedName: "subscriptionId", + serializedName: "azureMonitorWorkspaceName", required: true, type: { name: "String" @@ -118,25 +107,14 @@ export const contentType: OperationParameter = { } }; -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: AutoscaleSettingResourceMapper -}; - -export const autoscaleSettingName: OperationURLParameter = { - parameterPath: "autoscaleSettingName", - mapper: { - serializedName: "autoscaleSettingName", - required: true, - type: { - name: "String" - } - } +export const azureMonitorWorkspaceProperties: OperationParameter = { + parameterPath: "azureMonitorWorkspaceProperties", + mapper: AzureMonitorWorkspaceResourceMapper }; -export const autoscaleSettingResource: OperationParameter = { - parameterPath: "autoscaleSettingResource", - mapper: AutoscaleSettingResourcePatchMapper +export const azureMonitorWorkspaceProperties1: OperationParameter = { + parameterPath: ["options", "azureMonitorWorkspaceProperties"], + mapper: AzureMonitorWorkspaceResourceForUpdateMapper }; export const nextLink: OperationURLParameter = { @@ -150,689 +128,3 @@ export const nextLink: OperationURLParameter = { }, skipEncoding: true }; - -export const timespan: OperationQueryParameter = { - parameterPath: "timespan", - mapper: { - serializedName: "timespan", - required: true, - type: { - name: "String" - } - } -}; - -export const interval: OperationQueryParameter = { - parameterPath: "interval", - mapper: { - serializedName: "interval", - required: true, - type: { - name: "TimeSpan" - } - } -}; - -export const metricNamespace: OperationQueryParameter = { - parameterPath: "metricNamespace", - mapper: { - serializedName: "metricNamespace", - required: true, - type: { - name: "String" - } - } -}; - -export const metricName: OperationQueryParameter = { - parameterPath: "metricName", - mapper: { - serializedName: "metricName", - required: true, - type: { - name: "String" - } - } -}; - -export const aggregation: OperationQueryParameter = { - parameterPath: "aggregation", - mapper: { - serializedName: "aggregation", - required: true, - type: { - name: "String" - } - } -}; - -export const apiVersion1: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2015-04-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const ruleName: OperationURLParameter = { - parameterPath: "ruleName", - mapper: { - serializedName: "ruleName", - required: true, - type: { - name: "String" - } - } -}; - -export const incidentName: OperationURLParameter = { - parameterPath: "incidentName", - mapper: { - serializedName: "incidentName", - required: true, - type: { - name: "String" - } - } -}; - -export const apiVersion2: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2016-03-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: AlertRuleResourceMapper -}; - -export const alertRulesResource: OperationParameter = { - parameterPath: "alertRulesResource", - mapper: AlertRuleResourcePatchMapper -}; - -export const logProfileName: OperationURLParameter = { - parameterPath: "logProfileName", - mapper: { - serializedName: "logProfileName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: LogProfileResourceMapper -}; - -export const logProfilesResource: OperationParameter = { - parameterPath: "logProfilesResource", - mapper: LogProfileResourcePatchMapper -}; - -export const resourceUri: OperationURLParameter = { - parameterPath: "resourceUri", - mapper: { - serializedName: "resourceUri", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const apiVersion3: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-05-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const name: OperationURLParameter = { - parameterPath: "name", - mapper: { - serializedName: "name", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters3: OperationParameter = { - parameterPath: "parameters", - mapper: DiagnosticSettingsResourceMapper -}; - -export const actionGroup: OperationParameter = { - parameterPath: "actionGroup", - mapper: ActionGroupResourceMapper -}; - -export const actionGroupName: OperationURLParameter = { - parameterPath: "actionGroupName", - mapper: { - serializedName: "actionGroupName", - required: true, - type: { - name: "String" - } - } -}; - -export const apiVersion4: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2022-06-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const actionGroupPatch: OperationParameter = { - parameterPath: "actionGroupPatch", - mapper: ActionGroupPatchBodyMapper -}; - -export const notificationRequest: OperationParameter = { - parameterPath: "notificationRequest", - mapper: NotificationRequestBodyMapper -}; - -export const notificationId: OperationURLParameter = { - parameterPath: "notificationId", - mapper: { - serializedName: "notificationId", - required: true, - type: { - name: "String" - } - } -}; - -export const enableRequest: OperationParameter = { - parameterPath: "enableRequest", - mapper: EnableRequestMapper -}; - -export const filter: OperationQueryParameter = { - parameterPath: "filter", - mapper: { - serializedName: "$filter", - required: true, - type: { - name: "String" - } - } -}; - -export const select: OperationQueryParameter = { - parameterPath: ["options", "select"], - mapper: { - serializedName: "$select", - type: { - name: "String" - } - } -}; - -export const filter1: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - type: { - name: "String" - } - } -}; - -export const apiVersion5: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2018-01-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const metricnamespace: OperationQueryParameter = { - parameterPath: ["options", "metricnamespace"], - mapper: { - serializedName: "metricnamespace", - type: { - name: "String" - } - } -}; - -export const timespan1: OperationQueryParameter = { - parameterPath: ["options", "timespan"], - mapper: { - serializedName: "timespan", - type: { - name: "String" - } - } -}; - -export const interval1: OperationQueryParameter = { - parameterPath: ["options", "interval"], - mapper: { - serializedName: "interval", - type: { - name: "TimeSpan" - } - } -}; - -export const metricnames: OperationQueryParameter = { - parameterPath: ["options", "metricnames"], - mapper: { - serializedName: "metricnames", - type: { - name: "String" - } - } -}; - -export const aggregation1: OperationQueryParameter = { - parameterPath: ["options", "aggregation"], - mapper: { - serializedName: "aggregation", - type: { - name: "String" - } - } -}; - -export const top: OperationQueryParameter = { - parameterPath: ["options", "top"], - mapper: { - serializedName: "top", - type: { - name: "Number" - } - } -}; - -export const orderby: OperationQueryParameter = { - parameterPath: ["options", "orderby"], - mapper: { - serializedName: "orderby", - type: { - name: "String" - } - } -}; - -export const resultType: OperationQueryParameter = { - parameterPath: ["options", "resultType"], - mapper: { - serializedName: "resultType", - type: { - name: "Enum", - allowedValues: ["Data", "Metadata"] - } - } -}; - -export const sensitivities: OperationQueryParameter = { - parameterPath: ["options", "sensitivities"], - mapper: { - serializedName: "sensitivities", - type: { - name: "String" - } - } -}; - -export const apiVersion6: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2019-03-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const apiVersion7: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2018-03-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const parameters4: OperationParameter = { - parameterPath: "parameters", - mapper: MetricAlertResourceMapper -}; - -export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: MetricAlertResourcePatchMapper -}; - -export const statusName: OperationURLParameter = { - parameterPath: "statusName", - mapper: { - serializedName: "statusName", - required: true, - type: { - name: "String" - } - } -}; - -export const apiVersion8: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2022-08-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: ScheduledQueryRuleResourceMapper -}; - -export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: ScheduledQueryRuleResourcePatchMapper -}; - -export const apiVersion9: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2017-12-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const startTime: OperationQueryParameter = { - parameterPath: ["options", "startTime"], - mapper: { - serializedName: "startTime", - type: { - name: "String" - } - } -}; - -export const apiVersion10: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2018-11-27-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const apiVersion11: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-07-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const scopeName: OperationURLParameter = { - parameterPath: "scopeName", - mapper: { - serializedName: "scopeName", - required: true, - type: { - name: "String" - } - } -}; - -export const azureMonitorPrivateLinkScopePayload: OperationParameter = { - parameterPath: "azureMonitorPrivateLinkScopePayload", - mapper: AzureMonitorPrivateLinkScopeMapper -}; - -export const privateLinkScopeTags: OperationParameter = { - parameterPath: "privateLinkScopeTags", - mapper: TagsResourceMapper -}; - -export const asyncOperationId: OperationURLParameter = { - parameterPath: "asyncOperationId", - mapper: { - serializedName: "asyncOperationId", - required: true, - type: { - name: "String" - } - } -}; - -export const groupName: OperationURLParameter = { - parameterPath: "groupName", - mapper: { - serializedName: "groupName", - required: true, - type: { - name: "String" - } - } -}; - -export const privateEndpointConnectionName: OperationURLParameter = { - parameterPath: "privateEndpointConnectionName", - mapper: { - serializedName: "privateEndpointConnectionName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters8: OperationParameter = { - parameterPath: "parameters", - mapper: PrivateEndpointConnectionMapper -}; - -export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: ScopedResourceMapper -}; - -export const activityLogAlertRule: OperationParameter = { - parameterPath: "activityLogAlertRule", - mapper: ActivityLogAlertResourceMapper -}; - -export const activityLogAlertName: OperationURLParameter = { - parameterPath: "activityLogAlertName", - mapper: { - serializedName: "activityLogAlertName", - required: true, - type: { - name: "String" - } - } -}; - -export const apiVersion12: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2020-10-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const activityLogAlertRulePatch: OperationParameter = { - parameterPath: "activityLogAlertRulePatch", - mapper: AlertRulePatchObjectMapper -}; - -export const apiVersion13: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-09-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const dataCollectionEndpointName: OperationURLParameter = { - parameterPath: "dataCollectionEndpointName", - mapper: { - serializedName: "dataCollectionEndpointName", - required: true, - type: { - name: "String" - } - } -}; - -export const body: OperationParameter = { - parameterPath: ["options", "body"], - mapper: DataCollectionEndpointResourceMapper -}; - -export const body1: OperationParameter = { - parameterPath: ["options", "body"], - mapper: ResourceForUpdateMapper -}; - -export const resourceUri1: OperationURLParameter = { - parameterPath: "resourceUri", - mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "resourceUri", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const dataCollectionRuleName: OperationURLParameter = { - parameterPath: "dataCollectionRuleName", - mapper: { - serializedName: "dataCollectionRuleName", - required: true, - type: { - name: "String" - } - } -}; - -export const associationName: OperationURLParameter = { - parameterPath: "associationName", - mapper: { - serializedName: "associationName", - required: true, - type: { - name: "String" - } - } -}; - -export const body2: OperationParameter = { - parameterPath: ["options", "body"], - mapper: DataCollectionRuleAssociationProxyOnlyResourceMapper -}; - -export const body3: OperationParameter = { - parameterPath: ["options", "body"], - mapper: DataCollectionRuleResourceMapper -}; - -export const apiVersion14: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-06-03-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const azureMonitorWorkspaceName: OperationURLParameter = { - parameterPath: "azureMonitorWorkspaceName", - mapper: { - constraints: { - Pattern: new RegExp("^(?!-)[a-zA-Z0-9-]+[^-]$") - }, - serializedName: "azureMonitorWorkspaceName", - required: true, - type: { - name: "String" - } - } -}; - -export const azureMonitorWorkspaceProperties: OperationParameter = { - parameterPath: "azureMonitorWorkspaceProperties", - mapper: AzureMonitorWorkspaceResourceMapper -}; - -export const azureMonitorWorkspaceProperties1: OperationParameter = { - parameterPath: ["options", "azureMonitorWorkspaceProperties"], - mapper: AzureMonitorWorkspaceResourceForUpdateMapper -}; diff --git a/sdk/monitor/arm-monitor/src/monitorClient.ts b/sdk/monitor/arm-monitor/src/monitorClient.ts index 8484a12bf8d9..0948933081de 100644 --- a/sdk/monitor/arm-monitor/src/monitorClient.ts +++ b/sdk/monitor/arm-monitor/src/monitorClient.ts @@ -8,70 +8,17 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { - AutoscaleSettingsImpl, - PredictiveMetricImpl, - OperationsImpl, - AlertRuleIncidentsImpl, - AlertRulesImpl, - LogProfilesImpl, - DiagnosticSettingsImpl, - DiagnosticSettingsCategoryImpl, - ActionGroupsImpl, - ActivityLogsImpl, - EventCategoriesImpl, - TenantActivityLogsImpl, - MetricDefinitionsImpl, - MetricsOperationsImpl, - BaselinesImpl, - MetricAlertsImpl, - MetricAlertsStatusImpl, - ScheduledQueryRulesImpl, - MetricNamespacesImpl, - VMInsightsImpl, - PrivateLinkScopesImpl, - PrivateLinkScopeOperationStatusImpl, - PrivateLinkResourcesImpl, - PrivateEndpointConnectionsImpl, - PrivateLinkScopedResourcesImpl, - ActivityLogAlertsImpl, - DataCollectionEndpointsImpl, - DataCollectionRuleAssociationsImpl, - DataCollectionRulesImpl, AzureMonitorWorkspacesImpl, MonitorOperationsImpl } from "./operations"; import { - AutoscaleSettings, - PredictiveMetric, - Operations, - AlertRuleIncidents, - AlertRules, - LogProfiles, - DiagnosticSettings, - DiagnosticSettingsCategory, - ActionGroups, - ActivityLogs, - EventCategories, - TenantActivityLogs, - MetricDefinitions, - MetricsOperations, - Baselines, - MetricAlerts, - MetricAlertsStatus, - ScheduledQueryRules, - MetricNamespaces, - VMInsights, - PrivateLinkScopes, - PrivateLinkScopeOperationStatus, - PrivateLinkResources, - PrivateEndpointConnections, - PrivateLinkScopedResources, - ActivityLogAlerts, - DataCollectionEndpoints, - DataCollectionRuleAssociations, - DataCollectionRules, AzureMonitorWorkspaces, MonitorOperations } from "./operationsInterfaces"; @@ -80,6 +27,7 @@ import { MonitorClientOptionalParams } from "./models"; export class MonitorClient extends coreClient.ServiceClient { $host: string; subscriptionId: string; + apiVersion: string; /** * Initializes a new instance of the MonitorClient class. @@ -108,7 +56,7 @@ export class MonitorClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-monitor/8.0.0-beta.5`; + const packageDetails = `azsdk-js-arm-monitor/8.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -161,72 +109,40 @@ export class MonitorClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.autoscaleSettings = new AutoscaleSettingsImpl(this); - this.predictiveMetric = new PredictiveMetricImpl(this); - this.operations = new OperationsImpl(this); - this.alertRuleIncidents = new AlertRuleIncidentsImpl(this); - this.alertRules = new AlertRulesImpl(this); - this.logProfiles = new LogProfilesImpl(this); - this.diagnosticSettings = new DiagnosticSettingsImpl(this); - this.diagnosticSettingsCategory = new DiagnosticSettingsCategoryImpl(this); - this.actionGroups = new ActionGroupsImpl(this); - this.activityLogs = new ActivityLogsImpl(this); - this.eventCategories = new EventCategoriesImpl(this); - this.tenantActivityLogs = new TenantActivityLogsImpl(this); - this.metricDefinitions = new MetricDefinitionsImpl(this); - this.metricsOperations = new MetricsOperationsImpl(this); - this.baselines = new BaselinesImpl(this); - this.metricAlerts = new MetricAlertsImpl(this); - this.metricAlertsStatus = new MetricAlertsStatusImpl(this); - this.scheduledQueryRules = new ScheduledQueryRulesImpl(this); - this.metricNamespaces = new MetricNamespacesImpl(this); - this.vMInsights = new VMInsightsImpl(this); - this.privateLinkScopes = new PrivateLinkScopesImpl(this); - this.privateLinkScopeOperationStatus = new PrivateLinkScopeOperationStatusImpl( - this - ); - this.privateLinkResources = new PrivateLinkResourcesImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); - this.privateLinkScopedResources = new PrivateLinkScopedResourcesImpl(this); - this.activityLogAlerts = new ActivityLogAlertsImpl(this); - this.dataCollectionEndpoints = new DataCollectionEndpointsImpl(this); - this.dataCollectionRuleAssociations = new DataCollectionRuleAssociationsImpl( - this - ); - this.dataCollectionRules = new DataCollectionRulesImpl(this); + this.apiVersion = options.apiVersion || "2023-04-03"; this.azureMonitorWorkspaces = new AzureMonitorWorkspacesImpl(this); this.monitorOperations = new MonitorOperationsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } - autoscaleSettings: AutoscaleSettings; - predictiveMetric: PredictiveMetric; - operations: Operations; - alertRuleIncidents: AlertRuleIncidents; - alertRules: AlertRules; - logProfiles: LogProfiles; - diagnosticSettings: DiagnosticSettings; - diagnosticSettingsCategory: DiagnosticSettingsCategory; - actionGroups: ActionGroups; - activityLogs: ActivityLogs; - eventCategories: EventCategories; - tenantActivityLogs: TenantActivityLogs; - metricDefinitions: MetricDefinitions; - metricsOperations: MetricsOperations; - baselines: Baselines; - metricAlerts: MetricAlerts; - metricAlertsStatus: MetricAlertsStatus; - scheduledQueryRules: ScheduledQueryRules; - metricNamespaces: MetricNamespaces; - vMInsights: VMInsights; - privateLinkScopes: PrivateLinkScopes; - privateLinkScopeOperationStatus: PrivateLinkScopeOperationStatus; - privateLinkResources: PrivateLinkResources; - privateEndpointConnections: PrivateEndpointConnections; - privateLinkScopedResources: PrivateLinkScopedResources; - activityLogAlerts: ActivityLogAlerts; - dataCollectionEndpoints: DataCollectionEndpoints; - dataCollectionRuleAssociations: DataCollectionRuleAssociations; - dataCollectionRules: DataCollectionRules; azureMonitorWorkspaces: AzureMonitorWorkspaces; monitorOperations: MonitorOperations; } diff --git a/sdk/monitor/arm-monitor/src/operations/actionGroups.ts b/sdk/monitor/arm-monitor/src/operations/actionGroups.ts deleted file mode 100644 index 586c206a12e9..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/actionGroups.ts +++ /dev/null @@ -1,937 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { ActionGroups } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - ActionGroupResource, - ActionGroupsListBySubscriptionIdOptionalParams, - ActionGroupsListBySubscriptionIdResponse, - ActionGroupsListByResourceGroupOptionalParams, - ActionGroupsListByResourceGroupResponse, - ActionGroupsCreateOrUpdateOptionalParams, - ActionGroupsCreateOrUpdateResponse, - ActionGroupsGetOptionalParams, - ActionGroupsGetResponse, - ActionGroupsDeleteOptionalParams, - ActionGroupPatchBody, - ActionGroupsUpdateOptionalParams, - ActionGroupsUpdateResponse, - NotificationRequestBody, - ActionGroupsPostTestNotificationsOptionalParams, - ActionGroupsPostTestNotificationsResponse, - ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams, - ActionGroupsCreateNotificationsAtResourceGroupLevelResponse, - ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams, - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse, - ActionGroupsGetTestNotificationsOptionalParams, - ActionGroupsGetTestNotificationsResponse, - ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams, - ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse, - ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams, - ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse, - EnableRequest, - ActionGroupsEnableReceiverOptionalParams -} from "../models"; - -/// -/** Class containing ActionGroups operations. */ -export class ActionGroupsImpl implements ActionGroups { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class ActionGroups class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Get a list of all action groups in a subscription. - * @param options The options parameters. - */ - public listBySubscriptionId( - options?: ActionGroupsListBySubscriptionIdOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionIdPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionIdPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionIdPagingPage( - options?: ActionGroupsListBySubscriptionIdOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ActionGroupsListBySubscriptionIdResponse; - result = await this._listBySubscriptionId(options); - yield result.value || []; - } - - private async *listBySubscriptionIdPagingAll( - options?: ActionGroupsListBySubscriptionIdOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionIdPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of all action groups in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ActionGroupsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ActionGroupsListByResourceGroupOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ActionGroupsListByResourceGroupResponse; - result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ActionGroupsListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Create a new action group or update an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param actionGroup The action group to create or use for the update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - actionGroupName: string, - actionGroup: ActionGroupResource, - options?: ActionGroupsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, actionGroupName, actionGroup, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Get an action group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - actionGroupName: string, - options?: ActionGroupsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, actionGroupName, options }, - getOperationSpec - ); - } - - /** - * Delete an action group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - actionGroupName: string, - options?: ActionGroupsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, actionGroupName, options }, - deleteOperationSpec - ); - } - - /** - * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param actionGroupPatch Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - actionGroupName: string, - actionGroupPatch: ActionGroupPatchBody, - options?: ActionGroupsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, actionGroupName, actionGroupPatch, options }, - updateOperationSpec - ); - } - - /** - * Send test notifications to a set of provided receivers - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - async beginPostTestNotifications( - notificationRequest: NotificationRequestBody, - options?: ActionGroupsPostTestNotificationsOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ActionGroupsPostTestNotificationsResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { notificationRequest, options }, - spec: postTestNotificationsOperationSpec - }); - const poller = await createHttpPoller< - ActionGroupsPostTestNotificationsResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Send test notifications to a set of provided receivers - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - async beginPostTestNotificationsAndWait( - notificationRequest: NotificationRequestBody, - options?: ActionGroupsPostTestNotificationsOptionalParams - ): Promise { - const poller = await this.beginPostTestNotifications( - notificationRequest, - options - ); - return poller.pollUntilDone(); - } - - /** - * Send test notifications to a set of provided receivers - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - async beginCreateNotificationsAtResourceGroupLevel( - resourceGroupName: string, - notificationRequest: NotificationRequestBody, - options?: ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams - ): Promise< - SimplePollerLike< - OperationState< - ActionGroupsCreateNotificationsAtResourceGroupLevelResponse - >, - ActionGroupsCreateNotificationsAtResourceGroupLevelResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, notificationRequest, options }, - spec: createNotificationsAtResourceGroupLevelOperationSpec - }); - const poller = await createHttpPoller< - ActionGroupsCreateNotificationsAtResourceGroupLevelResponse, - OperationState< - ActionGroupsCreateNotificationsAtResourceGroupLevelResponse - > - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Send test notifications to a set of provided receivers - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - async beginCreateNotificationsAtResourceGroupLevelAndWait( - resourceGroupName: string, - notificationRequest: NotificationRequestBody, - options?: ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams - ): Promise { - const poller = await this.beginCreateNotificationsAtResourceGroupLevel( - resourceGroupName, - notificationRequest, - options - ); - return poller.pollUntilDone(); - } - - /** - * Send test notifications to a set of provided receivers - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - async beginCreateNotificationsAtActionGroupResourceLevel( - resourceGroupName: string, - actionGroupName: string, - notificationRequest: NotificationRequestBody, - options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams - ): Promise< - SimplePollerLike< - OperationState< - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse - >, - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - actionGroupName, - notificationRequest, - options - }, - spec: createNotificationsAtActionGroupResourceLevelOperationSpec - }); - const poller = await createHttpPoller< - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse, - OperationState< - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse - > - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" - }); - await poller.poll(); - return poller; - } - - /** - * Send test notifications to a set of provided receivers - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - async beginCreateNotificationsAtActionGroupResourceLevelAndWait( - resourceGroupName: string, - actionGroupName: string, - notificationRequest: NotificationRequestBody, - options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams - ): Promise< - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse - > { - const poller = await this.beginCreateNotificationsAtActionGroupResourceLevel( - resourceGroupName, - actionGroupName, - notificationRequest, - options - ); - return poller.pollUntilDone(); - } - - /** - * Get the test notifications by the notification id - * @param notificationId The notification id - * @param options The options parameters. - */ - getTestNotifications( - notificationId: string, - options?: ActionGroupsGetTestNotificationsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { notificationId, options }, - getTestNotificationsOperationSpec - ); - } - - /** - * Get the test notifications by the notification id - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param notificationId The notification id - * @param options The options parameters. - */ - getTestNotificationsAtResourceGroupLevel( - resourceGroupName: string, - notificationId: string, - options?: ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, notificationId, options }, - getTestNotificationsAtResourceGroupLevelOperationSpec - ); - } - - /** - * Get the test notifications by the notification id - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param notificationId The notification id - * @param options The options parameters. - */ - getTestNotificationsAtActionGroupResourceLevel( - resourceGroupName: string, - actionGroupName: string, - notificationId: string, - options?: ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams - ): Promise< - ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse - > { - return this.client.sendOperationRequest( - { resourceGroupName, actionGroupName, notificationId, options }, - getTestNotificationsAtActionGroupResourceLevelOperationSpec - ); - } - - /** - * Get a list of all action groups in a subscription. - * @param options The options parameters. - */ - private _listBySubscriptionId( - options?: ActionGroupsListBySubscriptionIdOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionIdOperationSpec - ); - } - - /** - * Get a list of all action groups in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ActionGroupsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. - * This operation is only supported for Email or SMS receivers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param enableRequest The receiver to re-enable. - * @param options The options parameters. - */ - enableReceiver( - resourceGroupName: string, - actionGroupName: string, - enableRequest: EnableRequest, - options?: ActionGroupsEnableReceiverOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, actionGroupName, enableRequest, options }, - enableReceiverOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ActionGroupResource - }, - 201: { - bodyMapper: Mappers.ActionGroupResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.actionGroup, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.actionGroupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ActionGroupResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.actionGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.actionGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ActionGroupResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.actionGroupPatch, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.actionGroupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const postTestNotificationsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 201: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 202: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 204: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.notificationRequest, - queryParameters: [Parameters.apiVersion4], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const createNotificationsAtResourceGroupLevelOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 201: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 202: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 204: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.notificationRequest, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const createNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/createNotifications", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 201: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 202: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - 204: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.notificationRequest, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.actionGroupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getTestNotificationsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/notificationStatus/{notificationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.notificationId - ], - headerParameters: [Parameters.accept], - serializer -}; -const getTestNotificationsAtResourceGroupLevelOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/notificationStatus/{notificationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.notificationId - ], - headerParameters: [Parameters.accept], - serializer -}; -const getTestNotificationsAtActionGroupResourceLevelOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/notificationStatus/{notificationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TestNotificationDetailsResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.actionGroupName, - Parameters.notificationId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionIdOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ActionGroupList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion4], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ActionGroupList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const enableReceiverOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe", - httpMethod: "POST", - responses: { - 200: {}, - 409: { - isError: true - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.enableRequest, - queryParameters: [Parameters.apiVersion4], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.actionGroupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts b/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts deleted file mode 100644 index 87d37e3a8af9..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts +++ /dev/null @@ -1,489 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ActivityLogAlerts } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - ActivityLogAlertResource, - ActivityLogAlertsListBySubscriptionIdNextOptionalParams, - ActivityLogAlertsListBySubscriptionIdOptionalParams, - ActivityLogAlertsListBySubscriptionIdResponse, - ActivityLogAlertsListByResourceGroupNextOptionalParams, - ActivityLogAlertsListByResourceGroupOptionalParams, - ActivityLogAlertsListByResourceGroupResponse, - ActivityLogAlertsCreateOrUpdateOptionalParams, - ActivityLogAlertsCreateOrUpdateResponse, - ActivityLogAlertsGetOptionalParams, - ActivityLogAlertsGetResponse, - ActivityLogAlertsDeleteOptionalParams, - AlertRulePatchObject, - ActivityLogAlertsUpdateOptionalParams, - ActivityLogAlertsUpdateResponse, - ActivityLogAlertsListBySubscriptionIdNextResponse, - ActivityLogAlertsListByResourceGroupNextResponse -} from "../models"; - -/// -/** Class containing ActivityLogAlerts operations. */ -export class ActivityLogAlertsImpl implements ActivityLogAlerts { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class ActivityLogAlerts class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Get a list of all Activity Log Alert rules in a subscription. - * @param options The options parameters. - */ - public listBySubscriptionId( - options?: ActivityLogAlertsListBySubscriptionIdOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionIdPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionIdPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionIdPagingPage( - options?: ActivityLogAlertsListBySubscriptionIdOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ActivityLogAlertsListBySubscriptionIdResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscriptionId(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionIdNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionIdPagingAll( - options?: ActivityLogAlertsListBySubscriptionIdOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionIdPagingPage(options)) { - yield* page; - } - } - - /** - * Get a list of all Activity Log Alert rules in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ActivityLogAlertsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ActivityLogAlertsListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ActivityLogAlertsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ActivityLogAlertsListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Create a new Activity Log Alert rule or update an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param activityLogAlertName The name of the Activity Log Alert rule. - * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - activityLogAlertName: string, - activityLogAlertRule: ActivityLogAlertResource, - options?: ActivityLogAlertsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - activityLogAlertName, - activityLogAlertRule, - options - }, - createOrUpdateOperationSpec - ); - } - - /** - * Get an Activity Log Alert rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param activityLogAlertName The name of the Activity Log Alert rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - activityLogAlertName: string, - options?: ActivityLogAlertsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, activityLogAlertName, options }, - getOperationSpec - ); - } - - /** - * Delete an Activity Log Alert rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param activityLogAlertName The name of the Activity Log Alert rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - activityLogAlertName: string, - options?: ActivityLogAlertsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, activityLogAlertName, options }, - deleteOperationSpec - ); - } - - /** - * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the - * Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate - * operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param activityLogAlertName The name of the Activity Log Alert rule. - * @param activityLogAlertRulePatch Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - activityLogAlertName: string, - activityLogAlertRulePatch: AlertRulePatchObject, - options?: ActivityLogAlertsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - activityLogAlertName, - activityLogAlertRulePatch, - options - }, - updateOperationSpec - ); - } - - /** - * Get a list of all Activity Log Alert rules in a subscription. - * @param options The options parameters. - */ - private _listBySubscriptionId( - options?: ActivityLogAlertsListBySubscriptionIdOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionIdOperationSpec - ); - } - - /** - * Get a list of all Activity Log Alert rules in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ActivityLogAlertsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * ListBySubscriptionIdNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscriptionId method. - * @param options The options parameters. - */ - private _listBySubscriptionIdNext( - nextLink: string, - options?: ActivityLogAlertsListBySubscriptionIdNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionIdNextOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ActivityLogAlertsListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ActivityLogAlertResource - }, - 201: { - bodyMapper: Mappers.ActivityLogAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - requestBody: Parameters.activityLogAlertRule, - queryParameters: [Parameters.apiVersion12], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.activityLogAlertName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ActivityLogAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - queryParameters: [Parameters.apiVersion12], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.activityLogAlertName - ], - headerParameters: [Parameters.accept], - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - queryParameters: [Parameters.apiVersion12], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.activityLogAlertName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ActivityLogAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - requestBody: Parameters.activityLogAlertRulePatch, - queryParameters: [Parameters.apiVersion12], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.activityLogAlertName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listBySubscriptionIdOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleList - }, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - queryParameters: [Parameters.apiVersion12], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleList - }, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - queryParameters: [Parameters.apiVersion12], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionIdNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleList - }, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleList - }, - default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/activityLogs.ts b/sdk/monitor/arm-monitor/src/operations/activityLogs.ts deleted file mode 100644 index ad27be0e79fc..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/activityLogs.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ActivityLogs } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - EventData, - ActivityLogsListNextOptionalParams, - ActivityLogsListOptionalParams, - ActivityLogsListResponse, - ActivityLogsListNextResponse -} from "../models"; - -/// -/** Class containing ActivityLogs operations. */ -export class ActivityLogsImpl implements ActivityLogs { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class ActivityLogs class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Provides the list of records from the activity logs. - * @param filter Reduces the set of data collected.
This argument is required and it also requires - * at least the start date/time.
The **$filter** argument is very restricted and allows only the - * following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri - * eq 'resourceURI'.
- *List events for a subscription in a time range*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List - * events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq - * 'resourceProviderName'.
- *List events for a correlation Id*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * correlationId eq 'correlationID'.

**NOTE**: No other syntax is allowed. - * @param options The options parameters. - */ - public list( - filter: string, - options?: ActivityLogsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(filter, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(filter, options, settings); - } - }; - } - - private async *listPagingPage( - filter: string, - options?: ActivityLogsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ActivityLogsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(filter, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - filter: string, - options?: ActivityLogsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(filter, options)) { - yield* page; - } - } - - /** - * Provides the list of records from the activity logs. - * @param filter Reduces the set of data collected.
This argument is required and it also requires - * at least the start date/time.
The **$filter** argument is very restricted and allows only the - * following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri - * eq 'resourceURI'.
- *List events for a subscription in a time range*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List - * events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq - * 'resourceProviderName'.
- *List events for a correlation Id*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * correlationId eq 'correlationID'.

**NOTE**: No other syntax is allowed. - * @param options The options parameters. - */ - private _list( - filter: string, - options?: ActivityLogsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { filter, options }, - listOperationSpec - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ActivityLogsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/eventtypes/management/values", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EventDataCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion1, - Parameters.filter, - Parameters.select - ], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EventDataCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/alertRuleIncidents.ts b/sdk/monitor/arm-monitor/src/operations/alertRuleIncidents.ts deleted file mode 100644 index 80aa7721e864..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/alertRuleIncidents.ts +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { AlertRuleIncidents } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - Incident, - AlertRuleIncidentsListByAlertRuleOptionalParams, - AlertRuleIncidentsListByAlertRuleResponse, - AlertRuleIncidentsGetOptionalParams, - AlertRuleIncidentsGetResponse -} from "../models"; - -/// -/** Class containing AlertRuleIncidents operations. */ -export class AlertRuleIncidentsImpl implements AlertRuleIncidents { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class AlertRuleIncidents class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Gets a list of incidents associated to an alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - public listByAlertRule( - resourceGroupName: string, - ruleName: string, - options?: AlertRuleIncidentsListByAlertRuleOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByAlertRulePagingAll( - resourceGroupName, - ruleName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByAlertRulePagingPage( - resourceGroupName, - ruleName, - options, - settings - ); - } - }; - } - - private async *listByAlertRulePagingPage( - resourceGroupName: string, - ruleName: string, - options?: AlertRuleIncidentsListByAlertRuleOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: AlertRuleIncidentsListByAlertRuleResponse; - result = await this._listByAlertRule(resourceGroupName, ruleName, options); - yield result.value || []; - } - - private async *listByAlertRulePagingAll( - resourceGroupName: string, - ruleName: string, - options?: AlertRuleIncidentsListByAlertRuleOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByAlertRulePagingPage( - resourceGroupName, - ruleName, - options - )) { - yield* page; - } - } - - /** - * Gets an incident associated to an alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ruleName: string, - incidentName: string, - options?: AlertRuleIncidentsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, incidentName, options }, - getOperationSpec - ); - } - - /** - * Gets a list of incidents associated to an alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - private _listByAlertRule( - resourceGroupName: string, - ruleName: string, - options?: AlertRuleIncidentsListByAlertRuleOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, options }, - listByAlertRuleOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents/{incidentName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Incident - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName, - Parameters.incidentName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByAlertRuleOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IncidentListResult - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/alertRules.ts b/sdk/monitor/arm-monitor/src/operations/alertRules.ts deleted file mode 100644 index a9c71c40c9b7..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/alertRules.ts +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { AlertRules } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - AlertRuleResource, - AlertRulesListByResourceGroupOptionalParams, - AlertRulesListByResourceGroupResponse, - AlertRulesListBySubscriptionOptionalParams, - AlertRulesListBySubscriptionResponse, - AlertRulesCreateOrUpdateOptionalParams, - AlertRulesCreateOrUpdateResponse, - AlertRulesDeleteOptionalParams, - AlertRulesGetOptionalParams, - AlertRulesGetResponse, - AlertRuleResourcePatch, - AlertRulesUpdateOptionalParams, - AlertRulesUpdateResponse -} from "../models"; - -/// -/** Class containing AlertRules operations. */ -export class AlertRulesImpl implements AlertRules { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class AlertRules class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * List the classic metric alert rules within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: AlertRulesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: AlertRulesListByResourceGroupOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: AlertRulesListByResourceGroupResponse; - result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: AlertRulesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * List the classic metric alert rules within a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: AlertRulesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: AlertRulesListBySubscriptionOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: AlertRulesListBySubscriptionResponse; - result = await this._listBySubscription(options); - yield result.value || []; - } - - private async *listBySubscriptionPagingAll( - options?: AlertRulesListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Creates or updates a classic metric alert rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - ruleName: string, - parameters: AlertRuleResource, - options?: AlertRulesCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Deletes a classic metric alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - ruleName: string, - options?: AlertRulesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, options }, - deleteOperationSpec - ); - } - - /** - * Gets a classic metric alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ruleName: string, - options?: AlertRulesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, options }, - getOperationSpec - ); - } - - /** - * Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate - * method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param alertRulesResource Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - ruleName: string, - alertRulesResource: AlertRuleResourcePatch, - options?: AlertRulesUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, alertRulesResource, options }, - updateOperationSpec - ); - } - - /** - * List the classic metric alert rules within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: AlertRulesListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * List the classic metric alert rules within a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: AlertRulesListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResource - }, - 201: { - bodyMapper: Mappers.AlertRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResource - }, - 201: { - bodyMapper: Mappers.AlertRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.alertRulesResource, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/autoscaleSettings.ts b/sdk/monitor/arm-monitor/src/operations/autoscaleSettings.ts deleted file mode 100644 index f4930cf25476..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/autoscaleSettings.ts +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { AutoscaleSettings } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - AutoscaleSettingResource, - AutoscaleSettingsListByResourceGroupNextOptionalParams, - AutoscaleSettingsListByResourceGroupOptionalParams, - AutoscaleSettingsListByResourceGroupResponse, - AutoscaleSettingsListBySubscriptionNextOptionalParams, - AutoscaleSettingsListBySubscriptionOptionalParams, - AutoscaleSettingsListBySubscriptionResponse, - AutoscaleSettingsCreateOrUpdateOptionalParams, - AutoscaleSettingsCreateOrUpdateResponse, - AutoscaleSettingsDeleteOptionalParams, - AutoscaleSettingsGetOptionalParams, - AutoscaleSettingsGetResponse, - AutoscaleSettingResourcePatch, - AutoscaleSettingsUpdateOptionalParams, - AutoscaleSettingsUpdateResponse, - AutoscaleSettingsListByResourceGroupNextResponse, - AutoscaleSettingsListBySubscriptionNextResponse -} from "../models"; - -/// -/** Class containing AutoscaleSettings operations. */ -export class AutoscaleSettingsImpl implements AutoscaleSettings { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class AutoscaleSettings class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Lists the autoscale settings for a resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: AutoscaleSettingsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: AutoscaleSettingsListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AutoscaleSettingsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: AutoscaleSettingsListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Lists the autoscale settings for a subscription - * @param options The options parameters. - */ - public listBySubscription( - options?: AutoscaleSettingsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: AutoscaleSettingsListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: AutoscaleSettingsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: AutoscaleSettingsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Lists the autoscale settings for a resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: AutoscaleSettingsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Creates or updates an autoscale setting. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - autoscaleSettingName: string, - parameters: AutoscaleSettingResource, - options?: AutoscaleSettingsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, autoscaleSettingName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Deletes and autoscale setting - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - autoscaleSettingName: string, - options?: AutoscaleSettingsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, autoscaleSettingName, options }, - deleteOperationSpec - ); - } - - /** - * Gets an autoscale setting - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - autoscaleSettingName: string, - options?: AutoscaleSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, autoscaleSettingName, options }, - getOperationSpec - ); - } - - /** - * Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param autoscaleSettingResource Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - autoscaleSettingName: string, - autoscaleSettingResource: AutoscaleSettingResourcePatch, - options?: AutoscaleSettingsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - autoscaleSettingName, - autoscaleSettingResource, - options - }, - updateOperationSpec - ); - } - - /** - * Lists the autoscale settings for a subscription - * @param options The options parameters. - */ - private _listBySubscription( - options?: AutoscaleSettingsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: AutoscaleSettingsListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: AutoscaleSettingsListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResourceCollection - }, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResource - }, - 201: { - bodyMapper: Mappers.AutoscaleSettingResource - }, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.autoscaleSettingName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.autoscaleSettingName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResource - }, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.autoscaleSettingName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResource - }, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - requestBody: Parameters.autoscaleSettingResource, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.autoscaleSettingName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResourceCollection - }, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResourceCollection - }, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResourceCollection - }, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/azureMonitorWorkspaces.ts b/sdk/monitor/arm-monitor/src/operations/azureMonitorWorkspaces.ts index 607208075284..c40ca88fddea 100644 --- a/sdk/monitor/arm-monitor/src/operations/azureMonitorWorkspaces.ts +++ b/sdk/monitor/arm-monitor/src/operations/azureMonitorWorkspaces.ts @@ -320,14 +320,14 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AzureMonitorWorkspaceResourceListResult }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName ], headerParameters: [Parameters.accept], serializer @@ -340,10 +340,10 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AzureMonitorWorkspaceResourceListResult }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -357,14 +357,14 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AzureMonitorWorkspaceResource }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.azureMonitorWorkspaceName ], headerParameters: [Parameters.accept], @@ -382,15 +382,15 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AzureMonitorWorkspaceResource }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.azureMonitorWorkspaceProperties, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.azureMonitorWorkspaceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -406,15 +406,15 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AzureMonitorWorkspaceResource }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, requestBody: Parameters.azureMonitorWorkspaceProperties1, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.azureMonitorWorkspaceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -429,14 +429,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.azureMonitorWorkspaceName ], headerParameters: [Parameters.accept], @@ -450,13 +450,13 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AzureMonitorWorkspaceResourceListResult }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [ Parameters.$host, - Parameters.resourceGroupName, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -470,7 +470,7 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.AzureMonitorWorkspaceResourceListResult }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [ diff --git a/sdk/monitor/arm-monitor/src/operations/baselines.ts b/sdk/monitor/arm-monitor/src/operations/baselines.ts deleted file mode 100644 index 5c7c5fa1abab..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/baselines.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Baselines } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - SingleMetricBaseline, - BaselinesListOptionalParams, - BaselinesListResponse -} from "../models"; - -/// -/** Class containing Baselines operations. */ -export class BaselinesImpl implements Baselines { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class Baselines class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * **Lists the metric baseline values for a resource**. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: BaselinesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceUri, options, settings); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: BaselinesListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: BaselinesListResponse; - result = await this._list(resourceUri, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceUri: string, - options?: BaselinesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * **Lists the metric baseline values for a resource**. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: BaselinesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.Insights/metricBaselines", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricBaselinesResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter1, - Parameters.metricnamespace, - Parameters.timespan1, - Parameters.interval1, - Parameters.metricnames, - Parameters.aggregation1, - Parameters.resultType, - Parameters.sensitivities, - Parameters.apiVersion6 - ], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/dataCollectionEndpoints.ts b/sdk/monitor/arm-monitor/src/operations/dataCollectionEndpoints.ts deleted file mode 100644 index 7bc434d0a6f3..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/dataCollectionEndpoints.ts +++ /dev/null @@ -1,476 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DataCollectionEndpoints } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - DataCollectionEndpointResource, - DataCollectionEndpointsListByResourceGroupNextOptionalParams, - DataCollectionEndpointsListByResourceGroupOptionalParams, - DataCollectionEndpointsListByResourceGroupResponse, - DataCollectionEndpointsListBySubscriptionNextOptionalParams, - DataCollectionEndpointsListBySubscriptionOptionalParams, - DataCollectionEndpointsListBySubscriptionResponse, - DataCollectionEndpointsGetOptionalParams, - DataCollectionEndpointsGetResponse, - DataCollectionEndpointsCreateOptionalParams, - DataCollectionEndpointsCreateResponse, - DataCollectionEndpointsUpdateOptionalParams, - DataCollectionEndpointsUpdateResponse, - DataCollectionEndpointsDeleteOptionalParams, - DataCollectionEndpointsListByResourceGroupNextResponse, - DataCollectionEndpointsListBySubscriptionNextResponse -} from "../models"; - -/// -/** Class containing DataCollectionEndpoints operations. */ -export class DataCollectionEndpointsImpl implements DataCollectionEndpoints { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class DataCollectionEndpoints class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Lists all data collection endpoints in the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: DataCollectionEndpointsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: DataCollectionEndpointsListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DataCollectionEndpointsListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: DataCollectionEndpointsListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Lists all data collection endpoints in the specified subscription - * @param options The options parameters. - */ - public listBySubscription( - options?: DataCollectionEndpointsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: DataCollectionEndpointsListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DataCollectionEndpointsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: DataCollectionEndpointsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all data collection endpoints in the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: DataCollectionEndpointsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Lists all data collection endpoints in the specified subscription - * @param options The options parameters. - */ - private _listBySubscription( - options?: DataCollectionEndpointsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * Returns the specified data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionEndpointsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionEndpointName, options }, - getOperationSpec - ); - } - - /** - * Creates or updates a data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionEndpointsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionEndpointName, options }, - createOperationSpec - ); - } - - /** - * Updates part of a data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionEndpointsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionEndpointName, options }, - updateOperationSpec - ); - } - - /** - * Deletes a data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionEndpointsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionEndpointName, options }, - deleteOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: DataCollectionEndpointsListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: DataCollectionEndpointsListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionEndpointResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionEndpoints", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionEndpointResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionEndpointResource - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionEndpointName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionEndpointResource - }, - 201: { - bodyMapper: Mappers.DataCollectionEndpointResource - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionEndpointName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionEndpointResource - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - requestBody: Parameters.body1, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionEndpointName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionEndpointName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionEndpointResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionEndpointResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/dataCollectionRuleAssociations.ts b/sdk/monitor/arm-monitor/src/operations/dataCollectionRuleAssociations.ts deleted file mode 100644 index 51bceb3ab96d..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/dataCollectionRuleAssociations.ts +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DataCollectionRuleAssociations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - DataCollectionRuleAssociationProxyOnlyResource, - DataCollectionRuleAssociationsListByResourceNextOptionalParams, - DataCollectionRuleAssociationsListByResourceOptionalParams, - DataCollectionRuleAssociationsListByResourceResponse, - DataCollectionRuleAssociationsListByRuleNextOptionalParams, - DataCollectionRuleAssociationsListByRuleOptionalParams, - DataCollectionRuleAssociationsListByRuleResponse, - DataCollectionRuleAssociationsListByDataCollectionEndpointNextOptionalParams, - DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams, - DataCollectionRuleAssociationsListByDataCollectionEndpointResponse, - DataCollectionRuleAssociationsGetOptionalParams, - DataCollectionRuleAssociationsGetResponse, - DataCollectionRuleAssociationsCreateOptionalParams, - DataCollectionRuleAssociationsCreateResponse, - DataCollectionRuleAssociationsDeleteOptionalParams, - DataCollectionRuleAssociationsListByResourceNextResponse, - DataCollectionRuleAssociationsListByRuleNextResponse, - DataCollectionRuleAssociationsListByDataCollectionEndpointNextResponse -} from "../models"; - -/// -/** Class containing DataCollectionRuleAssociations operations. */ -export class DataCollectionRuleAssociationsImpl - implements DataCollectionRuleAssociations { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class DataCollectionRuleAssociations class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Lists associations for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - public listByResource( - resourceUri: string, - options?: DataCollectionRuleAssociationsListByResourceOptionalParams - ): PagedAsyncIterableIterator< - DataCollectionRuleAssociationProxyOnlyResource - > { - const iter = this.listByResourcePagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourcePagingPage(resourceUri, options, settings); - } - }; - } - - private async *listByResourcePagingPage( - resourceUri: string, - options?: DataCollectionRuleAssociationsListByResourceOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DataCollectionRuleAssociationsListByResourceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResource(resourceUri, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceNext( - resourceUri, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourcePagingAll( - resourceUri: string, - options?: DataCollectionRuleAssociationsListByResourceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourcePagingPage( - resourceUri, - options - )) { - yield* page; - } - } - - /** - * Lists associations for the specified data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - public listByRule( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRuleAssociationsListByRuleOptionalParams - ): PagedAsyncIterableIterator< - DataCollectionRuleAssociationProxyOnlyResource - > { - const iter = this.listByRulePagingAll( - resourceGroupName, - dataCollectionRuleName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByRulePagingPage( - resourceGroupName, - dataCollectionRuleName, - options, - settings - ); - } - }; - } - - private async *listByRulePagingPage( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRuleAssociationsListByRuleOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DataCollectionRuleAssociationsListByRuleResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByRule( - resourceGroupName, - dataCollectionRuleName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByRuleNext( - resourceGroupName, - dataCollectionRuleName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByRulePagingAll( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRuleAssociationsListByRuleOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByRulePagingPage( - resourceGroupName, - dataCollectionRuleName, - options - )) { - yield* page; - } - } - - /** - * Lists associations for the specified data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - public listByDataCollectionEndpoint( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams - ): PagedAsyncIterableIterator< - DataCollectionRuleAssociationProxyOnlyResource - > { - const iter = this.listByDataCollectionEndpointPagingAll( - resourceGroupName, - dataCollectionEndpointName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByDataCollectionEndpointPagingPage( - resourceGroupName, - dataCollectionEndpointName, - options, - settings - ); - } - }; - } - - private async *listByDataCollectionEndpointPagingPage( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DataCollectionRuleAssociationsListByDataCollectionEndpointResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByDataCollectionEndpoint( - resourceGroupName, - dataCollectionEndpointName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByDataCollectionEndpointNext( - resourceGroupName, - dataCollectionEndpointName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByDataCollectionEndpointPagingAll( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByDataCollectionEndpointPagingPage( - resourceGroupName, - dataCollectionEndpointName, - options - )) { - yield* page; - } - } - - /** - * Lists associations for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - private _listByResource( - resourceUri: string, - options?: DataCollectionRuleAssociationsListByResourceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listByResourceOperationSpec - ); - } - - /** - * Lists associations for the specified data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - private _listByRule( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRuleAssociationsListByRuleOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionRuleName, options }, - listByRuleOperationSpec - ); - } - - /** - * Lists associations for the specified data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - private _listByDataCollectionEndpoint( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams - ): Promise< - DataCollectionRuleAssociationsListByDataCollectionEndpointResponse - > { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionEndpointName, options }, - listByDataCollectionEndpointOperationSpec - ); - } - - /** - * Returns the specified association. - * @param resourceUri The identifier of the resource. - * @param associationName The name of the association. The name is case insensitive. - * @param options The options parameters. - */ - get( - resourceUri: string, - associationName: string, - options?: DataCollectionRuleAssociationsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, associationName, options }, - getOperationSpec - ); - } - - /** - * Creates or updates an association. - * @param resourceUri The identifier of the resource. - * @param associationName The name of the association. The name is case insensitive. - * @param options The options parameters. - */ - create( - resourceUri: string, - associationName: string, - options?: DataCollectionRuleAssociationsCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, associationName, options }, - createOperationSpec - ); - } - - /** - * Deletes an association. - * @param resourceUri The identifier of the resource. - * @param associationName The name of the association. The name is case insensitive. - * @param options The options parameters. - */ - delete( - resourceUri: string, - associationName: string, - options?: DataCollectionRuleAssociationsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, associationName, options }, - deleteOperationSpec - ); - } - - /** - * ListByResourceNext - * @param resourceUri The identifier of the resource. - * @param nextLink The nextLink from the previous successful call to the ListByResource method. - * @param options The options parameters. - */ - private _listByResourceNext( - resourceUri: string, - nextLink: string, - options?: DataCollectionRuleAssociationsListByResourceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, nextLink, options }, - listByResourceNextOperationSpec - ); - } - - /** - * ListByRuleNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByRule method. - * @param options The options parameters. - */ - private _listByRuleNext( - resourceGroupName: string, - dataCollectionRuleName: string, - nextLink: string, - options?: DataCollectionRuleAssociationsListByRuleNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionRuleName, nextLink, options }, - listByRuleNextOperationSpec - ); - } - - /** - * ListByDataCollectionEndpointNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByDataCollectionEndpoint - * method. - * @param options The options parameters. - */ - private _listByDataCollectionEndpointNext( - resourceGroupName: string, - dataCollectionEndpointName: string, - nextLink: string, - options?: DataCollectionRuleAssociationsListByDataCollectionEndpointNextOptionalParams - ): Promise< - DataCollectionRuleAssociationsListByDataCollectionEndpointNextResponse - > { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionEndpointName, nextLink, options }, - listByDataCollectionEndpointNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByResourceOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: - Mappers.DataCollectionRuleAssociationProxyOnlyResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [Parameters.$host, Parameters.resourceUri1], - headerParameters: [Parameters.accept], - serializer -}; -const listByRuleOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}/associations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: - Mappers.DataCollectionRuleAssociationProxyOnlyResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionRuleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByDataCollectionEndpointOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}/associations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: - Mappers.DataCollectionRuleAssociationProxyOnlyResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionEndpointName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleAssociationProxyOnlyResource - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri1, - Parameters.associationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleAssociationProxyOnlyResource - }, - 201: { - bodyMapper: Mappers.DataCollectionRuleAssociationProxyOnlyResource - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri1, - Parameters.associationName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri1, - Parameters.associationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: - Mappers.DataCollectionRuleAssociationProxyOnlyResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.resourceUri1 - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByRuleNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: - Mappers.DataCollectionRuleAssociationProxyOnlyResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.dataCollectionRuleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByDataCollectionEndpointNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: - Mappers.DataCollectionRuleAssociationProxyOnlyResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.dataCollectionEndpointName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/dataCollectionRules.ts b/sdk/monitor/arm-monitor/src/operations/dataCollectionRules.ts deleted file mode 100644 index df8ae456aef4..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/dataCollectionRules.ts +++ /dev/null @@ -1,472 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DataCollectionRules } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - DataCollectionRuleResource, - DataCollectionRulesListByResourceGroupNextOptionalParams, - DataCollectionRulesListByResourceGroupOptionalParams, - DataCollectionRulesListByResourceGroupResponse, - DataCollectionRulesListBySubscriptionNextOptionalParams, - DataCollectionRulesListBySubscriptionOptionalParams, - DataCollectionRulesListBySubscriptionResponse, - DataCollectionRulesGetOptionalParams, - DataCollectionRulesGetResponse, - DataCollectionRulesCreateOptionalParams, - DataCollectionRulesCreateResponse, - DataCollectionRulesUpdateOptionalParams, - DataCollectionRulesUpdateResponse, - DataCollectionRulesDeleteOptionalParams, - DataCollectionRulesListByResourceGroupNextResponse, - DataCollectionRulesListBySubscriptionNextResponse -} from "../models"; - -/// -/** Class containing DataCollectionRules operations. */ -export class DataCollectionRulesImpl implements DataCollectionRules { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class DataCollectionRules class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Lists all data collection rules in the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: DataCollectionRulesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: DataCollectionRulesListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DataCollectionRulesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: DataCollectionRulesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Lists all data collection rules in the specified subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: DataCollectionRulesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: DataCollectionRulesListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: DataCollectionRulesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: DataCollectionRulesListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all data collection rules in the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: DataCollectionRulesListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Lists all data collection rules in the specified subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: DataCollectionRulesListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * Returns the specified data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRulesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionRuleName, options }, - getOperationSpec - ); - } - - /** - * Creates or updates a data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRulesCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionRuleName, options }, - createOperationSpec - ); - } - - /** - * Updates part of a data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRulesUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionRuleName, options }, - updateOperationSpec - ); - } - - /** - * Deletes a data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRulesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, dataCollectionRuleName, options }, - deleteOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: DataCollectionRulesListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: DataCollectionRulesListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionRuleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleResource - }, - 201: { - bodyMapper: Mappers.DataCollectionRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - requestBody: Parameters.body3, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionRuleName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - requestBody: Parameters.body1, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionRuleName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - queryParameters: [Parameters.apiVersion13], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.dataCollectionRuleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataCollectionRuleResourceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponseCommonV2 - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/diagnosticSettings.ts b/sdk/monitor/arm-monitor/src/operations/diagnosticSettings.ts deleted file mode 100644 index 416c6f18f6d5..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/diagnosticSettings.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { DiagnosticSettings } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - DiagnosticSettingsResource, - DiagnosticSettingsListOptionalParams, - DiagnosticSettingsListResponse, - DiagnosticSettingsGetOptionalParams, - DiagnosticSettingsGetResponse, - DiagnosticSettingsCreateOrUpdateOptionalParams, - DiagnosticSettingsCreateOrUpdateResponse, - DiagnosticSettingsDeleteOptionalParams -} from "../models"; - -/// -/** Class containing DiagnosticSettings operations. */ -export class DiagnosticSettingsImpl implements DiagnosticSettings { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class DiagnosticSettings class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Gets the active diagnostic settings list for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: DiagnosticSettingsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceUri, options, settings); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: DiagnosticSettingsListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: DiagnosticSettingsListResponse; - result = await this._list(resourceUri, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceUri: string, - options?: DiagnosticSettingsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Gets the active diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The options parameters. - */ - get( - resourceUri: string, - name: string, - options?: DiagnosticSettingsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, name, options }, - getOperationSpec - ); - } - - /** - * Creates or updates diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param parameters Parameters supplied to the operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceUri: string, - name: string, - parameters: DiagnosticSettingsResource, - options?: DiagnosticSettingsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, name, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Deletes existing diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The options parameters. - */ - delete( - resourceUri: string, - name: string, - options?: DiagnosticSettingsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, name, options }, - deleteOperationSpec - ); - } - - /** - * Gets the active diagnostic settings list for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: DiagnosticSettingsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion3], - urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/diagnosticSettingsCategory.ts b/sdk/monitor/arm-monitor/src/operations/diagnosticSettingsCategory.ts deleted file mode 100644 index 19bdf9571d7a..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/diagnosticSettingsCategory.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { DiagnosticSettingsCategory } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - DiagnosticSettingsCategoryResource, - DiagnosticSettingsCategoryListOptionalParams, - DiagnosticSettingsCategoryListResponse, - DiagnosticSettingsCategoryGetOptionalParams, - DiagnosticSettingsCategoryGetResponse -} from "../models"; - -/// -/** Class containing DiagnosticSettingsCategory operations. */ -export class DiagnosticSettingsCategoryImpl - implements DiagnosticSettingsCategory { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class DiagnosticSettingsCategory class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Lists the diagnostic settings categories for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: DiagnosticSettingsCategoryListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceUri, options, settings); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: DiagnosticSettingsCategoryListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: DiagnosticSettingsCategoryListResponse; - result = await this._list(resourceUri, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceUri: string, - options?: DiagnosticSettingsCategoryListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Gets the diagnostic settings category for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The options parameters. - */ - get( - resourceUri: string, - name: string, - options?: DiagnosticSettingsCategoryGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, name, options }, - getOperationSpec - ); - } - - /** - * Lists the diagnostic settings categories for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: DiagnosticSettingsCategoryListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsCategoryResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [Parameters.$host, Parameters.resourceUri, Parameters.name], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsCategoryResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/eventCategories.ts b/sdk/monitor/arm-monitor/src/operations/eventCategories.ts deleted file mode 100644 index 06b81c9146b1..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/eventCategories.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { EventCategories } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - LocalizableString, - EventCategoriesListOptionalParams, - EventCategoriesListResponse -} from "../models"; - -/// -/** Class containing EventCategories operations. */ -export class EventCategoriesImpl implements EventCategories { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class EventCategories class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Get the list of available event categories supported in the Activity Logs Service.
The current - * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * @param options The options parameters. - */ - public list( - options?: EventCategoriesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: EventCategoriesListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: EventCategoriesListResponse; - result = await this._list(options); - yield result.value || []; - } - - private async *listPagingAll( - options?: EventCategoriesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Get the list of available event categories supported in the Activity Logs Service.
The current - * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * @param options The options parameters. - */ - private _list( - options?: EventCategoriesListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Insights/eventcategories", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EventCategoryCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/index.ts b/sdk/monitor/arm-monitor/src/operations/index.ts index 772a7d4d63ff..de4937cf4612 100644 --- a/sdk/monitor/arm-monitor/src/operations/index.ts +++ b/sdk/monitor/arm-monitor/src/operations/index.ts @@ -6,34 +6,5 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./autoscaleSettings"; -export * from "./predictiveMetric"; -export * from "./operations"; -export * from "./alertRuleIncidents"; -export * from "./alertRules"; -export * from "./logProfiles"; -export * from "./diagnosticSettings"; -export * from "./diagnosticSettingsCategory"; -export * from "./actionGroups"; -export * from "./activityLogs"; -export * from "./eventCategories"; -export * from "./tenantActivityLogs"; -export * from "./metricDefinitions"; -export * from "./metricsOperations"; -export * from "./baselines"; -export * from "./metricAlerts"; -export * from "./metricAlertsStatus"; -export * from "./scheduledQueryRules"; -export * from "./metricNamespaces"; -export * from "./vMInsights"; -export * from "./privateLinkScopes"; -export * from "./privateLinkScopeOperationStatus"; -export * from "./privateLinkResources"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkScopedResources"; -export * from "./activityLogAlerts"; -export * from "./dataCollectionEndpoints"; -export * from "./dataCollectionRuleAssociations"; -export * from "./dataCollectionRules"; export * from "./azureMonitorWorkspaces"; export * from "./monitorOperations"; diff --git a/sdk/monitor/arm-monitor/src/operations/logProfiles.ts b/sdk/monitor/arm-monitor/src/operations/logProfiles.ts deleted file mode 100644 index 4fb57d8e48b5..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/logProfiles.ts +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { LogProfiles } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - LogProfileResource, - LogProfilesListOptionalParams, - LogProfilesListResponse, - LogProfilesDeleteOptionalParams, - LogProfilesGetOptionalParams, - LogProfilesGetResponse, - LogProfilesCreateOrUpdateOptionalParams, - LogProfilesCreateOrUpdateResponse, - LogProfileResourcePatch, - LogProfilesUpdateOptionalParams, - LogProfilesUpdateResponse -} from "../models"; - -/// -/** Class containing LogProfiles operations. */ -export class LogProfilesImpl implements LogProfiles { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class LogProfiles class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * List the log profiles. - * @param options The options parameters. - */ - public list( - options?: LogProfilesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: LogProfilesListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: LogProfilesListResponse; - result = await this._list(options); - yield result.value || []; - } - - private async *listPagingAll( - options?: LogProfilesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Deletes the log profile. - * @param logProfileName The name of the log profile. - * @param options The options parameters. - */ - delete( - logProfileName: string, - options?: LogProfilesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { logProfileName, options }, - deleteOperationSpec - ); - } - - /** - * Gets the log profile. - * @param logProfileName The name of the log profile. - * @param options The options parameters. - */ - get( - logProfileName: string, - options?: LogProfilesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { logProfileName, options }, - getOperationSpec - ); - } - - /** - * Create or update a log profile in Azure Monitoring REST API. - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @param options The options parameters. - */ - createOrUpdate( - logProfileName: string, - parameters: LogProfileResource, - options?: LogProfilesCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { logProfileName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * @param logProfileName The name of the log profile. - * @param logProfilesResource Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - logProfileName: string, - logProfilesResource: LogProfileResourcePatch, - options?: LogProfilesUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { logProfileName, logProfilesResource, options }, - updateOperationSpec - ); - } - - /** - * List the log profiles. - * @param options The options parameters. - */ - private _list( - options?: LogProfilesListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}", - httpMethod: "DELETE", - responses: { 200: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.logProfileName - ], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LogProfileResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.logProfileName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LogProfileResource - } - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.logProfileName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LogProfileResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.logProfilesResource, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.logProfileName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LogProfileCollection - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts b/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts deleted file mode 100644 index a47b7e6616e3..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { MetricAlerts } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - MetricAlertResource, - MetricAlertsListBySubscriptionOptionalParams, - MetricAlertsListBySubscriptionResponse, - MetricAlertsListByResourceGroupOptionalParams, - MetricAlertsListByResourceGroupResponse, - MetricAlertsGetOptionalParams, - MetricAlertsGetResponse, - MetricAlertsCreateOrUpdateOptionalParams, - MetricAlertsCreateOrUpdateResponse, - MetricAlertResourcePatch, - MetricAlertsUpdateOptionalParams, - MetricAlertsUpdateResponse, - MetricAlertsDeleteOptionalParams -} from "../models"; - -/// -/** Class containing MetricAlerts operations. */ -export class MetricAlertsImpl implements MetricAlerts { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class MetricAlerts class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Retrieve alert rule definitions in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: MetricAlertsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: MetricAlertsListBySubscriptionOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: MetricAlertsListBySubscriptionResponse; - result = await this._listBySubscription(options); - yield result.value || []; - } - - private async *listBySubscriptionPagingAll( - options?: MetricAlertsListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieve alert rule definitions in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: MetricAlertsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: MetricAlertsListByResourceGroupOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: MetricAlertsListByResourceGroupResponse; - result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: MetricAlertsListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Retrieve alert rule definitions in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: MetricAlertsListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * Retrieve alert rule definitions in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: MetricAlertsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Retrieve an alert rule definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ruleName: string, - options?: MetricAlertsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, options }, - getOperationSpec - ); - } - - /** - * Create or update an metric alert definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - ruleName: string, - parameters: MetricAlertResource, - options?: MetricAlertsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Update an metric alert definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - ruleName: string, - parameters: MetricAlertResourcePatch, - options?: MetricAlertsUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, parameters, options }, - updateOperationSpec - ); - } - - /** - * Delete an alert rule definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - ruleName: string, - options?: MetricAlertsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, options }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion7], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion7], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion7], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion7], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion7], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion7], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts b/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts deleted file mode 100644 index 65d81ff00171..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { MetricAlertsStatus } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - MetricAlertsStatusListOptionalParams, - MetricAlertsStatusListResponse, - MetricAlertsStatusListByNameOptionalParams, - MetricAlertsStatusListByNameResponse -} from "../models"; - -/** Class containing MetricAlertsStatus operations. */ -export class MetricAlertsStatusImpl implements MetricAlertsStatus { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class MetricAlertsStatus class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Retrieve an alert rule status. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - ruleName: string, - options?: MetricAlertsStatusListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, options }, - listOperationSpec - ); - } - - /** - * Retrieve an alert rule status. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param statusName The name of the status. - * @param options The options parameters. - */ - listByName( - resourceGroupName: string, - ruleName: string, - statusName: string, - options?: MetricAlertsStatusListByNameOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, statusName, options }, - listByNameOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricAlertStatusCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion7], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByNameOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricAlertStatusCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion7], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName, - Parameters.statusName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricDefinitions.ts b/sdk/monitor/arm-monitor/src/operations/metricDefinitions.ts deleted file mode 100644 index e63fa4aab82d..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricDefinitions.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { MetricDefinitions } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - MetricDefinition, - MetricDefinitionsListOptionalParams, - MetricDefinitionsListResponse -} from "../models"; - -/// -/** Class containing MetricDefinitions operations. */ -export class MetricDefinitionsImpl implements MetricDefinitions { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class MetricDefinitions class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Lists the metric definitions for the resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: MetricDefinitionsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceUri, options, settings); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: MetricDefinitionsListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: MetricDefinitionsListResponse; - result = await this._list(resourceUri, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceUri: string, - options?: MetricDefinitionsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Lists the metric definitions for the resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: MetricDefinitionsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.Insights/metricDefinitions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricDefinitionCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion5, Parameters.metricnamespace], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts b/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts deleted file mode 100644 index 65ef9597becc..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { MetricNamespaces } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - MetricNamespace, - MetricNamespacesListOptionalParams, - MetricNamespacesListResponse -} from "../models"; - -/// -/** Class containing MetricNamespaces operations. */ -export class MetricNamespacesImpl implements MetricNamespaces { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class MetricNamespaces class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Lists the metric namespaces for the resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - public list( - resourceUri: string, - options?: MetricNamespacesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceUri, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(resourceUri, options, settings); - } - }; - } - - private async *listPagingPage( - resourceUri: string, - options?: MetricNamespacesListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: MetricNamespacesListResponse; - result = await this._list(resourceUri, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceUri: string, - options?: MetricNamespacesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(resourceUri, options)) { - yield* page; - } - } - - /** - * Lists the metric namespaces for the resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - private _list( - resourceUri: string, - options?: MetricNamespacesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/microsoft.insights/metricNamespaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricNamespaceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion9, Parameters.startTime], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricsOperations.ts b/sdk/monitor/arm-monitor/src/operations/metricsOperations.ts deleted file mode 100644 index 257b46781186..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricsOperations.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { MetricsOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { MetricsListOptionalParams, MetricsListResponse } from "../models"; - -/** Class containing MetricsOperations operations. */ -export class MetricsOperationsImpl implements MetricsOperations { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class MetricsOperations class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * **Lists the metric values for a resource**. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: MetricsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.Insights/metrics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Response - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.filter1, - Parameters.apiVersion5, - Parameters.metricnamespace, - Parameters.timespan1, - Parameters.interval1, - Parameters.metricnames, - Parameters.aggregation1, - Parameters.top, - Parameters.orderby, - Parameters.resultType - ], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/monitorOperations.ts b/sdk/monitor/arm-monitor/src/operations/monitorOperations.ts index bed37b715908..45d82add9318 100644 --- a/sdk/monitor/arm-monitor/src/operations/monitorOperations.ts +++ b/sdk/monitor/arm-monitor/src/operations/monitorOperations.ts @@ -14,7 +14,7 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MonitorClient } from "../monitorClient"; import { - OperationAutoGenerated, + Operation, MonitorOperationsListNextOptionalParams, MonitorOperationsListOptionalParams, MonitorOperationsListResponse, @@ -40,7 +40,7 @@ export class MonitorOperationsImpl implements MonitorOperations { */ public list( options?: MonitorOperationsListOptionalParams - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -61,7 +61,7 @@ export class MonitorOperationsImpl implements MonitorOperations { private async *listPagingPage( options?: MonitorOperationsListOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result: MonitorOperationsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { @@ -82,7 +82,7 @@ export class MonitorOperationsImpl implements MonitorOperations { private async *listPagingAll( options?: MonitorOperationsListOptionalParams - ): AsyncIterableIterator { + ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; } @@ -121,13 +121,13 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResultAutoGenerated + bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion14], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], serializer @@ -137,10 +137,10 @@ const listNextOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResultAutoGenerated + bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.ErrorResponseAutoGenerated2 + bodyMapper: Mappers.ErrorResponse } }, urlParameters: [Parameters.$host, Parameters.nextLink], diff --git a/sdk/monitor/arm-monitor/src/operations/operations.ts b/sdk/monitor/arm-monitor/src/operations/operations.ts deleted file mode 100644 index d9c5ceca0a06..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/operations.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { Operations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - OperationsListOptionalParams, - OperationsListResponse -} from "../models"; - -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Lists all of the available operations from Microsoft.Insights provider. - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Insights/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult - } - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/predictiveMetric.ts b/sdk/monitor/arm-monitor/src/operations/predictiveMetric.ts deleted file mode 100644 index 2aebcbf6ba75..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/predictiveMetric.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PredictiveMetric } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - PredictiveMetricGetOptionalParams, - PredictiveMetricGetResponse -} from "../models"; - -/** Class containing PredictiveMetric operations. */ -export class PredictiveMetricImpl implements PredictiveMetric { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class PredictiveMetric class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * get predictive autoscale metric future data - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param timespan The timespan of the query. It is a string with the following format - * 'startDateTime_ISO/endDateTime_ISO'. - * @param interval The interval (i.e. timegrain) of the query. - * @param metricNamespace Metric namespace to query metric definitions for. - * @param metricName The names of the metrics (comma separated) to retrieve. Special case: If a - * metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be - * **'Metric%2Name1'** - * @param aggregation The list of aggregation types (comma separated) to retrieve. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - autoscaleSettingName: string, - timespan: string, - interval: string, - metricNamespace: string, - metricName: string, - aggregation: string, - options?: PredictiveMetricGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - autoscaleSettingName, - timespan, - interval, - metricNamespace, - metricName, - aggregation, - options - }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}/predictiveMetrics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PredictiveResponse - }, - default: { - bodyMapper: Mappers.AutoscaleErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.timespan, - Parameters.interval, - Parameters.metricNamespace, - Parameters.metricName, - Parameters.aggregation - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.autoscaleSettingName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/privateEndpointConnections.ts b/sdk/monitor/arm-monitor/src/operations/privateEndpointConnections.ts deleted file mode 100644 index 172bd4ed24ed..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/privateEndpointConnections.ts +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PrivateEndpointConnections } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - PrivateEndpointConnectionsGetOptionalParams, - PrivateEndpointConnectionsGetResponse, - PrivateEndpointConnection, - PrivateEndpointConnectionsCreateOrUpdateOptionalParams, - PrivateEndpointConnectionsCreateOrUpdateResponse, - PrivateEndpointConnectionsDeleteOptionalParams, - PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams, - PrivateEndpointConnectionsListByPrivateLinkScopeResponse -} from "../models"; - -/** Class containing PrivateEndpointConnections operations. */ -export class PrivateEndpointConnectionsImpl - implements PrivateEndpointConnections { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class PrivateEndpointConnections class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Gets a private endpoint connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, privateEndpointConnectionName, options }, - getOperationSpec - ); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The Private Endpoint Connection resource. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - parameters: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointConnectionsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - scopeName, - privateEndpointConnectionName, - parameters, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - PrivateEndpointConnectionsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The Private Endpoint Connection resource. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - parameters: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - scopeName, - privateEndpointConnectionName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - scopeName, - privateEndpointConnectionName, - options - }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - scopeName, - privateEndpointConnectionName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Gets all private endpoint connections on a private link scope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - listByPrivateLinkScope( - resourceGroupName: string, - scopeName: string, - options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, options }, - listByPrivateLinkScopeOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 201: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 202: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - 204: { - bodyMapper: Mappers.PrivateEndpointConnection - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName, - Parameters.privateEndpointConnectionName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByPrivateLinkScopeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/privateLinkResources.ts b/sdk/monitor/arm-monitor/src/operations/privateLinkResources.ts deleted file mode 100644 index 8d83df363410..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/privateLinkResources.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PrivateLinkResources } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - PrivateLinkResourcesListByPrivateLinkScopeOptionalParams, - PrivateLinkResourcesListByPrivateLinkScopeResponse, - PrivateLinkResourcesGetOptionalParams, - PrivateLinkResourcesGetResponse -} from "../models"; - -/** Class containing PrivateLinkResources operations. */ -export class PrivateLinkResourcesImpl implements PrivateLinkResources { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class PrivateLinkResources class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - listByPrivateLinkScope( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, options }, - listByPrivateLinkScopeOperationSpec - ); - } - - /** - * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param groupName The name of the private link resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - scopeName: string, - groupName: string, - options?: PrivateLinkResourcesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, groupName, options }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByPrivateLinkScopeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateLinkResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResource - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName, - Parameters.groupName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/privateLinkScopeOperationStatus.ts b/sdk/monitor/arm-monitor/src/operations/privateLinkScopeOperationStatus.ts deleted file mode 100644 index 17aeeea26cfb..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/privateLinkScopeOperationStatus.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PrivateLinkScopeOperationStatus } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - PrivateLinkScopeOperationStatusGetOptionalParams, - PrivateLinkScopeOperationStatusGetResponse -} from "../models"; - -/** Class containing PrivateLinkScopeOperationStatus operations. */ -export class PrivateLinkScopeOperationStatusImpl - implements PrivateLinkScopeOperationStatus { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class PrivateLinkScopeOperationStatus class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Get the status of an azure asynchronous operation associated with a private link scope operation. - * @param asyncOperationId The operation Id. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - get( - asyncOperationId: string, - resourceGroupName: string, - options?: PrivateLinkScopeOperationStatusGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { asyncOperationId, resourceGroupName, options }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopeOperationStatuses/{asyncOperationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.asyncOperationId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/privateLinkScopedResources.ts b/sdk/monitor/arm-monitor/src/operations/privateLinkScopedResources.ts deleted file mode 100644 index 3f86e1345fb4..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/privateLinkScopedResources.ts +++ /dev/null @@ -1,501 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PrivateLinkScopedResources } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - ScopedResource, - PrivateLinkScopedResourcesListByPrivateLinkScopeNextOptionalParams, - PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams, - PrivateLinkScopedResourcesListByPrivateLinkScopeResponse, - PrivateLinkScopedResourcesGetOptionalParams, - PrivateLinkScopedResourcesGetResponse, - PrivateLinkScopedResourcesCreateOrUpdateOptionalParams, - PrivateLinkScopedResourcesCreateOrUpdateResponse, - PrivateLinkScopedResourcesDeleteOptionalParams, - PrivateLinkScopedResourcesListByPrivateLinkScopeNextResponse -} from "../models"; - -/// -/** Class containing PrivateLinkScopedResources operations. */ -export class PrivateLinkScopedResourcesImpl - implements PrivateLinkScopedResources { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class PrivateLinkScopedResources class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Gets all private endpoint connections on a private link scope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - public listByPrivateLinkScope( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByPrivateLinkScopePagingAll( - resourceGroupName, - scopeName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByPrivateLinkScopePagingPage( - resourceGroupName, - scopeName, - options, - settings - ); - } - }; - } - - private async *listByPrivateLinkScopePagingPage( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: PrivateLinkScopedResourcesListByPrivateLinkScopeResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByPrivateLinkScope( - resourceGroupName, - scopeName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByPrivateLinkScopeNext( - resourceGroupName, - scopeName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByPrivateLinkScopePagingAll( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByPrivateLinkScopePagingPage( - resourceGroupName, - scopeName, - options - )) { - yield* page; - } - } - - /** - * Gets a scoped resource in a private link scope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - scopeName: string, - name: string, - options?: PrivateLinkScopedResourcesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, name, options }, - getOperationSpec - ); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param parameters A private link scoped resource - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - scopeName: string, - name: string, - parameters: ScopedResource, - options?: PrivateLinkScopedResourcesCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PrivateLinkScopedResourcesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, scopeName, name, parameters, options }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - PrivateLinkScopedResourcesCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param parameters A private link scoped resource - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - scopeName: string, - name: string, - parameters: ScopedResource, - options?: PrivateLinkScopedResourcesCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - scopeName, - name, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - scopeName: string, - name: string, - options?: PrivateLinkScopedResourcesDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, scopeName, name, options }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - scopeName: string, - name: string, - options?: PrivateLinkScopedResourcesDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - scopeName, - name, - options - ); - return poller.pollUntilDone(); - } - - /** - * Gets all private endpoint connections on a private link scope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - private _listByPrivateLinkScope( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, options }, - listByPrivateLinkScopeOperationSpec - ); - } - - /** - * ListByPrivateLinkScopeNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param nextLink The nextLink from the previous successful call to the ListByPrivateLinkScope method. - * @param options The options parameters. - */ - private _listByPrivateLinkScopeNext( - resourceGroupName: string, - scopeName: string, - nextLink: string, - options?: PrivateLinkScopedResourcesListByPrivateLinkScopeNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, nextLink, options }, - listByPrivateLinkScopeNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScopedResource - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.name, - Parameters.scopeName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ScopedResource - }, - 201: { - bodyMapper: Mappers.ScopedResource - }, - 202: { - bodyMapper: Mappers.ScopedResource - }, - 204: { - bodyMapper: Mappers.ScopedResource - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.name, - Parameters.scopeName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.name, - Parameters.scopeName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByPrivateLinkScopeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScopedResourceListResult - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByPrivateLinkScopeNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScopedResourceListResult - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.scopeName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/privateLinkScopes.ts b/sdk/monitor/arm-monitor/src/operations/privateLinkScopes.ts deleted file mode 100644 index 8589c22dc234..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/privateLinkScopes.ts +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PrivateLinkScopes } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - AzureMonitorPrivateLinkScope, - PrivateLinkScopesListNextOptionalParams, - PrivateLinkScopesListOptionalParams, - PrivateLinkScopesListResponse, - PrivateLinkScopesListByResourceGroupNextOptionalParams, - PrivateLinkScopesListByResourceGroupOptionalParams, - PrivateLinkScopesListByResourceGroupResponse, - PrivateLinkScopesDeleteOptionalParams, - PrivateLinkScopesGetOptionalParams, - PrivateLinkScopesGetResponse, - PrivateLinkScopesCreateOrUpdateOptionalParams, - PrivateLinkScopesCreateOrUpdateResponse, - TagsResource, - PrivateLinkScopesUpdateTagsOptionalParams, - PrivateLinkScopesUpdateTagsResponse, - PrivateLinkScopesListNextResponse, - PrivateLinkScopesListByResourceGroupNextResponse -} from "../models"; - -/// -/** Class containing PrivateLinkScopes operations. */ -export class PrivateLinkScopesImpl implements PrivateLinkScopes { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class PrivateLinkScopes class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * @param options The options parameters. - */ - public list( - options?: PrivateLinkScopesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: PrivateLinkScopesListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: PrivateLinkScopesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: PrivateLinkScopesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: PrivateLinkScopesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: PrivateLinkScopesListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: PrivateLinkScopesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: PrivateLinkScopesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * @param options The options parameters. - */ - private _list( - options?: PrivateLinkScopesListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: PrivateLinkScopesListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Deletes a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopesDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, scopeName, options }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopesDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - scopeName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Returns a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, options }, - getOperationSpec - ); - } - - /** - * Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value - * for InstrumentationKey nor AppId in the Put operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param azureMonitorPrivateLinkScopePayload Properties that need to be specified to create or update - * a Azure Monitor PrivateLinkScope. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - scopeName: string, - azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope, - options?: PrivateLinkScopesCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - scopeName, - azureMonitorPrivateLinkScopePayload, - options - }, - createOrUpdateOperationSpec - ); - } - - /** - * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - scopeName: string, - privateLinkScopeTags: TagsResource, - options?: PrivateLinkScopesUpdateTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, scopeName, privateLinkScopeTags, options }, - updateTagsOperationSpec - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: PrivateLinkScopesListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: PrivateLinkScopesListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/microsoft.insights/privateLinkScopes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureMonitorPrivateLinkScopeListResult - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureMonitorPrivateLinkScopeListResult - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureMonitorPrivateLinkScope - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AzureMonitorPrivateLinkScope - }, - 201: { - bodyMapper: Mappers.AzureMonitorPrivateLinkScope - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - requestBody: Parameters.azureMonitorPrivateLinkScopePayload, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AzureMonitorPrivateLinkScope - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - requestBody: Parameters.privateLinkScopeTags, - queryParameters: [Parameters.apiVersion11], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.scopeName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureMonitorPrivateLinkScopeListResult - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureMonitorPrivateLinkScopeListResult - }, - default: { - bodyMapper: Mappers.DefaultErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts b/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts deleted file mode 100644 index cad03c26e444..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ScheduledQueryRules } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - ScheduledQueryRuleResource, - ScheduledQueryRulesListBySubscriptionNextOptionalParams, - ScheduledQueryRulesListBySubscriptionOptionalParams, - ScheduledQueryRulesListBySubscriptionResponse, - ScheduledQueryRulesListByResourceGroupNextOptionalParams, - ScheduledQueryRulesListByResourceGroupOptionalParams, - ScheduledQueryRulesListByResourceGroupResponse, - ScheduledQueryRulesGetOptionalParams, - ScheduledQueryRulesGetResponse, - ScheduledQueryRulesCreateOrUpdateOptionalParams, - ScheduledQueryRulesCreateOrUpdateResponse, - ScheduledQueryRuleResourcePatch, - ScheduledQueryRulesUpdateOptionalParams, - ScheduledQueryRulesUpdateResponse, - ScheduledQueryRulesDeleteOptionalParams, - ScheduledQueryRulesListBySubscriptionNextResponse, - ScheduledQueryRulesListByResourceGroupNextResponse -} from "../models"; - -/// -/** Class containing ScheduledQueryRules operations. */ -export class ScheduledQueryRulesImpl implements ScheduledQueryRules { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class ScheduledQueryRules class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Retrieve a scheduled query rule definitions in a subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: ScheduledQueryRulesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - } - }; - } - - private async *listBySubscriptionPagingPage( - options?: ScheduledQueryRulesListBySubscriptionOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ScheduledQueryRulesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: ScheduledQueryRulesListBySubscriptionOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Retrieve scheduled query rule definitions in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ScheduledQueryRulesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ScheduledQueryRulesListByResourceGroupOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: ScheduledQueryRulesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ScheduledQueryRulesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Retrieve a scheduled query rule definitions in a subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: ScheduledQueryRulesListBySubscriptionOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec - ); - } - - /** - * Retrieve scheduled query rule definitions in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ScheduledQueryRulesListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Retrieve an scheduled query rule definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ruleName: string, - options?: ScheduledQueryRulesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, options }, - getOperationSpec - ); - } - - /** - * Creates or updates a scheduled query rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - ruleName: string, - parameters: ScheduledQueryRuleResource, - options?: ScheduledQueryRulesCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Update a scheduled query rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - ruleName: string, - parameters: ScheduledQueryRuleResourcePatch, - options?: ScheduledQueryRulesUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, parameters, options }, - updateOperationSpec - ); - } - - /** - * Deletes a scheduled query rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - ruleName: string, - options?: ScheduledQueryRulesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, ruleName, options }, - deleteOperationSpec - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: ScheduledQueryRulesListBySubscriptionNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ScheduledQueryRulesListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/scheduledQueryRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScheduledQueryRuleResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorContract - } - }, - queryParameters: [Parameters.apiVersion8], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScheduledQueryRuleResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorContract - } - }, - queryParameters: [Parameters.apiVersion8], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScheduledQueryRuleResource - }, - default: { - bodyMapper: Mappers.ErrorContract - } - }, - queryParameters: [Parameters.apiVersion8], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ScheduledQueryRuleResource - }, - 201: { - bodyMapper: Mappers.ScheduledQueryRuleResource - }, - default: { - bodyMapper: Mappers.ErrorContract - } - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion8], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ScheduledQueryRuleResource - }, - default: { - bodyMapper: Mappers.ErrorContract - } - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion8], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorContract - } - }, - queryParameters: [Parameters.apiVersion8], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.ruleName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScheduledQueryRuleResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorContract - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ScheduledQueryRuleResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorContract - } - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/tenantActivityLogs.ts b/sdk/monitor/arm-monitor/src/operations/tenantActivityLogs.ts deleted file mode 100644 index 9ad3a25eca1a..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/tenantActivityLogs.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { TenantActivityLogs } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - EventData, - TenantActivityLogsListNextOptionalParams, - TenantActivityLogsListOptionalParams, - TenantActivityLogsListResponse, - TenantActivityLogsListNextResponse -} from "../models"; - -/// -/** Class containing TenantActivityLogs operations. */ -export class TenantActivityLogsImpl implements TenantActivityLogs { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class TenantActivityLogs class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the - * Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One - * thing to point out here is that this API does *not* retrieve the logs at the individual subscription - * of the tenant but only surfaces the logs that were generated at the tenant level. - * @param options The options parameters. - */ - public list( - options?: TenantActivityLogsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: TenantActivityLogsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: TenantActivityLogsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: TenantActivityLogsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the - * Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One - * thing to point out here is that this API does *not* retrieve the logs at the individual subscription - * of the tenant but only surfaces the logs that were generated at the tenant level. - * @param options The options parameters. - */ - private _list( - options?: TenantActivityLogsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: TenantActivityLogsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Insights/eventtypes/management/values", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EventDataCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [ - Parameters.apiVersion1, - Parameters.select, - Parameters.filter1 - ], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EventDataCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/vMInsights.ts b/sdk/monitor/arm-monitor/src/operations/vMInsights.ts deleted file mode 100644 index 01ce4a4a57fd..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/vMInsights.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { VMInsights } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { MonitorClient } from "../monitorClient"; -import { - VMInsightsGetOnboardingStatusOptionalParams, - VMInsightsGetOnboardingStatusResponse -} from "../models"; - -/** Class containing VMInsights operations. */ -export class VMInsightsImpl implements VMInsights { - private readonly client: MonitorClient; - - /** - * Initialize a new instance of the class VMInsights class. - * @param client Reference to the service client - */ - constructor(client: MonitorClient) { - this.client = client; - } - - /** - * Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource, or scope, - * whose status to retrieve. - * @param options The options parameters. - */ - getOnboardingStatus( - resourceUri: string, - options?: VMInsightsGetOnboardingStatusOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, options }, - getOnboardingStatusOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOnboardingStatusOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VMInsightsOnboardingStatus - }, - default: { - bodyMapper: Mappers.ResponseWithError - } - }, - queryParameters: [Parameters.apiVersion10], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/actionGroups.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/actionGroups.ts deleted file mode 100644 index 4c7654b5a4a9..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/actionGroups.ts +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ActionGroupResource, - ActionGroupsListBySubscriptionIdOptionalParams, - ActionGroupsListByResourceGroupOptionalParams, - ActionGroupsCreateOrUpdateOptionalParams, - ActionGroupsCreateOrUpdateResponse, - ActionGroupsGetOptionalParams, - ActionGroupsGetResponse, - ActionGroupsDeleteOptionalParams, - ActionGroupPatchBody, - ActionGroupsUpdateOptionalParams, - ActionGroupsUpdateResponse, - NotificationRequestBody, - ActionGroupsPostTestNotificationsOptionalParams, - ActionGroupsPostTestNotificationsResponse, - ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams, - ActionGroupsCreateNotificationsAtResourceGroupLevelResponse, - ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams, - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse, - ActionGroupsGetTestNotificationsOptionalParams, - ActionGroupsGetTestNotificationsResponse, - ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams, - ActionGroupsGetTestNotificationsAtResourceGroupLevelResponse, - ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams, - ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse, - EnableRequest, - ActionGroupsEnableReceiverOptionalParams -} from "../models"; - -/// -/** Interface representing a ActionGroups. */ -export interface ActionGroups { - /** - * Get a list of all action groups in a subscription. - * @param options The options parameters. - */ - listBySubscriptionId( - options?: ActionGroupsListBySubscriptionIdOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get a list of all action groups in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ActionGroupsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Create a new action group or update an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param actionGroup The action group to create or use for the update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - actionGroupName: string, - actionGroup: ActionGroupResource, - options?: ActionGroupsCreateOrUpdateOptionalParams - ): Promise; - /** - * Get an action group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - actionGroupName: string, - options?: ActionGroupsGetOptionalParams - ): Promise; - /** - * Delete an action group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - actionGroupName: string, - options?: ActionGroupsDeleteOptionalParams - ): Promise; - /** - * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param actionGroupPatch Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - actionGroupName: string, - actionGroupPatch: ActionGroupPatchBody, - options?: ActionGroupsUpdateOptionalParams - ): Promise; - /** - * Send test notifications to a set of provided receivers - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - beginPostTestNotifications( - notificationRequest: NotificationRequestBody, - options?: ActionGroupsPostTestNotificationsOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - ActionGroupsPostTestNotificationsResponse - > - >; - /** - * Send test notifications to a set of provided receivers - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - beginPostTestNotificationsAndWait( - notificationRequest: NotificationRequestBody, - options?: ActionGroupsPostTestNotificationsOptionalParams - ): Promise; - /** - * Send test notifications to a set of provided receivers - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - beginCreateNotificationsAtResourceGroupLevel( - resourceGroupName: string, - notificationRequest: NotificationRequestBody, - options?: ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams - ): Promise< - SimplePollerLike< - OperationState< - ActionGroupsCreateNotificationsAtResourceGroupLevelResponse - >, - ActionGroupsCreateNotificationsAtResourceGroupLevelResponse - > - >; - /** - * Send test notifications to a set of provided receivers - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - beginCreateNotificationsAtResourceGroupLevelAndWait( - resourceGroupName: string, - notificationRequest: NotificationRequestBody, - options?: ActionGroupsCreateNotificationsAtResourceGroupLevelOptionalParams - ): Promise; - /** - * Send test notifications to a set of provided receivers - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - beginCreateNotificationsAtActionGroupResourceLevel( - resourceGroupName: string, - actionGroupName: string, - notificationRequest: NotificationRequestBody, - options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams - ): Promise< - SimplePollerLike< - OperationState< - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse - >, - ActionGroupsCreateNotificationsAtActionGroupResourceLevelResponse - > - >; - /** - * Send test notifications to a set of provided receivers - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param notificationRequest The notification request body which includes the contact details - * @param options The options parameters. - */ - beginCreateNotificationsAtActionGroupResourceLevelAndWait( - resourceGroupName: string, - actionGroupName: string, - notificationRequest: NotificationRequestBody, - options?: ActionGroupsCreateNotificationsAtActionGroupResourceLevelOptionalParams - ): Promise; - /** - * Get the test notifications by the notification id - * @param notificationId The notification id - * @param options The options parameters. - */ - getTestNotifications( - notificationId: string, - options?: ActionGroupsGetTestNotificationsOptionalParams - ): Promise; - /** - * Get the test notifications by the notification id - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param notificationId The notification id - * @param options The options parameters. - */ - getTestNotificationsAtResourceGroupLevel( - resourceGroupName: string, - notificationId: string, - options?: ActionGroupsGetTestNotificationsAtResourceGroupLevelOptionalParams - ): Promise; - /** - * Get the test notifications by the notification id - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param notificationId The notification id - * @param options The options parameters. - */ - getTestNotificationsAtActionGroupResourceLevel( - resourceGroupName: string, - actionGroupName: string, - notificationId: string, - options?: ActionGroupsGetTestNotificationsAtActionGroupResourceLevelOptionalParams - ): Promise< - ActionGroupsGetTestNotificationsAtActionGroupResourceLevelResponse - >; - /** - * Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. - * This operation is only supported for Email or SMS receivers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param actionGroupName The name of the action group. - * @param enableRequest The receiver to re-enable. - * @param options The options parameters. - */ - enableReceiver( - resourceGroupName: string, - actionGroupName: string, - enableRequest: EnableRequest, - options?: ActionGroupsEnableReceiverOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogAlerts.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogAlerts.ts deleted file mode 100644 index 775a56fb1c9f..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogAlerts.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ActivityLogAlertResource, - ActivityLogAlertsListBySubscriptionIdOptionalParams, - ActivityLogAlertsListByResourceGroupOptionalParams, - ActivityLogAlertsCreateOrUpdateOptionalParams, - ActivityLogAlertsCreateOrUpdateResponse, - ActivityLogAlertsGetOptionalParams, - ActivityLogAlertsGetResponse, - ActivityLogAlertsDeleteOptionalParams, - AlertRulePatchObject, - ActivityLogAlertsUpdateOptionalParams, - ActivityLogAlertsUpdateResponse -} from "../models"; - -/// -/** Interface representing a ActivityLogAlerts. */ -export interface ActivityLogAlerts { - /** - * Get a list of all Activity Log Alert rules in a subscription. - * @param options The options parameters. - */ - listBySubscriptionId( - options?: ActivityLogAlertsListBySubscriptionIdOptionalParams - ): PagedAsyncIterableIterator; - /** - * Get a list of all Activity Log Alert rules in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ActivityLogAlertsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Create a new Activity Log Alert rule or update an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param activityLogAlertName The name of the Activity Log Alert rule. - * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - activityLogAlertName: string, - activityLogAlertRule: ActivityLogAlertResource, - options?: ActivityLogAlertsCreateOrUpdateOptionalParams - ): Promise; - /** - * Get an Activity Log Alert rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param activityLogAlertName The name of the Activity Log Alert rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - activityLogAlertName: string, - options?: ActivityLogAlertsGetOptionalParams - ): Promise; - /** - * Delete an Activity Log Alert rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param activityLogAlertName The name of the Activity Log Alert rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - activityLogAlertName: string, - options?: ActivityLogAlertsDeleteOptionalParams - ): Promise; - /** - * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the - * Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate - * operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param activityLogAlertName The name of the Activity Log Alert rule. - * @param activityLogAlertRulePatch Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - activityLogAlertName: string, - activityLogAlertRulePatch: AlertRulePatchObject, - options?: ActivityLogAlertsUpdateOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogs.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogs.ts deleted file mode 100644 index 3747e36c2bf2..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/activityLogs.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { EventData, ActivityLogsListOptionalParams } from "../models"; - -/// -/** Interface representing a ActivityLogs. */ -export interface ActivityLogs { - /** - * Provides the list of records from the activity logs. - * @param filter Reduces the set of data collected.
This argument is required and it also requires - * at least the start date/time.
The **$filter** argument is very restricted and allows only the - * following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri - * eq 'resourceURI'.
- *List events for a subscription in a time range*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List - * events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq - * 'resourceProviderName'.
- *List events for a correlation Id*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * correlationId eq 'correlationID'.

**NOTE**: No other syntax is allowed. - * @param options The options parameters. - */ - list( - filter: string, - options?: ActivityLogsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/alertRuleIncidents.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/alertRuleIncidents.ts deleted file mode 100644 index 1879ba078d03..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/alertRuleIncidents.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - Incident, - AlertRuleIncidentsListByAlertRuleOptionalParams, - AlertRuleIncidentsGetOptionalParams, - AlertRuleIncidentsGetResponse -} from "../models"; - -/// -/** Interface representing a AlertRuleIncidents. */ -export interface AlertRuleIncidents { - /** - * Gets a list of incidents associated to an alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - listByAlertRule( - resourceGroupName: string, - ruleName: string, - options?: AlertRuleIncidentsListByAlertRuleOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets an incident associated to an alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ruleName: string, - incidentName: string, - options?: AlertRuleIncidentsGetOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/alertRules.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/alertRules.ts deleted file mode 100644 index 71aea8243309..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/alertRules.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AlertRuleResource, - AlertRulesListByResourceGroupOptionalParams, - AlertRulesListBySubscriptionOptionalParams, - AlertRulesCreateOrUpdateOptionalParams, - AlertRulesCreateOrUpdateResponse, - AlertRulesDeleteOptionalParams, - AlertRulesGetOptionalParams, - AlertRulesGetResponse, - AlertRuleResourcePatch, - AlertRulesUpdateOptionalParams, - AlertRulesUpdateResponse -} from "../models"; - -/// -/** Interface representing a AlertRules. */ -export interface AlertRules { - /** - * List the classic metric alert rules within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: AlertRulesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * List the classic metric alert rules within a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: AlertRulesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Creates or updates a classic metric alert rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - ruleName: string, - parameters: AlertRuleResource, - options?: AlertRulesCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes a classic metric alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - ruleName: string, - options?: AlertRulesDeleteOptionalParams - ): Promise; - /** - * Gets a classic metric alert rule - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ruleName: string, - options?: AlertRulesGetOptionalParams - ): Promise; - /** - * Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate - * method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param alertRulesResource Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - ruleName: string, - alertRulesResource: AlertRuleResourcePatch, - options?: AlertRulesUpdateOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/autoscaleSettings.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/autoscaleSettings.ts deleted file mode 100644 index 5d28397b09c0..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/autoscaleSettings.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AutoscaleSettingResource, - AutoscaleSettingsListByResourceGroupOptionalParams, - AutoscaleSettingsListBySubscriptionOptionalParams, - AutoscaleSettingsCreateOrUpdateOptionalParams, - AutoscaleSettingsCreateOrUpdateResponse, - AutoscaleSettingsDeleteOptionalParams, - AutoscaleSettingsGetOptionalParams, - AutoscaleSettingsGetResponse, - AutoscaleSettingResourcePatch, - AutoscaleSettingsUpdateOptionalParams, - AutoscaleSettingsUpdateResponse -} from "../models"; - -/// -/** Interface representing a AutoscaleSettings. */ -export interface AutoscaleSettings { - /** - * Lists the autoscale settings for a resource group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: AutoscaleSettingsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists the autoscale settings for a subscription - * @param options The options parameters. - */ - listBySubscription( - options?: AutoscaleSettingsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Creates or updates an autoscale setting. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - autoscaleSettingName: string, - parameters: AutoscaleSettingResource, - options?: AutoscaleSettingsCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes and autoscale setting - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - autoscaleSettingName: string, - options?: AutoscaleSettingsDeleteOptionalParams - ): Promise; - /** - * Gets an autoscale setting - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - autoscaleSettingName: string, - options?: AutoscaleSettingsGetOptionalParams - ): Promise; - /** - * Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param autoscaleSettingResource Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - autoscaleSettingName: string, - autoscaleSettingResource: AutoscaleSettingResourcePatch, - options?: AutoscaleSettingsUpdateOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/baselines.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/baselines.ts deleted file mode 100644 index fa85b4da1607..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/baselines.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SingleMetricBaseline, BaselinesListOptionalParams } from "../models"; - -/// -/** Interface representing a Baselines. */ -export interface Baselines { - /** - * **Lists the metric baseline values for a resource**. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: BaselinesListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionEndpoints.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionEndpoints.ts deleted file mode 100644 index 2645134b52c5..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionEndpoints.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DataCollectionEndpointResource, - DataCollectionEndpointsListByResourceGroupOptionalParams, - DataCollectionEndpointsListBySubscriptionOptionalParams, - DataCollectionEndpointsGetOptionalParams, - DataCollectionEndpointsGetResponse, - DataCollectionEndpointsCreateOptionalParams, - DataCollectionEndpointsCreateResponse, - DataCollectionEndpointsUpdateOptionalParams, - DataCollectionEndpointsUpdateResponse, - DataCollectionEndpointsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a DataCollectionEndpoints. */ -export interface DataCollectionEndpoints { - /** - * Lists all data collection endpoints in the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: DataCollectionEndpointsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all data collection endpoints in the specified subscription - * @param options The options parameters. - */ - listBySubscription( - options?: DataCollectionEndpointsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Returns the specified data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionEndpointsGetOptionalParams - ): Promise; - /** - * Creates or updates a data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionEndpointsCreateOptionalParams - ): Promise; - /** - * Updates part of a data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionEndpointsUpdateOptionalParams - ): Promise; - /** - * Deletes a data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionEndpointsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRuleAssociations.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRuleAssociations.ts deleted file mode 100644 index e73028cefc79..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRuleAssociations.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DataCollectionRuleAssociationProxyOnlyResource, - DataCollectionRuleAssociationsListByResourceOptionalParams, - DataCollectionRuleAssociationsListByRuleOptionalParams, - DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams, - DataCollectionRuleAssociationsGetOptionalParams, - DataCollectionRuleAssociationsGetResponse, - DataCollectionRuleAssociationsCreateOptionalParams, - DataCollectionRuleAssociationsCreateResponse, - DataCollectionRuleAssociationsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a DataCollectionRuleAssociations. */ -export interface DataCollectionRuleAssociations { - /** - * Lists associations for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - listByResource( - resourceUri: string, - options?: DataCollectionRuleAssociationsListByResourceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists associations for the specified data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - listByRule( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRuleAssociationsListByRuleOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists associations for the specified data collection endpoint. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionEndpointName The name of the data collection endpoint. The name is case - * insensitive. - * @param options The options parameters. - */ - listByDataCollectionEndpoint( - resourceGroupName: string, - dataCollectionEndpointName: string, - options?: DataCollectionRuleAssociationsListByDataCollectionEndpointOptionalParams - ): PagedAsyncIterableIterator; - /** - * Returns the specified association. - * @param resourceUri The identifier of the resource. - * @param associationName The name of the association. The name is case insensitive. - * @param options The options parameters. - */ - get( - resourceUri: string, - associationName: string, - options?: DataCollectionRuleAssociationsGetOptionalParams - ): Promise; - /** - * Creates or updates an association. - * @param resourceUri The identifier of the resource. - * @param associationName The name of the association. The name is case insensitive. - * @param options The options parameters. - */ - create( - resourceUri: string, - associationName: string, - options?: DataCollectionRuleAssociationsCreateOptionalParams - ): Promise; - /** - * Deletes an association. - * @param resourceUri The identifier of the resource. - * @param associationName The name of the association. The name is case insensitive. - * @param options The options parameters. - */ - delete( - resourceUri: string, - associationName: string, - options?: DataCollectionRuleAssociationsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRules.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRules.ts deleted file mode 100644 index ed2cf87b83be..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/dataCollectionRules.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DataCollectionRuleResource, - DataCollectionRulesListByResourceGroupOptionalParams, - DataCollectionRulesListBySubscriptionOptionalParams, - DataCollectionRulesGetOptionalParams, - DataCollectionRulesGetResponse, - DataCollectionRulesCreateOptionalParams, - DataCollectionRulesCreateResponse, - DataCollectionRulesUpdateOptionalParams, - DataCollectionRulesUpdateResponse, - DataCollectionRulesDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a DataCollectionRules. */ -export interface DataCollectionRules { - /** - * Lists all data collection rules in the specified resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: DataCollectionRulesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists all data collection rules in the specified subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: DataCollectionRulesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Returns the specified data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRulesGetOptionalParams - ): Promise; - /** - * Creates or updates a data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRulesCreateOptionalParams - ): Promise; - /** - * Updates part of a data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRulesUpdateOptionalParams - ): Promise; - /** - * Deletes a data collection rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dataCollectionRuleName The name of the data collection rule. The name is case insensitive. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - dataCollectionRuleName: string, - options?: DataCollectionRulesDeleteOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/diagnosticSettings.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/diagnosticSettings.ts deleted file mode 100644 index 2c1a245f2a5e..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/diagnosticSettings.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DiagnosticSettingsResource, - DiagnosticSettingsListOptionalParams, - DiagnosticSettingsGetOptionalParams, - DiagnosticSettingsGetResponse, - DiagnosticSettingsCreateOrUpdateOptionalParams, - DiagnosticSettingsCreateOrUpdateResponse, - DiagnosticSettingsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a DiagnosticSettings. */ -export interface DiagnosticSettings { - /** - * Gets the active diagnostic settings list for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: DiagnosticSettingsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the active diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The options parameters. - */ - get( - resourceUri: string, - name: string, - options?: DiagnosticSettingsGetOptionalParams - ): Promise; - /** - * Creates or updates diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param parameters Parameters supplied to the operation. - * @param options The options parameters. - */ - createOrUpdate( - resourceUri: string, - name: string, - parameters: DiagnosticSettingsResource, - options?: DiagnosticSettingsCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes existing diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The options parameters. - */ - delete( - resourceUri: string, - name: string, - options?: DiagnosticSettingsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/diagnosticSettingsCategory.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/diagnosticSettingsCategory.ts deleted file mode 100644 index 6f0c5ce9ae9c..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/diagnosticSettingsCategory.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DiagnosticSettingsCategoryResource, - DiagnosticSettingsCategoryListOptionalParams, - DiagnosticSettingsCategoryGetOptionalParams, - DiagnosticSettingsCategoryGetResponse -} from "../models"; - -/// -/** Interface representing a DiagnosticSettingsCategory. */ -export interface DiagnosticSettingsCategory { - /** - * Lists the diagnostic settings categories for the specified resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: DiagnosticSettingsCategoryListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the diagnostic settings category for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The options parameters. - */ - get( - resourceUri: string, - name: string, - options?: DiagnosticSettingsCategoryGetOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/eventCategories.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/eventCategories.ts deleted file mode 100644 index 1e37506d088d..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/eventCategories.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - LocalizableString, - EventCategoriesListOptionalParams -} from "../models"; - -/// -/** Interface representing a EventCategories. */ -export interface EventCategories { - /** - * Get the list of available event categories supported in the Activity Logs Service.
The current - * list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. - * @param options The options parameters. - */ - list( - options?: EventCategoriesListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/index.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/index.ts index 772a7d4d63ff..de4937cf4612 100644 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/index.ts +++ b/sdk/monitor/arm-monitor/src/operationsInterfaces/index.ts @@ -6,34 +6,5 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./autoscaleSettings"; -export * from "./predictiveMetric"; -export * from "./operations"; -export * from "./alertRuleIncidents"; -export * from "./alertRules"; -export * from "./logProfiles"; -export * from "./diagnosticSettings"; -export * from "./diagnosticSettingsCategory"; -export * from "./actionGroups"; -export * from "./activityLogs"; -export * from "./eventCategories"; -export * from "./tenantActivityLogs"; -export * from "./metricDefinitions"; -export * from "./metricsOperations"; -export * from "./baselines"; -export * from "./metricAlerts"; -export * from "./metricAlertsStatus"; -export * from "./scheduledQueryRules"; -export * from "./metricNamespaces"; -export * from "./vMInsights"; -export * from "./privateLinkScopes"; -export * from "./privateLinkScopeOperationStatus"; -export * from "./privateLinkResources"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkScopedResources"; -export * from "./activityLogAlerts"; -export * from "./dataCollectionEndpoints"; -export * from "./dataCollectionRuleAssociations"; -export * from "./dataCollectionRules"; export * from "./azureMonitorWorkspaces"; export * from "./monitorOperations"; diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/logProfiles.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/logProfiles.ts deleted file mode 100644 index 8c43d9f62e8a..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/logProfiles.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - LogProfileResource, - LogProfilesListOptionalParams, - LogProfilesDeleteOptionalParams, - LogProfilesGetOptionalParams, - LogProfilesGetResponse, - LogProfilesCreateOrUpdateOptionalParams, - LogProfilesCreateOrUpdateResponse, - LogProfileResourcePatch, - LogProfilesUpdateOptionalParams, - LogProfilesUpdateResponse -} from "../models"; - -/// -/** Interface representing a LogProfiles. */ -export interface LogProfiles { - /** - * List the log profiles. - * @param options The options parameters. - */ - list( - options?: LogProfilesListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Deletes the log profile. - * @param logProfileName The name of the log profile. - * @param options The options parameters. - */ - delete( - logProfileName: string, - options?: LogProfilesDeleteOptionalParams - ): Promise; - /** - * Gets the log profile. - * @param logProfileName The name of the log profile. - * @param options The options parameters. - */ - get( - logProfileName: string, - options?: LogProfilesGetOptionalParams - ): Promise; - /** - * Create or update a log profile in Azure Monitoring REST API. - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @param options The options parameters. - */ - createOrUpdate( - logProfileName: string, - parameters: LogProfileResource, - options?: LogProfilesCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * @param logProfileName The name of the log profile. - * @param logProfilesResource Parameters supplied to the operation. - * @param options The options parameters. - */ - update( - logProfileName: string, - logProfilesResource: LogProfileResourcePatch, - options?: LogProfilesUpdateOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricAlerts.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/metricAlerts.ts deleted file mode 100644 index 2d84b9ef6dbd..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricAlerts.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - MetricAlertResource, - MetricAlertsListBySubscriptionOptionalParams, - MetricAlertsListByResourceGroupOptionalParams, - MetricAlertsGetOptionalParams, - MetricAlertsGetResponse, - MetricAlertsCreateOrUpdateOptionalParams, - MetricAlertsCreateOrUpdateResponse, - MetricAlertResourcePatch, - MetricAlertsUpdateOptionalParams, - MetricAlertsUpdateResponse, - MetricAlertsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a MetricAlerts. */ -export interface MetricAlerts { - /** - * Retrieve alert rule definitions in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: MetricAlertsListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Retrieve alert rule definitions in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: MetricAlertsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Retrieve an alert rule definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ruleName: string, - options?: MetricAlertsGetOptionalParams - ): Promise; - /** - * Create or update an metric alert definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - ruleName: string, - parameters: MetricAlertResource, - options?: MetricAlertsCreateOrUpdateOptionalParams - ): Promise; - /** - * Update an metric alert definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - ruleName: string, - parameters: MetricAlertResourcePatch, - options?: MetricAlertsUpdateOptionalParams - ): Promise; - /** - * Delete an alert rule definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - ruleName: string, - options?: MetricAlertsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricAlertsStatus.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/metricAlertsStatus.ts deleted file mode 100644 index 58300ce0a2e5..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricAlertsStatus.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - MetricAlertsStatusListOptionalParams, - MetricAlertsStatusListResponse, - MetricAlertsStatusListByNameOptionalParams, - MetricAlertsStatusListByNameResponse -} from "../models"; - -/** Interface representing a MetricAlertsStatus. */ -export interface MetricAlertsStatus { - /** - * Retrieve an alert rule status. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - ruleName: string, - options?: MetricAlertsStatusListOptionalParams - ): Promise; - /** - * Retrieve an alert rule status. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param statusName The name of the status. - * @param options The options parameters. - */ - listByName( - resourceGroupName: string, - ruleName: string, - statusName: string, - options?: MetricAlertsStatusListByNameOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricDefinitions.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/metricDefinitions.ts deleted file mode 100644 index 1a98f35a1568..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricDefinitions.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - MetricDefinition, - MetricDefinitionsListOptionalParams -} from "../models"; - -/// -/** Interface representing a MetricDefinitions. */ -export interface MetricDefinitions { - /** - * Lists the metric definitions for the resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: MetricDefinitionsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricNamespaces.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/metricNamespaces.ts deleted file mode 100644 index 1dc7f7090db4..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricNamespaces.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { MetricNamespace, MetricNamespacesListOptionalParams } from "../models"; - -/// -/** Interface representing a MetricNamespaces. */ -export interface MetricNamespaces { - /** - * Lists the metric namespaces for the resource. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: MetricNamespacesListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricsOperations.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/metricsOperations.ts deleted file mode 100644 index a9b3f7a4756a..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/metricsOperations.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { MetricsListOptionalParams, MetricsListResponse } from "../models"; - -/** Interface representing a MetricsOperations. */ -export interface MetricsOperations { - /** - * **Lists the metric values for a resource**. - * @param resourceUri The identifier of the resource. - * @param options The options parameters. - */ - list( - resourceUri: string, - options?: MetricsListOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/monitorOperations.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/monitorOperations.ts index af36a9b0beca..5764a4019298 100644 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/monitorOperations.ts +++ b/sdk/monitor/arm-monitor/src/operationsInterfaces/monitorOperations.ts @@ -7,10 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - OperationAutoGenerated, - MonitorOperationsListOptionalParams -} from "../models"; +import { Operation, MonitorOperationsListOptionalParams } from "../models"; /// /** Interface representing a MonitorOperations. */ @@ -21,5 +18,5 @@ export interface MonitorOperations { */ list( options?: MonitorOperationsListOptionalParams - ): PagedAsyncIterableIterator; + ): PagedAsyncIterableIterator; } diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/operations.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/operations.ts deleted file mode 100644 index da425201c313..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationsListOptionalParams, - OperationsListResponse -} from "../models"; - -/** Interface representing a Operations. */ -export interface Operations { - /** - * Lists all of the available operations from Microsoft.Insights provider. - * @param options The options parameters. - */ - list(options?: OperationsListOptionalParams): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/predictiveMetric.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/predictiveMetric.ts deleted file mode 100644 index 27ea278ae94a..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/predictiveMetric.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - PredictiveMetricGetOptionalParams, - PredictiveMetricGetResponse -} from "../models"; - -/** Interface representing a PredictiveMetric. */ -export interface PredictiveMetric { - /** - * get predictive autoscale metric future data - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autoscaleSettingName The autoscale setting name. - * @param timespan The timespan of the query. It is a string with the following format - * 'startDateTime_ISO/endDateTime_ISO'. - * @param interval The interval (i.e. timegrain) of the query. - * @param metricNamespace Metric namespace to query metric definitions for. - * @param metricName The names of the metrics (comma separated) to retrieve. Special case: If a - * metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be - * **'Metric%2Name1'** - * @param aggregation The list of aggregation types (comma separated) to retrieve. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - autoscaleSettingName: string, - timespan: string, - interval: string, - metricNamespace: string, - metricName: string, - aggregation: string, - options?: PredictiveMetricGetOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/privateEndpointConnections.ts deleted file mode 100644 index a5661bf7e3ba..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateEndpointConnections.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - PrivateEndpointConnectionsGetOptionalParams, - PrivateEndpointConnectionsGetResponse, - PrivateEndpointConnection, - PrivateEndpointConnectionsCreateOrUpdateOptionalParams, - PrivateEndpointConnectionsCreateOrUpdateResponse, - PrivateEndpointConnectionsDeleteOptionalParams, - PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams, - PrivateEndpointConnectionsListByPrivateLinkScopeResponse -} from "../models"; - -/** Interface representing a PrivateEndpointConnections. */ -export interface PrivateEndpointConnections { - /** - * Gets a private endpoint connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams - ): Promise; - /** - * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The Private Endpoint Connection resource. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - parameters: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointConnectionsCreateOrUpdateResponse - > - >; - /** - * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The Private Endpoint Connection resource. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - parameters: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; - /** - * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - scopeName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise; - /** - * Gets all private endpoint connections on a private link scope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - listByPrivateLinkScope( - resourceGroupName: string, - scopeName: string, - options?: PrivateEndpointConnectionsListByPrivateLinkScopeOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkResources.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkResources.ts deleted file mode 100644 index be1dcfe8391a..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkResources.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - PrivateLinkResourcesListByPrivateLinkScopeOptionalParams, - PrivateLinkResourcesListByPrivateLinkScopeResponse, - PrivateLinkResourcesGetOptionalParams, - PrivateLinkResourcesGetResponse -} from "../models"; - -/** Interface representing a PrivateLinkResources. */ -export interface PrivateLinkResources { - /** - * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - listByPrivateLinkScope( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkResourcesListByPrivateLinkScopeOptionalParams - ): Promise; - /** - * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param groupName The name of the private link resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - scopeName: string, - groupName: string, - options?: PrivateLinkResourcesGetOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopeOperationStatus.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopeOperationStatus.ts deleted file mode 100644 index 08156f47a625..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopeOperationStatus.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - PrivateLinkScopeOperationStatusGetOptionalParams, - PrivateLinkScopeOperationStatusGetResponse -} from "../models"; - -/** Interface representing a PrivateLinkScopeOperationStatus. */ -export interface PrivateLinkScopeOperationStatus { - /** - * Get the status of an azure asynchronous operation associated with a private link scope operation. - * @param asyncOperationId The operation Id. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - get( - asyncOperationId: string, - resourceGroupName: string, - options?: PrivateLinkScopeOperationStatusGetOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopedResources.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopedResources.ts deleted file mode 100644 index cd9a4d1aa9f9..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopedResources.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ScopedResource, - PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams, - PrivateLinkScopedResourcesGetOptionalParams, - PrivateLinkScopedResourcesGetResponse, - PrivateLinkScopedResourcesCreateOrUpdateOptionalParams, - PrivateLinkScopedResourcesCreateOrUpdateResponse, - PrivateLinkScopedResourcesDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a PrivateLinkScopedResources. */ -export interface PrivateLinkScopedResources { - /** - * Gets all private endpoint connections on a private link scope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - listByPrivateLinkScope( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopedResourcesListByPrivateLinkScopeOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets a scoped resource in a private link scope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - scopeName: string, - name: string, - options?: PrivateLinkScopedResourcesGetOptionalParams - ): Promise; - /** - * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param parameters A private link scoped resource - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - scopeName: string, - name: string, - parameters: ScopedResource, - options?: PrivateLinkScopedResourcesCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - PrivateLinkScopedResourcesCreateOrUpdateResponse - > - >; - /** - * Approve or reject a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param parameters A private link scoped resource - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - scopeName: string, - name: string, - parameters: ScopedResource, - options?: PrivateLinkScopedResourcesCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - scopeName: string, - name: string, - options?: PrivateLinkScopedResourcesDeleteOptionalParams - ): Promise, void>>; - /** - * Deletes a private endpoint connection with a given name. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param name The name of the scoped resource object. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - scopeName: string, - name: string, - options?: PrivateLinkScopedResourcesDeleteOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopes.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopes.ts deleted file mode 100644 index 8b8bc6a5d74f..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/privateLinkScopes.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - AzureMonitorPrivateLinkScope, - PrivateLinkScopesListOptionalParams, - PrivateLinkScopesListByResourceGroupOptionalParams, - PrivateLinkScopesDeleteOptionalParams, - PrivateLinkScopesGetOptionalParams, - PrivateLinkScopesGetResponse, - PrivateLinkScopesCreateOrUpdateOptionalParams, - PrivateLinkScopesCreateOrUpdateResponse, - TagsResource, - PrivateLinkScopesUpdateTagsOptionalParams, - PrivateLinkScopesUpdateTagsResponse -} from "../models"; - -/// -/** Interface representing a PrivateLinkScopes. */ -export interface PrivateLinkScopes { - /** - * Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. - * @param options The options parameters. - */ - list( - options?: PrivateLinkScopesListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets a list of Azure Monitor PrivateLinkScopes within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: PrivateLinkScopesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Deletes a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopesDeleteOptionalParams - ): Promise, void>>; - /** - * Deletes a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopesDeleteOptionalParams - ): Promise; - /** - * Returns a Azure Monitor PrivateLinkScope. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - scopeName: string, - options?: PrivateLinkScopesGetOptionalParams - ): Promise; - /** - * Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value - * for InstrumentationKey nor AppId in the Put operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param azureMonitorPrivateLinkScopePayload Properties that need to be specified to create or update - * a Azure Monitor PrivateLinkScope. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - scopeName: string, - azureMonitorPrivateLinkScopePayload: AzureMonitorPrivateLinkScope, - options?: PrivateLinkScopesCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Monitor PrivateLinkScope resource. - * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - scopeName: string, - privateLinkScopeTags: TagsResource, - options?: PrivateLinkScopesUpdateTagsOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/scheduledQueryRules.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/scheduledQueryRules.ts deleted file mode 100644 index 0dbf37bd644f..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/scheduledQueryRules.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ScheduledQueryRuleResource, - ScheduledQueryRulesListBySubscriptionOptionalParams, - ScheduledQueryRulesListByResourceGroupOptionalParams, - ScheduledQueryRulesGetOptionalParams, - ScheduledQueryRulesGetResponse, - ScheduledQueryRulesCreateOrUpdateOptionalParams, - ScheduledQueryRulesCreateOrUpdateResponse, - ScheduledQueryRuleResourcePatch, - ScheduledQueryRulesUpdateOptionalParams, - ScheduledQueryRulesUpdateResponse, - ScheduledQueryRulesDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a ScheduledQueryRules. */ -export interface ScheduledQueryRules { - /** - * Retrieve a scheduled query rule definitions in a subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: ScheduledQueryRulesListBySubscriptionOptionalParams - ): PagedAsyncIterableIterator; - /** - * Retrieve scheduled query rule definitions in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ScheduledQueryRulesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Retrieve an scheduled query rule definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - ruleName: string, - options?: ScheduledQueryRulesGetOptionalParams - ): Promise; - /** - * Creates or updates a scheduled query rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to create or update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - ruleName: string, - parameters: ScheduledQueryRuleResource, - options?: ScheduledQueryRulesCreateOrUpdateOptionalParams - ): Promise; - /** - * Update a scheduled query rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - ruleName: string, - parameters: ScheduledQueryRuleResourcePatch, - options?: ScheduledQueryRulesUpdateOptionalParams - ): Promise; - /** - * Deletes a scheduled query rule. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ruleName The name of the rule. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - ruleName: string, - options?: ScheduledQueryRulesDeleteOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/tenantActivityLogs.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/tenantActivityLogs.ts deleted file mode 100644 index 48c0ae888772..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/tenantActivityLogs.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { EventData, TenantActivityLogsListOptionalParams } from "../models"; - -/// -/** Interface representing a TenantActivityLogs. */ -export interface TenantActivityLogs { - /** - * Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the - * Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One - * thing to point out here is that this API does *not* retrieve the logs at the individual subscription - * of the tenant but only surfaces the logs that were generated at the tenant level. - * @param options The options parameters. - */ - list( - options?: TenantActivityLogsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/monitor/arm-monitor/src/operationsInterfaces/vMInsights.ts b/sdk/monitor/arm-monitor/src/operationsInterfaces/vMInsights.ts deleted file mode 100644 index aa140be77c62..000000000000 --- a/sdk/monitor/arm-monitor/src/operationsInterfaces/vMInsights.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - VMInsightsGetOnboardingStatusOptionalParams, - VMInsightsGetOnboardingStatusResponse -} from "../models"; - -/** Interface representing a VMInsights. */ -export interface VMInsights { - /** - * Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource, or scope, - * whose status to retrieve. - * @param options The options parameters. - */ - getOnboardingStatus( - resourceUri: string, - options?: VMInsightsGetOnboardingStatusOptionalParams - ): Promise; -} diff --git a/sdk/monitor/arm-monitor/test/monitor_examples.ts b/sdk/monitor/arm-monitor/test/monitor_examples.ts deleted file mode 100644 index da011ff4f258..000000000000 --- a/sdk/monitor/arm-monitor/test/monitor_examples.ts +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { MonitorClient } from "../src/monitorClient"; -import { LogicManagementClient } from "@azure/arm-logic"; -import { StorageManagementClient } from "@azure/arm-storage"; -import { EventHubManagementClient } from "@azure/arm-eventhub"; -import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; - -const replaceableVariables: Record = { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("Monitor test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: MonitorClient; - let location: string; - let resourceGroup: string; - let workflowName: string; - let storageAccountName: string; - let namespaceName: string; - let authorizationRuleName: string; - let eventhubName: string; - let workspaceName: string; - let logProfileName: string; - let diagnosticName: string; - let logic_client: LogicManagementClient; - let storage_client: StorageManagementClient; - let eventhub_client: EventHubManagementClient; - let op_client: OperationalInsightsManagementClient; - let workflowsId: string; - let storageId: string; - let authorizationId: string; - let workspaceId: string; - let azureMonitorWorkspaceName: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new MonitorClient(credential, subscriptionId, recorder.configureClientOptions({})); - logic_client = new LogicManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - storage_client = new StorageManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - eventhub_client = new EventHubManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - op_client = new OperationalInsightsManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - workflowName = "myworkflowxxx"; - storageAccountName = "mystorageaccountyyy"; - namespaceName = "mynamespacexxx"; - eventhubName = "myeventhubxxx"; - workspaceName = "myworkspacexxx"; - authorizationRuleName = "myauthorizationRulexxx"; - logProfileName = "mylogProfilexxx"; - diagnosticName = "mydiagnosticxxxx"; - azureMonitorWorkspaceName = "myAzureMonitorWorkspace" - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("create parameters for diagnosticSettings", async function () { - //workflows.createOrUpdate - const res = await logic_client.workflows.createOrUpdate(resourceGroup, workflowName, { - location: location, - definition: { - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "triggers": {}, - "actions": {}, - "outputs": {} - } - }); - workflowsId = (res.id || "/").substring(1); - - //storageAccounts.beginCreateAndWait - const storageaccount = await storage_client.storageAccounts.beginCreateAndWait(resourceGroup, storageAccountName, { - sku: { - name: "Standard_GRS", - }, - kind: "StorageV2", - location: "eastus", - encryption: { - services: { - file: { - keyType: "Account", - enabled: true, - }, - blob: { - keyType: "Account", - enabled: true, - }, - }, - keySource: "Microsoft.Storage", - }, - tags: { - key1: "value1", - key2: "value2", - } - }); - storageId = storageaccount.id || ""; - - //namespaces.beginCreateOrUpdateAndWait - const namespaces = await eventhub_client.namespaces.beginCreateOrUpdateAndWait(resourceGroup, namespaceName, { - sku: { - name: "Standard", - tier: "Standard", - }, - location: location, - tags: { - tag1: "value1", - tag2: "value2", - } - }) - //namespaces.createOrUpdateAuthorizationRule - const authorization = await eventhub_client.namespaces.createOrUpdateAuthorizationRule(resourceGroup, namespaceName, authorizationRuleName, { rights: ["Listen", "Send", "Manage"] }); - //eventHubs.createOrUpdate - const eventhub = await eventhub_client.eventHubs.createOrUpdate(resourceGroup, namespaceName, eventhubName, { - messageRetentionInDays: 4, - partitionCount: 4, - status: "Active", - captureDescription: { - enabled: true, - encoding: "Avro", - intervalInSeconds: 120, - sizeLimitInBytes: 10485763, - destination: { - name: "EventHubArchive.AzureBlockBlob", - storageAccountResourceId: "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Storage/storageAccounts/" + storageAccountName, - blobContainer: "container", - archiveNameFormat: "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}", - } - } - }); - authorizationId = authorization.id || ""; - - //workspaces.beginCreateOrUpdateAndWait - const workspace = await op_client.workspaces.beginCreateOrUpdateAndWait(resourceGroup, workspaceName, { - sku: { - name: "PerNode" - }, - retentionInDays: 30, - location: location, - tags: { - tag1: "value1" - } - }) - workspaceId = workspace.id || ""; - }); - - it("diagnosticSettings create test", async function () { - const res = await client.diagnosticSettings.createOrUpdate(workflowsId, diagnosticName, { - storageAccountId: storageId, - workspaceId: workspaceId, - eventHubAuthorizationRuleId: authorizationId, - eventHubName: eventhubName, - metrics: [], - logs: [ - { - category: "WorkflowRuntime", - enabled: true, - retentionPolicy: { - enabled: false, - days: 0 - } - } - ] - }) - assert.equal(res.name, diagnosticName); - }); - - it("diagnosticSettings get test", async function () { - const res = await client.diagnosticSettings.get(workflowsId, diagnosticName); - assert.equal(res.name, diagnosticName); - }); - - it("diagnosticSettings list test", async function () { - const res = await client.diagnosticSettings.list(workflowsId); - }); - - it("diagnosticSettings delete test", async function () { - const res = await client.diagnosticSettings.delete(workflowsId, diagnosticName); - }); - - it("logProfiles create test", async function () { - //delete sample logfile - const resArray = new Array(); - for await (let item of client.logProfiles.list()) { - resArray.push(item); - } - if (resArray.length >= 1) { - await client.logProfiles.delete("sample-log-profile") - } - const res = await client.logProfiles.createOrUpdate(logProfileName, { - location: "", - locations: [ - "global" - ], - categories: [ - "Write", - "Delete", - "Action" - ], - retentionPolicy: { - enabled: true, - days: 3 - }, - storageAccountId: storageId - }) - assert.equal(res.name, logProfileName); - }); - - it("logProfiles get test", async function () { - const res = await client.logProfiles.get(logProfileName); - assert.equal(res.name, logProfileName); - }); - - it("logProfiles list test", async function () { - const resArray = new Array(); - for await (let item of client.logProfiles.list()) { - resArray.push(item); - } - assert.equal(resArray.length, 1); - }); - - it("workspace create test", async function () { - const res = await client.azureMonitorWorkspaces.create( - resourceGroup, - azureMonitorWorkspaceName, - { - location - }); - assert.equal(res.name, azureMonitorWorkspaceName); - }); - - it("workspace get test", async function () { - const res = await client.azureMonitorWorkspaces.get(resourceGroup, azureMonitorWorkspaceName); - assert.equal(res.name, azureMonitorWorkspaceName); - }); - - it("workspace list test", async function () { - const resArray = new Array(); - for await (let item of client.azureMonitorWorkspaces.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 1); - }); - - it("workspace delete test", async function () { - const resArray = new Array(); - const res = await client.azureMonitorWorkspaces.delete(resourceGroup, azureMonitorWorkspaceName) - for await (let item of client.azureMonitorWorkspaces.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }); - - it("delete parameters for diagnosticSettings", async function () { - const workflowDlete = await logic_client.workflows.delete(resourceGroup, workflowName); - const storageDelete = await storage_client.storageAccounts.delete(resourceGroup, storageAccountName); - const namespaceDelete = await eventhub_client.namespaces.beginDeleteAndWait(resourceGroup, namespaceName); - const workspaceDelete = await op_client.workspaces.beginDeleteAndWait(resourceGroup, workspaceName); - }); - - it("logProfiles delete test", async function () { - const res = await client.logProfiles.delete(logProfileName); - const resArray = new Array(); - for await (let item of client.logProfiles.list()) { - resArray.push(item); - } - assert.equal(resArray.length, 1); //still exist sample logfile - }); -}); diff --git a/sdk/monitor/arm-monitor/test/sampleTest.ts b/sdk/monitor/arm-monitor/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/monitor/arm-monitor/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/monitor/arm-monitor/tsconfig.json b/sdk/monitor/arm-monitor/tsconfig.json index 293df9ae64ce..3e6ae96443f3 100644 --- a/sdk/monitor/arm-monitor/tsconfig.json +++ b/sdk/monitor/arm-monitor/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-monitor": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"